/**
 * Content Viewer Styles - Debora Design System
 *
 * Styles for standalone content pages: case briefs, flashcards, quizzes, CLE courses.
 * Uses Debora's design system with EB Garamond/Inter typography and burgundy primary.
 */

@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:wght@400;500;600;700&family=Inter:wght@400;500;600;700&display=swap');

/* ==========================================================================
   CSS Variables - Debora Design System
   ========================================================================== */

:root {
    /* Primary Colors - Debora Burgundy */
    --color-primary: #9A2C38;
    --color-primary-light: #B8404E;
    --color-primary-dark: #7A222C;
    --color-primary-tint: #F9E8EA;
    --color-primary-glow: rgba(154, 44, 56, 0.15);

    /* Text Colors */
    --color-text-primary: #001722;
    --color-text-secondary: #464F57;
    --color-text-tertiary: #7E878E;
    --color-text-muted: #A0A7AE;

    /* Background Colors */
    --color-bg-page: #FAFAF8;
    --color-bg-card: #FFFFFF;
    --color-bg-surface: #F5F5F3;
    --color-bg-hover: rgba(0, 0, 0, 0.04);
    --color-bg-subtle: rgba(0, 0, 0, 0.02);

    /* Border Colors */
    --color-border: #E5E5E3;
    --color-border-light: #ECECEC;

    /* Accent Colors */
    --color-gold: #B8952F;
    --color-success: #16a34a;
    --color-error: #dc2626;

    /* Fonts - Debora Typography */
    --font-heading: 'EB Garamond', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ==========================================================================
   Base Layout
   ========================================================================== */

.content-page {
    font-family: var(--font-body);
    background: var(--color-bg-page);
    color: var(--color-text-primary);
    line-height: 1.6;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

.content-page * {
    box-sizing: border-box;
}

/* ==========================================================================
   Standalone Header - BARBRI Style
   ========================================================================== */

.standalone-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 20px;
    background: white;
    border-bottom: 1px solid var(--color-border-light);
    position: sticky;
    top: 0;
    z-index: 100;
}

.standalone-header .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.standalone-header .brand-logo {
    height: 20px;
    width: auto;
}

.standalone-header .brand-divider {
    width: 1px;
    height: 16px;
    background: var(--color-border);
}

.standalone-header .brand-product {
    font-size: 12px;
    font-weight: 500;
    color: var(--color-text-secondary);
}

.standalone-header .standalone-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.standalone-header .standalone-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    font-size: 13px;
    color: var(--color-text-secondary);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.15s;
}

.standalone-header .standalone-link:hover {
    background: var(--color-bg-surface);
    color: var(--color-text-primary);
}

.standalone-header .standalone-link .material-symbols-outlined {
    font-size: 16px;
}

.standalone-header .visit-site-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-secondary);
    background: none;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.15s;
}

.standalone-header .visit-site-btn:hover {
    background: var(--color-bg-surface);
    color: var(--color-text-primary);
}

.standalone-header .visit-site-btn .material-symbols-outlined {
    font-size: 18px;
}

/* ==========================================================================
   Content Container
   ========================================================================== */

.content-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 32px 24px;
}

.content-container-wide {
    max-width: 900px;
    margin: 0 auto;
    padding: 32px 24px;
}

/* ==========================================================================
   Content Header
   ========================================================================== */

.content-header {
    margin-bottom: 32px;
}

.content-title {
    font-family: var(--font-heading);
    font-size: 32px;
    font-weight: 600;
    color: var(--color-primary);
    margin: 0 0 8px;
    line-height: 1.2;
}

.content-title-large {
    font-size: 36px;
    margin-bottom: 16px;
}

.content-subtitle {
    font-size: 18px;
    color: var(--color-text-secondary);
    margin-bottom: 16px;
}

.content-description {
    font-size: 18px;
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
}

/* ==========================================================================
   Meta Tags & Badges
   ========================================================================== */

.content-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.content-meta-tag {
    background: var(--color-bg-surface);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 14px;
    color: var(--color-text-secondary);
}

.content-meta-tag.landmark {
    background: var(--color-gold);
    color: white;
}

.content-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--color-bg-surface);
    border-radius: 100px;
    font-size: 14px;
    color: var(--color-text-secondary);
}

.content-badge.accent {
    background: var(--color-primary);
    color: white;
}

.content-badge.blue {
    background: #0052CC;
    color: white;
}

/* ==========================================================================
   Topic Tags
   ========================================================================== */

