/* dev-sts-test.css — STS パイプライン検証ページ */

/* タブナビ（groq/openaiページと同様） */
.tab-nav {
  background: var(--card);
  border-bottom: 2px solid var(--border);
  display: flex;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.tab-nav::-webkit-scrollbar { display: none; }
.tab-link {
  padding: 12px 16px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.2s, border-color 0.2s;
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 44px;
}
.tab-link:hover { color: var(--text); }
.tab-link.active { color: var(--accent-light); border-bottom-color: var(--accent-light); }
.tab-icon { font-size: 14px; }

/* メインレイアウト */
.sts-main {
  padding: 16px;
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

/* パイプラインカード */
.pipeline-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.pipeline-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 480px) {
  .pipeline-cards { grid-template-columns: 1fr; }
}
.pipeline-card {
  cursor: pointer;
  display: block;
}
.pipeline-card input[type="radio"] { display: none; }
.pipeline-card-inner {
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: var(--card2);
  transition: border-color 0.2s, background 0.2s;
}
.pipeline-card input:checked + .pipeline-card-inner {
  border-color: var(--accent-light);
  background: rgba(124,58,237,0.08);
}
.pipeline-card:hover .pipeline-card-inner {
  border-color: var(--accent);
}
.pipeline-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.pipeline-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.pipeline-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.04em;
}
.badge-e2e { background: rgba(59,130,246,0.2); color: #60a5fa; border: 1px solid rgba(59,130,246,0.3); }
.badge-hybrid { background: rgba(34,197,94,0.15); color: #4ade80; border: 1px solid rgba(34,197,94,0.25); }
.pipeline-flow {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.pipeline-meta {
  font-size: 11px;
  color: var(--text-dim);
}
.pipeline-model-select {
  margin-top: 8px;
  width: 100%;
  font-size: 11px;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 6px;
  cursor: pointer;
}

/* 操作セクション */
.control-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.mic-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.mic-btn {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid rgba(124,58,237,0.4);
  background: var(--card2);
  font-size: 30px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  -webkit-user-select: none;
  outline: none;
}
.mic-btn:hover { background: var(--accent-glow); border-color: var(--accent-light); transform: scale(1.05); }
.mic-btn.state-listening {
  border-color: var(--accent-light);
  background: var(--accent-glow);
  animation: pulse-accent 1.8s infinite;
}
.mic-btn.state-recording {
  border-color: var(--red);
  background: rgba(239,68,68,0.12);
  animation: pulse-red 0.8s infinite;
}
.mic-btn.state-processing {
  border-color: var(--yellow);
  background: rgba(234,179,8,0.12);
  animation: pulse-yellow 1s infinite;
  cursor: default;
}
.mic-btn.state-playing {
  border-color: var(--green);
  background: rgba(34,197,94,0.12);
  animation: pulse-green 1.2s infinite;
  cursor: default;
}
@keyframes pulse-accent {
  0%,100% { box-shadow: 0 0 0 0 rgba(124,58,237,0.4); }
  50% { box-shadow: 0 0 0 14px rgba(124,58,237,0); }
}
@keyframes pulse-red {
  0%,100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.5); }
  50% { box-shadow: 0 0 0 10px rgba(239,68,68,0); }
}
@keyframes pulse-yellow {
  0%,100% { box-shadow: 0 0 0 0 rgba(234,179,8,0.4); }
  50% { box-shadow: 0 0 0 12px rgba(234,179,8,0); }
}
@keyframes pulse-green {
  0%,100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.4); }
  50% { box-shadow: 0 0 0 14px rgba(34,197,94,0); }
}
.mic-label { font-size: 12px; color: var(--text-muted); }

.status-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 100%;
  max-width: 500px;
}
.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--text-dim);
  flex-shrink: 0;
  transition: background 0.2s;
}
.status-dot.listening { background: var(--accent-light); }
.status-dot.recording { background: var(--red); animation: blink 0.6s infinite; }
.status-dot.processing { background: var(--yellow); animation: blink 0.8s infinite; }
.status-dot.playing { background: var(--green); }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }
.status-text { font-size: 13px; color: var(--text-muted); }

.text-input-row {
  display: flex;
  gap: 8px;
  width: 100%;
  max-width: 500px;
}
.text-input {
  flex: 1;
  padding: 8px 12px;
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 13px;
  outline: none;
}
.text-input:focus { border-color: var(--accent); }
.text-send-btn {
  padding: 8px 16px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.text-send-btn:hover { background: var(--accent-light); }

.options-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  width: 100%;
  max-width: 500px;
}
.toggle-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.toggle-wrap input[type="checkbox"] { display: none; }
.toggle-slider {
  width: 36px; height: 20px;
  background: var(--border);
  border-radius: 10px;
  position: relative;
  transition: background 0.2s;
  flex-shrink: 0;
}
.toggle-slider::after {
  content: '';
  position: absolute;
  width: 14px; height: 14px;
  background: #fff;
  border-radius: 50%;
  top: 3px; left: 3px;
  transition: transform 0.2s;
}
.toggle-wrap input:checked + .toggle-slider { background: var(--accent); }
.toggle-wrap input:checked + .toggle-slider::after { transform: translateX(16px); }
.toggle-label { font-size: 12px; color: var(--text-muted); font-weight: 600; }

.voice-select-wrap, .stt-select-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}
.opt-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.opt-select {
  padding: 4px 8px;
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
  outline: none;
  max-width: 150px;
}

/* VAD感度スライダー */
.vad-sensitivity-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}
.vad-slider {
  width: 80px;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--border);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
.vad-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent-light);
  cursor: pointer;
}
.vad-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent-light);
  border: none;
  cursor: pointer;
}

/* GPUサーバーステータス */
.gpu-status {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 4px;
  text-align: center;
  margin-top: 4px;
  width: 100%;
  max-width: 500px;
}
.gpu-online {
  background: rgba(34, 197, 94, 0.1);
  color: var(--green);
  border: 1px solid rgba(34, 197, 94, 0.3);
}
.gpu-offline {
  background: rgba(239, 68, 68, 0.1);
  color: var(--red);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* see dev-sts-test-components.css for subtitle/log/compare styles */
