/* public/css/tutorial.css */
/* Styles for: spotlight overlay, tutorial.html debate UI, first-login banner, tutorial badge */

/* ── Guide callout box ───────────────────────────────────────────────────── */

.tut-guide-box {
    background: color-mix(in srgb, var(--gold-primary) 8%, transparent);
    border-left: 3px solid var(--gold-primary);
    border-radius: 0 6px 6px 0;
    padding: 0.65rem 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 1.25rem;
}

.tut-guide-label {
    font-weight: 700;
    color: var(--gold-primary);
    margin-right: 0.4rem;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

/* ── Spotlight Overlay ───────────────────────────────────────────────────── */

#tut-spotlight-root {
    position: fixed;
    inset: 0;
    z-index: 9000;
    pointer-events: none;
}

.tut-panel {
    position: absolute;
    background: rgba(0, 0, 0, 0.78);
    pointer-events: all;
    transition: all 0.25s ease;
}

.tut-tooltip {
    position: absolute;
    width: 320px;
    background: var(--bg-surface);
    border: 1px solid var(--border-accent);
    border-radius: 8px;
    padding: 1.1rem 1.25rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
    pointer-events: all;
    z-index: 9001;
    transition: top 0.25s ease, left 0.25s ease;
}

.tut-progress {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gold-primary);
    margin-bottom: 0.4rem;
}

.tut-title {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
}

.tut-body {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin: 0 0 1rem;
}

.tut-body code {
    background: var(--bg-elevated);
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    font-size: 0.8rem;
    color: var(--gold-primary);
}

.tut-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tut-nav-btns {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.tut-back-btn {
    background: none;
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    border-radius: 6px;
    padding: 0.45rem 0.9rem;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.tut-back-btn:hover { border-color: var(--border-accent); color: var(--text-primary); }

.tut-exit-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
}

.tut-exit-btn:hover { color: var(--text-secondary); }

.tut-next-btn {
    padding: 0.45rem 1.1rem;
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    border: none;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}

.tut-next-btn:hover { background: var(--btn-primary-hover); }

.tut-next-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* ── First-Login Banner ───────────────────────────────────────────────────── */

#tutorial-banner {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.7rem 1.5rem;
    background: var(--gold-subtle);
    border-bottom: 1px solid var(--gold-dim);
    font-size: 0.875rem;
}

#tutorial-banner.visible {
    display: flex;
}

.tutorial-banner-text {
    color: var(--text-primary);
}

.tutorial-banner-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-shrink: 0;
}

.tutorial-banner-btn {
    padding: 0.35rem 0.9rem;
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    border: none;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

.tutorial-banner-dismiss {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.tutorial-banner-dismiss:hover { color: var(--text-secondary); }

/* ── Tutorial Mode Badge (on tutorial.html) ──────────────────────────────── */

.tutorial-mode-badge {
    position: fixed;
    top: 60px;
    right: 1rem;
    background: var(--gold-subtle);
    border: 1px solid var(--gold-dim);
    color: var(--gold-primary);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.3rem 0.7rem;
    border-radius: 4px;
    z-index: 100;
}

/* ── Tutorial Debate UI (tutorial.html Phase 2) ──────────────────────────── */

#tutorial-main {
    max-width: 820px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.tut-debate-header {
    margin-bottom: 1.5rem;
}

.tut-topic {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.tut-status-bar {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 0.75rem 1.25rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    font-size: 0.85rem;
    flex-wrap: wrap;
}

.tut-status-item { display: flex; align-items: center; gap: 0.4rem; }
.tut-status-label { color: var(--text-muted); text-transform: uppercase; font-size: 0.72rem; letter-spacing: 0.05em; }
.tut-status-value { font-weight: 600; color: var(--text-primary); }

.tut-phase-label {
    font-family: 'Playfair Display', serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--gold-primary);
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-subtle);
}

.tut-section {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.tut-section-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.tut-qa-block { padding: 0.75rem 1rem; }
.tut-qa-q { font-size: 0.875rem; color: var(--text-secondary); margin-bottom: 0.3rem; }
.tut-qa-a { font-size: 0.875rem; color: var(--text-primary); }

.tut-text-input {
    width: 100%;
    padding: 0.65rem 0.9rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    box-sizing: border-box;
}
.tut-text-input:focus { outline: none; border-color: var(--border-accent); }

.tut-text-content {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-primary);
    white-space: pre-wrap;
}

.tut-textarea {
    width: 100%;
    min-height: 180px;
    padding: 0.9rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.95rem;
    line-height: 1.6;
    resize: vertical;
    box-sizing: border-box;
}

.tut-textarea:focus {
    outline: none;
    border-color: var(--gold-dim);
}

.tut-word-count {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.4rem;
    text-align: right;
}

.tut-word-count.over { color: var(--color-danger); }

.tut-btn {
    padding: 0.65rem 1.5rem;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.tut-btn-primary {
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
}
.tut-btn-primary:hover { background: var(--btn-primary-hover); }
.tut-btn-primary:disabled { opacity: 0.45; cursor: not-allowed; }

.tut-btn-secondary {
    background: var(--btn-secondary-bg);
    border: 1px solid var(--btn-secondary-border);
    color: var(--btn-secondary-text);
}
.tut-btn-secondary:hover { border-color: var(--btn-secondary-hover-border); }

.tut-actions-row {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-top: 1rem;
    flex-wrap: wrap;
}

/* Cross-exam answer buttons */
.tut-answer-row {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.tut-answer-btn {
    padding: 0.5rem 1.25rem;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-elevated);
    color: var(--text-primary);
    transition: all 0.15s ease;
}

.tut-answer-btn:hover {
    border-color: var(--gold-dim);
    background: var(--bg-hover);
}

.tut-answer-btn.selected {
    background: var(--gold-subtle);
    border-color: var(--gold-primary);
    color: var(--gold-primary);
}

/* Inline hint */
.tut-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.4rem;
    font-style: italic;
}

/* AI typing animation */
.tut-typing {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    padding: 1rem 0;
}

.tut-typing-dots {
    display: flex;
    gap: 4px;
}

.tut-typing-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-muted);
    animation: tut-dot-bounce 1.2s infinite;
}

.tut-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.tut-typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes tut-dot-bounce {
    0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
    40% { transform: translateY(-6px); opacity: 1; }
}

/* Judging animation */
.tut-judging {
    text-align: center;
    padding: 3rem 1.5rem;
}

.tut-judging-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border-subtle);
    border-top-color: var(--gold-primary);
    border-radius: 50%;
    animation: tut-spin 0.9s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes tut-spin { to { transform: rotate(360deg); } }

/* Results */
.tut-verdict-banner {
    text-align: center;
    padding: 2rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    margin-bottom: 1.5rem;
}

.tut-verdict-winner {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--gold-primary);
    margin-bottom: 0.5rem;
}

.tut-verdict-reasoning {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 560px;
    margin: 0 auto;
}

.tut-scores-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.tut-score-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    padding: 1rem;
    text-align: center;
}

.tut-score-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.tut-score-values {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 700;
}

.tut-score-pro { color: var(--color-success); }
.tut-score-con { color: var(--color-danger); }

.tut-cta-section {
    text-align: center;
    padding: 2rem;
    background: var(--bg-surface);
    border: 1px solid var(--gold-dim);
}

.tut-cta-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.tut-cta-btn {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.75rem 2rem;
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    border: none;
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s ease;
}

.tut-cta-btn:hover { background: var(--btn-primary-hover); }

/* Loading state for whole page */
#tutorial-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    color: var(--text-muted);
    font-size: 0.9rem;
}