.content-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.content-topic-tag {
    background: var(--color-primary);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

/* ==========================================================================
   Variant Tabs
   ========================================================================== */

.content-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid var(--color-border);
    margin-bottom: 24px;
}

.content-tab {
    padding: 12px 20px;
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    color: var(--color-text-secondary);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.15s;
    text-decoration: none;
}

.content-tab:hover {
    color: var(--color-primary);
}

.content-tab.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

/* ==========================================================================
   Content Card (white background panels)
   ========================================================================== */

.content-card {
    background: white;
    padding: 32px;
    border-radius: 8px;
    border: 1px solid var(--color-border-light);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.content-card p {
    margin-bottom: 16px;
}

.content-card strong {
    color: var(--color-primary);
}

.content-card ul,
.content-card ol {
    margin-left: 24px;
    margin-bottom: 16px;
}

.content-card li {
    margin-bottom: 8px;
}

/* ==========================================================================
   Presenter/Author Card
   ========================================================================== */

.presenter-card {
    display: flex;
    gap: 16px;
    padding: 24px;
    background: var(--color-bg-surface);
    border-radius: 8px;
    margin-bottom: 24px;
}

.presenter-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--color-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 600;
    flex-shrink: 0;
}

.presenter-info h3 {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 4px;
    color: var(--color-primary);
}

.presenter-info p {
    font-size: 14px;
    color: var(--color-text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* ==========================================================================
   Details Grid
   ========================================================================== */

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.detail-item {
    padding: 16px;
    background: white;
    border: 1px solid var(--color-border-light);
    border-radius: 8px;
}

.detail-item label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    color: var(--color-text-tertiary);
    margin-bottom: 4px;
}

.detail-item span {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-primary);
}

/* ==========================================================================
   Jurisdictions List
   ========================================================================== */

.jurisdictions {
    margin-bottom: 24px;
}

.jurisdictions h4 {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 8px;
    color: var(--color-text-secondary);
}

.jurisdiction-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.jurisdiction-tag {
    padding: 4px 8px;
    background: var(--color-bg-surface);
    border-radius: 4px;
    font-size: 12px;
    color: var(--color-text-secondary);
}

/* ==========================================================================
   Action Section (CTA)
   ========================================================================== */

.action-section {
    padding: 24px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    border-radius: 8px;
    text-align: center;
    color: white;
}

.action-section.completed {
    background: linear-gradient(135deg, #447228 0%, #366020 100%);
}

.action-section h3 {
    font-family: var(--font-heading);
    font-size: 24px;
    margin: 0 0 8px;
}

.action-section p {
    opacity: 0.9;
    margin: 0 0 16px;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: white;
    color: var(--color-primary);
    font-weight: 600;
    border-radius: 4px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.action-section.completed .action-btn {
    color: #447228;
}

/* ==========================================================================
   Progress Bar
   ========================================================================== */

.content-progress-bar {
    background: var(--color-bg-surface);
    height: 8px;
    border-radius: 4px;
    margin: 24px 0;
    overflow: hidden;
}

.content-progress-fill {
    background: var(--color-primary);
    height: 100%;
    transition: width 0.3s ease;
}

/* ==========================================================================
   Counter Text
   ========================================================================== */

.content-counter {
    text-align: center;
    font-size: 14px;
    color: var(--color-text-secondary);
    margin-bottom: 16px;
}

/* ==========================================================================
   Flashcard
   ========================================================================== */

.flashcard {
    perspective: 1000px;
    height: 300px;
    margin-bottom: 24px;
}

.flashcard-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    cursor: pointer;
}

.flashcard.flipped .flashcard-inner {
    transform: rotateY(180deg);
}

.flashcard-front,
.flashcard-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    text-align: center;
    font-size: 18px;
}

.flashcard-front {
    background: white;
    border: 2px solid var(--color-primary);
}

.flashcard-back {
    background: var(--color-primary);
    color: white;
    transform: rotateY(180deg);
}

/* ==========================================================================
   Hint
   ========================================================================== */

.hint-btn {
    background: none;
    border: none;
    color: var(--color-text-secondary);
    font-size: 14px;
    cursor: pointer;
    margin-bottom: 16px;
}

.hint-btn:hover {
    text-decoration: underline;
}

.hint-text {
    background: #FEF3C7;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
    display: none;
}

.hint-text.visible {
    display: block;
}

/* ==========================================================================
   Navigation Buttons
   ========================================================================== */

