/**
 * Run Test Page CSS - Wizard and Monitor styles
 */

/* ============================================
   WIZARD WRAPPER
   ============================================ */
.wizard-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

/* ============================================
   WIZARD PROGRESS
   ============================================ */
.wizard-progress {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

.wizard-steps {
    display: flex;
    align-items: center;
}

.wizard-step {
    display: flex;
    align-items: center;
    gap: 8px;
}

.step-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    font-family: 'DM Mono', monospace;
    transition: all 0.3s;
}

.wizard-step.active .step-circle {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.wizard-step.completed .step-circle {
    background: var(--sage);
    border-color: var(--sage);
    color: white;
}

.step-label {
    font-size: 13px;
    color: var(--text-muted);
}

.wizard-step.active .step-label {
    color: var(--accent);
    font-weight: 500;
}

.wizard-step.completed .step-label {
    color: var(--sage);
}

.step-line {
    width: 48px;
    height: 2px;
    background: var(--border);
    margin: 0 12px;
}

.step-line.completed {
    background: var(--sage);
}

/* ============================================
   WIZARD CARD
   ============================================ */
.wizard-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.wizard-title {
    font-size: 22px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 4px;
}

.wizard-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 28px;
    font-family: 'DM Mono', monospace;
}

.wizard-actions {
    display: flex;
    justify-content: space-between;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    margin-top: 24px;
}

.wizard-step-content {
    display: none;
}

.wizard-step-content.active {
    display: block;
}

/* ============================================
   PERSONA GRID (Step 1)
   ============================================ */
.persona-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 8px;
}

.persona-card {
    background: var(--bg-cream);
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 18px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.persona-card:hover {
    border-color: var(--border);
    transform: translateY(-2px);
}

.persona-card.selected {
    border-color: var(--accent);
    background: linear-gradient(135deg, var(--bg-card) 0%, #fef8f5 100%);
    box-shadow: 0 4px 12px rgba(196, 112, 75, 0.12);
}

.persona-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--bg-warm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-style: italic;
    font-weight: 500;
    color: var(--accent);
    margin-bottom: 12px;
    transition: all 0.2s;
}

.persona-card.selected .persona-avatar {
    background: var(--accent);
    color: white;
}

.persona-name {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 2px;
}

.persona-concern {
    font-size: 12px;
    color: var(--text-muted);
    font-family: 'DM Mono', monospace;
    margin-bottom: 10px;
}

.persona-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* ============================================
   SCENARIO GRID (Step 2)
   ============================================ */
.scenario-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.scenario-card {
    background: var(--bg-cream);
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 18px;
    cursor: pointer;
    transition: all 0.2s;
}

.scenario-card:hover {
    border-color: var(--border);
}

.scenario-card.selected {
    border-color: var(--accent);
    background: var(--bg-card);
}

.scenario-name {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 4px;
}

.scenario-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ============================================
   CONFIGURE STEP (Step 3)
   ============================================ */
.config-sections {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Voice Controls */
.voice-modes {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.voice-mode-btn {
    flex: 1;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-card);
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.voice-mode-btn.active {
    border-color: var(--accent);
    background: var(--accent-light);
    color: var(--accent);
}

.voice-sliders {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

/* ============================================
   RUN & MONITOR (Step 4)
   ============================================ */
.monitor-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
    min-height: 500px;
}

/* Transcript Panel */
.transcript-panel {
    background: var(--bg-card);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.transcript-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.transcript-title {
    font-size: 14px;
    font-weight: 500;
}

.transcript-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--gold);
    font-family: 'DM Mono', monospace;
}

.transcript-status .dot {
    width: 6px;
    height: 6px;
    background: var(--gold);
    border-radius: 50%;
    animation: pulse 1s infinite;
}

.transcript-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* Transcript Turns */
.transcript-turn {
    margin-bottom: 20px;
    animation: fadeInUp 0.3s ease;
}

.turn-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}

.turn-speaker {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'DM Mono', monospace;
}

.turn-speaker.ai { color: var(--sage); }
.turn-speaker.patient { color: var(--accent); }

.turn-time {
    font-size: 10px;
    color: var(--text-light);
    font-family: 'DM Mono', monospace;
}

.turn-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text);
}

/* Audio Controls */
.turn-audio {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.audio-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-cream);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: var(--text-muted);
    transition: var(--transition);
}

.audio-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.audio-wave {
    flex: 1;
    height: 24px;
    background: var(--bg-cream);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 0 8px;
}

.wave-bar {
    width: 2px;
    background: var(--border);
    border-radius: 1px;
}

/* Monitor Sidebar */
.monitor-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.monitor-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 16px;
}

.monitor-card-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-family: 'DM Mono', monospace;
    margin-bottom: 12px;
}

/* Progress Ring */
.progress-ring {
    width: 80px;
    height: 80px;
    margin: 0 auto 12px;
    position: relative;
}

.progress-ring svg {
    transform: rotate(-90deg);
}

.progress-ring circle {
    fill: none;
    stroke-width: 6;
}

.progress-ring .bg {
    stroke: var(--border);
}

.progress-ring .progress {
    stroke: var(--accent);
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 18px;
    font-weight: 600;
}

.progress-label {
    text-align: center;
    font-size: 11px;
    color: var(--text-muted);
    font-family: 'DM Mono', monospace;
}

/* Live Scores */
.live-scores {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.live-score {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.live-score-label {
    font-size: 12px;
    color: var(--text-muted);
}

.live-score-value {
    font-size: 18px;
    font-weight: 600;
    font-family: 'DM Mono', monospace;
}

.live-score-value.high { color: var(--sage); }
.live-score-value.medium { color: var(--gold); }
.live-score-value.low { color: var(--accent); }

/* Stop Button */
.stop-btn {
    width: 100%;
    padding: 14px;
    background: var(--bg-warm);
    border: 1px solid var(--accent);
    border-radius: 10px;
    color: var(--accent);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.stop-btn:hover {
    background: var(--accent);
    color: white;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
    .persona-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .monitor-layout {
        grid-template-columns: 1fr;
    }

    .monitor-sidebar {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .monitor-card {
        flex: 1;
        min-width: 200px;
    }
}

@media (max-width: 600px) {
    .persona-grid {
        grid-template-columns: 1fr;
    }

    .scenario-grid {
        grid-template-columns: 1fr;
    }

    .voice-sliders {
        grid-template-columns: 1fr;
    }

    .config-row {
        grid-template-columns: 1fr;
    }
}
