/* Stylesheet for Data Collection Interface - Zero-Emoji Policy Enforced */

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    text-align: center;
    background-color: #f8fafc;
    color: #1e293b;
    margin: 0;
    padding: 16px 20px 40px 20px;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

input, select, textarea {
    -webkit-user-select: text;
    user-select: text;
}

/* Top Header Bar */
.top-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1040px;
    margin: 0 auto 12px auto;
    padding: 8px 12px;
    border-bottom: 1px solid #e2e8f0;
    flex-wrap: wrap;
    gap: 10px;
}

.header-branding {
    text-align: left;
}

.header-branding h2 {
    margin: 0;
    font-size: 22px;
    color: #0f172a;
    font-weight: 700;
}

.sub-pill {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #2563eb;
    background: #dbeafe;
    padding: 2px 8px;
    border-radius: 4px;
    margin-top: 3px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-link-btn {
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    color: #0369a1;
    background: #e0f2fe;
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid #bae6fd;
    transition: background 0.15s ease;
}

.nav-link-btn:hover {
    background: #bae6fd;
}

/* Bilingual Language Switcher */
.lang-switch {
    display: inline-flex;
    background: #e2e8f0;
    padding: 3px;
    border-radius: 6px;
    gap: 2px;
}

.lang-btn {
    border: none;
    background: transparent;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.lang-btn.active {
    background: #2563eb;
    color: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Tabs */
.tab-bar {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 12px auto 16px auto;
    max-width: 600px;
}

.tab-btn {
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background-color: #f1f5f9;
    color: #475569;
    font-weight: 600;
    transition: all 0.2s ease;
}

.tab-btn.tab-active {
    background-color: #2563eb;
    color: #ffffff;
    border-color: #1d4ed8;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

/* Comprehensive Research Guide Box */
.panduan {
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-left: 5px solid #2563eb;
    border-radius: 8px;
    padding: 14px 18px;
    margin: 12px auto;
    max-width: 980px;
    text-align: left;
    font-size: 13.5px;
    color: #334155;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.panduan-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.panduan-tag {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.6px;
    background: #f1f5f9;
    color: #475569;
    padding: 2px 7px;
    border-radius: 3px;
    border: 1px solid #cbd5e1;
}

.panduan-header h4 {
    margin: 0;
    color: #1e293b;
    font-size: 15px;
    font-weight: 700;
}

.panduan-list {
    margin: 0;
    padding-left: 20px;
    line-height: 1.6;
}

.panduan-list li {
    margin-bottom: 6px;
}

.panduan-list li:last-child {
    margin-bottom: 0;
}

/* Session Cards */
.session-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 18px;
    margin: 12px auto;
    max-width: 980px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* Moderated Guided Setup Card */
.session-setup-card {
    border-radius: 12px;
    padding: 18px 22px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
    text-align: left;
}

.setup-header {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
}

.setup-title {
    margin: 0 0 4px 0;
    font-size: 15.5px;
    font-weight: 700;
    color: #0f172a;
}

.setup-subtitle {
    margin: 0;
    font-size: 13px;
    color: #64748b;
    line-height: 1.4;
}

.setup-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px 18px;
}

.setup-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.setup-field label {
    font-size: 12.5px;
    font-weight: 600;
    color: #475569;
}

.setup-field input[type="text"],
.setup-field select {
    width: 100%;
    box-sizing: border-box;
    height: 40px;
    padding: 8px 12px;
    font-size: 13.5px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background-color: #ffffff;
    color: #0f172a;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.setup-field input[type="text"]:focus,
.setup-field select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.setup-actions {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: center;
}

.btn-start-session {
    min-width: 220px;
    height: 42px;
    padding: 10px 28px;
    font-size: 14.5px;
    font-weight: 700;
    background-color: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.25);
    transition: all 0.15s ease;
}

.btn-start-session:hover {
    background-color: #1d4ed8;
    box-shadow: 0 4px 8px rgba(29, 78, 216, 0.3);
    transform: translateY(-1px);
}

.btn-start-session:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .setup-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .setup-grid {
        grid-template-columns: 1fr;
    }
    .btn-start-session {
        width: 100%;
    }
}

.prompt-area-box {
    margin: 12px auto;
    padding: 14px;
    background-color: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    max-width: 980px;
}

.prompt-area-box h3 {
    margin-top: 0;
    font-size: 15px;
    color: #334155;
}

.btn-timer {
    background-color: #2563eb;
    color: #ffffff;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.latency-display-text {
    margin-left: 14px;
    font-weight: 700;
    color: #0f172a;
    font-size: 14px;
}

/* Controls */
.controls {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.controls label {
    font-size: 14px;
    color: #334155;
}

input[type="text"],
select {
    padding: 8px 12px;
    font-size: 14px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    color: #0f172a;
}

input[type="text"]:focus,
select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

button {
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
    border: none;
    border-radius: 6px;
    background-color: #e2e8f0;
    color: #334155;
    font-weight: 600;
    transition: opacity 0.15s, background-color 0.15s;
}

button:hover {
    opacity: 0.92;
}

.btn-primary {
    background-color: #2563eb;
    color: #ffffff;
}

.btn-save {
    background-color: #16a34a;
    color: #ffffff;
}

.btn-audio {
    background-color: #0284c7;
    color: #ffffff;
    margin-top: 8px;
    padding: 6px 14px;
    font-size: 13px;
}

#downloadBtn {
    background-color: #16a34a;
    color: #ffffff;
}

#clearBtn,
#guidedClearBtn {
    background-color: #dc2626;
    color: #ffffff;
}

/* Shared Drawing Canvas */
canvas {
    border: 3px solid #cbd5e1;
    border-radius: 10px;
    touch-action: none;
    background-color: #ffffff;
    margin-top: 10px;
    max-width: 100%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
    -webkit-tap-highlight-color: transparent;
}

/* Active Session HUD */
.hud-top {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.hud-pill {
    background: #eef2ff;
    color: #3730a3;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.hud-pill-level {
    background: #ecfdf5;
    color: #065f46;
}

.hud-pill-latency {
    background: #fff7ed;
    color: #9a3412;
}

.hud-pill-pressure {
    background: #e0f2fe;
    color: #0369a1;
}

.progress-track {
    height: 8px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
    margin: 8px auto 14px auto;
    max-width: 700px;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: #16a34a;
    transition: width 0.3s ease;
}

.prompt-header {
    font-size: 36px;
    font-weight: 800;
    color: #0f172a;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.5px;
}

.prompt-header-masked {
    font-size: 20px;
    font-weight: 600;
    color: #64748b;
    font-style: italic;
}

.summary-card {
    text-align: left;
    line-height: 1.8;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}

/* Examiner Oral Dictation Card */
.examiner-oral-card {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-left: 5px solid #f59e0b;
    border-radius: 8px;
    padding: 10px 14px;
    margin: 10px auto 14px auto;
    max-width: 720px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.examiner-oral-header {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.examiner-badge {
    font-size: 12px;
    font-weight: 700;
    color: #92400e;
    background: #fef3c7;
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid #fde68a;
}

.examiner-target-text {
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: 0.6px;
}

.examiner-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.examiner-actions .btn-timer {
    padding: 7px 16px;
    font-size: 13.5px;
    background-color: #f59e0b;
    color: #ffffff;
}

.examiner-actions .btn-timer:hover {
    background-color: #d97706;
}

.examiner-actions .btn-timer:disabled {
    background-color: #94a3b8;
    cursor: default;
    opacity: 0.85;
}

.examiner-actions .btn-audio {
    margin-top: 0;
    padding: 7px 14px;
    font-size: 13px;
}