.nav-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.nav-btn {
    padding: 12px 24px;
    border: 2px solid var(--color-primary);
    background: white;
    color: var(--color-primary);
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.nav-btn:hover {
    background: var(--color-primary);
    color: white;
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.nav-btn.primary {
    background: var(--color-primary);
    color: white;
}

/* ==========================================================================
   Question Card (Quiz)
   ========================================================================== */

.question-card {
    background: white;
    padding: 32px;
    border-radius: 8px;
    border: 1px solid var(--color-border-light);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    margin-bottom: 24px;
}

.question-text {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 24px;
    color: var(--color-text-primary);
}

.answer-option {
    display: block;
    width: 100%;
    padding: 16px;
    margin-bottom: 12px;
    border: 2px solid var(--color-border);
    border-radius: 4px;
    background: white;
    text-align: left;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.15s;
}

.answer-option:hover:not(.selected):not(.correct):not(.incorrect) {
    border-color: var(--color-primary);
    background: var(--color-bg-surface);
}

.answer-option.selected {
    border-color: var(--color-primary);
    background: rgba(42, 84, 136, 0.1);
}

.answer-option.correct {
    border-color: #447228;
    background: rgba(68, 114, 40, 0.1);
}

.answer-option.incorrect {
    border-color: #D44400;
    background: rgba(212, 68, 0, 0.1);
}

/* ==========================================================================
   Explanation
   ========================================================================== */

.explanation {
    background: #FEF3C7;
    padding: 16px;
    border-radius: 8px;
    margin-top: 16px;
    display: none;
}

.explanation.visible {
    display: block;
}

.explanation-title {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--color-text-primary);
}

/* ==========================================================================
   Score Card
   ========================================================================== */

.score-card {
    background: white;
    padding: 48px;
    border-radius: 8px;
    border: 1px solid var(--color-border-light);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    text-align: center;
    display: none;
}

.score-card.visible {
    display: block;
}

.score-number {
    font-family: var(--font-heading);
    font-size: 64px;
    font-weight: 600;
    color: var(--color-primary);
}

.score-label {
    font-size: 18px;
    color: var(--color-text-secondary);
    margin-bottom: 24px;
}

/* ==========================================================================
   Instruction Text
   ========================================================================== */

.flip-instruction {
    text-align: center;
    color: var(--color-text-secondary);
    font-size: 14px;
    margin-bottom: 24px;
}

/* ==========================================================================
   Outline Styles
   ========================================================================== */

.outline-nav {
    background: white;
    padding: 24px;
    border-radius: 8px;
    margin-bottom: 32px;
    border: 1px solid var(--color-border-light);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.outline-nav h4 {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 600;
    color: var(--color-primary);
    margin: 0 0 16px;
}

.outline-toc {
    margin: 0;
    padding-left: 24px;
}

.outline-toc li {
    margin-bottom: 8px;
}

.outline-toc a {
    color: var(--color-primary);
    text-decoration: none;
    font-size: 15px;
}

.outline-toc a:hover {
    text-decoration: underline;
}

.outline-section {
    margin-bottom: 32px;
    scroll-margin-top: 24px;
}

.outline-section-title {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 600;
    color: var(--color-primary);
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.outline-section-number {
    color: var(--color-primary);
    font-weight: 600;
}

/* ==========================================================================
   Key Term Styles
   ========================================================================== */

.term-section {
    margin-bottom: 24px;
}

.term-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0 0 12px;
}

.term-section-title .material-symbols-outlined {
    color: var(--color-primary);
    font-size: 20px;
}

.example-card {
    background: #FEF3C7;
    border-left: 4px solid var(--color-gold);
}

.related-cases {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.related-case-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: white;
    border-radius: 8px;
    border: 1px solid var(--color-border-light);
    font-size: 15px;
    color: var(--color-text-primary);
}

.related-case-card .material-symbols-outlined {
    color: var(--color-primary);
    font-size: 20px;
}

/* ==========================================================================
   Tab Content Visibility
   ========================================================================== */

.tab-content[hidden] {
    display: none;
}

/* ==========================================================================
   Video Section
   ========================================================================== */

.video-section {
    margin-bottom: 32px;
}

.video-section h3 {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 600;
    color: var(--color-primary);
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.video-section h3 .material-symbols-outlined {
    font-size: 24px;
}

.video-placeholder {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 8px;
    padding: 48px;
    text-align: center;
    color: white;
}

.video-placeholder .play-icon {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.video-placeholder .play-icon .material-symbols-outlined {
    font-size: 32px;
}

.video-placeholder p {
    margin: 0;
    font-size: 14px;
    opacity: 0.8;
}
