/* vrm-sts-overlay.css — VRMページ上のSTS UIオーバーレイ専用スタイル */

/* STS mic-btn オーバーライド（VRMページ用コンパクト版） */
.vrm-sts-overlay .mic-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  border: 2px solid rgba(124,58,237,0.4);
  font-size: 20px;
  flex-shrink: 0;
}
.vrm-sts-overlay .mic-label {
  font-size: 11px;
  color: var(--text-dim);
  white-space: nowrap;
}

/* オーバーレイ本体 */
.vrm-sts-overlay {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 20;
  padding: 8px 16px 12px;
  background: linear-gradient(to top, rgba(15, 17, 23, 0.97) 60%, transparent);
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: auto;
}

/* モーションボタン行 */
.vrm-motion-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

/* パイプライントグルボタン行 */
.vrm-pipeline-toggle-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 選択中パイプライン名 */
.vrm-pipeline-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

/* タイミング簡易表示 */
.vrm-timing-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 11px;
  color: var(--text-dim);
}
.vrm-timing-item {
  display: flex;
  align-items: center;
  gap: 4px;
}
.vrm-timing-item .timing-value {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.vrm-timing-item .timing-value.hl { color: var(--accent-light); }

/* マイク + テキスト入力行 */
.vrm-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.vrm-input-row .text-input-row {
  flex: 1;
  max-width: none;
}

/* chatLog (STSの共通ID) — VRMオーバーレイ内ではコンパクト表示 */
#chatLog.vrm-chat-log {
  max-height: 80px;
  overflow-y: auto;
  padding: 4px 8px;
  background: rgba(10, 11, 18, 0.5);
  border-radius: var(--radius-sm);
  pointer-events: auto;
}
#chatLog.vrm-chat-log:has(.chat-empty:only-child) {
  display: none;
}

/* パイプラインパネル内カード（コンパクト） */
#vrm-pipeline-panel .pipeline-card-inner {
  padding: 8px 10px;
}

/* subtitle: オーバーレイの上に固定 */
#subtitle {
  bottom: calc(var(--vrm-overlay-h, 200px) + 8px);
}

@media (max-width: 600px) {
  .vrm-sts-overlay {
    padding: 6px 10px calc(env(safe-area-inset-bottom, 0px) + 8px);
    gap: 4px;
    /* オーバーレイ内コンテンツが画面幅を超えないようにする */
    max-width: 100vw;
    box-sizing: border-box;
    overflow-x: hidden;
  }
  .vrm-timing-row { gap: 8px; font-size: 10px; }
  /* モーションボタン: 小さくしてwrap */
  .vrm-motion-row .ctrl-btn {
    font-size: 11px;
    padding: 4px 6px;
    white-space: nowrap;
  }
  /* モーション数値入力: コンパクト化 */
  .vrm-motion-row input[type="number"] {
    width: 36px !important;
    font-size: 11px !important;
  }
  /* パイプライントグル行: flex-wrap対応 */
  .vrm-pipeline-toggle-row {
    flex-wrap: wrap;
    gap: 4px;
  }
  .vrm-pipeline-toggle-row #vrm-pipeline-status-row {
    margin-left: 0;
  }
  /* GPUステータス: 幅いっぱいに */
  .vrm-pipeline-toggle-row #gpuStatus {
    width: 100%;
    margin-top: 2px;
  }
  /* options-row: wrap & 全幅 */
  .vrm-sts-overlay .options-row {
    flex-wrap: wrap;
    gap: 8px;
    max-width: 100%;
  }
  /* opt-select: 横幅に収まる最大幅 */
  .vrm-sts-overlay .opt-select {
    max-width: 120px;
  }
  /* 入力行: 全幅 */
  .vrm-input-row {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  .vrm-input-row .text-input-row {
    min-width: 0;
  }
  .vrm-input-row .text-input {
    min-width: 0;
  }
}
