/* css/tef_section_a_method.css - TEF Canada Section A Methodology & Practice Styles */

.tef-section-a-course {
    max-width: 1200px;
    margin: 20px auto 40px;
    padding: 0 15px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #2c3e50;
}

/* Formal Register Badge & Explicit High-Contrast White Text Helpers */
.formal-register-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #004d99;
    color: #ffffff !important;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    box-shadow: 0 2px 4px rgba(0, 77, 153, 0.15);
}

.formal-register-badge i {
    font-size: 0.95rem;
    color: #ffffff !important;
}

/* Force pure white text & white icons on all solid primary dark blue elements */
.tef-section-a-course .badge.text-white,
.tef-section-a-course .badge[style*="#004d99"],
.tef-section-a-course .badge.bg-primary,
.tef-section-a-course .badge.bg-dark,
.tef-section-a-course .badge.bg-success,
.tef-section-a-course .badge.bg-danger,
.tef-section-a-course .badge.bg-secondary {
    color: #ffffff !important;
}

.tef-section-a-course .btn[style*="#004d99"],
.tef-section-a-course button[style*="#004d99"],
.tef-section-a-course .btn-primary {
    color: #ffffff !important;
}

.tef-section-a-course .btn[style*="#004d99"] i,
.tef-section-a-course button[style*="#004d99"] i,
.tef-section-a-course .btn-primary i {
    color: #ffffff !important;
}

/* Header & Banner - Matching TEF Canada Card Style */
.section-a-hero {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.75rem 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    border-left: 5px solid #004d99;
}

.section-a-hero-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 12px;
}

.section-a-hero h1 {
    color: #004d99 !important;
    font-size: 1.8rem;
    margin: 0 0 8px 0;
    font-weight: 700;
    letter-spacing: normal;
    text-shadow: none;
}

.section-a-hero p {
    color: #334155 !important;
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    text-shadow: none;
}

.section-a-hero strong {
    color: #004d99 !important;
    font-weight: 700;
}

/* Navigation Grid / Module Selector */
.module-nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.module-nav-card {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.module-nav-card:hover {
    border-color: #0d6efd;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.1);
}

.module-nav-card.active {
    border-color: #0d6efd;
    background: #f0f7ff;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.15);
}

.module-nav-card.completed .module-status-icon {
    color: #198754;
}

.module-icon-box {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #eef4ff;
    color: #0d6efd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.module-nav-info {
    flex: 1;
    min-width: 0;
}

.module-nav-info h4 {
    margin: 0 0 2px 0;
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.module-nav-info p {
    margin: 0;
    font-size: 0.8rem;
    color: #6c757d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Module Content Card */
.section-a-module-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.module-header {
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 16px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.module-header h2 {
    margin: 0;
    font-size: 1.45rem;
    color: #1e293b;
}

/* Category Cheat Sheet Grid */
.category-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.question-category-card {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 16px;
    position: relative;
}

.question-category-card.active-cat {
    border-color: #0d6efd;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.1);
}

.category-badge {
    display: inline-block;
    background: #2563eb;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 2px 10px;
    border-radius: 12px;
    margin-bottom: 8px;
}

.category-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: #0f172a;
}

.category-purpose {
    font-size: 0.88rem;
    color: #475569;
    margin-bottom: 12px;
    line-height: 1.4;
}

.canonical-list {
    list-style: none;
    padding: 0;
    margin: 0 0 12px 0;
}

.canonical-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 8px;
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.canonical-fr {
    font-weight: 500;
    color: #1e293b;
}

.canonical-en {
    font-size: 0.82rem;
    color: #64748b;
    font-style: italic;
}

.item-actions {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

/* Persona Panel */
.persona-context-panel {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 20px;
}

.persona-panel-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.persona-panel-title h4 {
    margin: 0;
    font-size: 1.1rem;
    color: #166534;
}

.persona-field-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.persona-field-item {
    background: #ffffff;
    border: 1px solid #dcfce7;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.85rem;
}

.persona-field-item strong {
    color: #14532d;
}

/* Question Route Planner */
.question-route-planner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 16px;
}

@media (max-width: 868px) {
    .question-route-planner {
        grid-template-columns: 1fr;
    }
}

.planner-ad-card {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 18px;
}

.planner-ad-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
}

.planner-ad-text {
    background: #ffffff;
    border-left: 4px solid #0d6efd;
    padding: 12px 14px;
    font-size: 0.95rem;
    border-radius: 0 8px 8px 0;
    margin-bottom: 14px;
    line-height: 1.5;
}

.planner-slots-card {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 18px;
}

.planner-slot-item {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.planner-slot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.planner-slot-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.9rem;
    box-sizing: border-box;
}

.planner-warning {
    background: #fff3cd;
    color: #856404;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Flexbox Grid Utilities Fallback */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -0.75rem;
    margin-left: -0.75rem;
}

.col-md-6 {
    flex: 0 0 auto;
    width: 50%;
    padding-right: 0.75rem;
    padding-left: 0.75rem;
    box-sizing: border-box;
}

.col-lg-4 {
    flex: 0 0 auto;
    width: 33.33333333%;
    padding-right: 0.75rem;
    padding-left: 0.75rem;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .col-md-6, .col-lg-4 {
        width: 100%;
    }
}

/* Accordion Component Fallback */
.accordion-item {
    background-color: #fff;
    border: 1px solid rgba(0, 0, 0, 0.125);
}

.accordion-button {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    color: #212529;
    text-align: left;
    background-color: #fff;
    border: 0;
    border-radius: 0;
    overflow-anchor: none;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out, border-radius 0.15s ease;
    cursor: pointer;
}

.accordion-button:not(.collapsed) {
    color: #0c63e4;
    background-color: #e7f1ff;
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.125);
}

.accordion-collapse {
    display: none;
}

.accordion-collapse.show {
    display: block;
}

.accordion-body {
    padding: 1rem 1.25rem;
}

/* Dialogue & Scenarios */
#scenario-selection-grid {
    display: flex;
    flex-wrap: wrap;
    margin-right: -0.75rem;
    margin-left: -0.75rem;
}

.section-a-dialogue {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
    max-height: 480px;
    overflow-y: auto;
    padding-right: 6px;
}

.dialogue-bubble {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 12px;
    line-height: 1.5;
    font-size: 0.95rem;
    position: relative;
}

.dialogue-bubble.examiner {
    align-self: flex-start;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    color: #0f172a;
    border-bottom-left-radius: 2px;
}

.dialogue-bubble.examiner .dialogue-speaker {
    color: #475569;
}

.dialogue-bubble.candidate {
    align-self: flex-end;
    background: #e7f1ff;
    border: 1px solid #b6d4fe;
    color: #003366;
    border-bottom-right-radius: 2px;
    font-weight: 500;
}

.dialogue-bubble.candidate * {
    color: #003366 !important;
}

.dialogue-bubble.candidate .dialogue-speaker {
    color: #004d99 !important;
}

.dialogue-speaker {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.dialogue-translation {
    font-size: 0.82rem;
    margin-top: 6px;
    opacity: 0.85;
    font-style: italic;
}

/* Speech Check Result */
.speech-check-result {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 16px;
    margin-top: 12px;
}

.match-percentage-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 16px;
    font-weight: 700;
    font-size: 0.85rem;
}

.match-high { background: #d1e7dd; color: #0f5132; }
.match-med { background: #fff3cd; color: #664d03; }
.match-low { background: #f8d7da; color: #842029; }

/* Navigation Grid / Module Selector - Cleaner spacing */
.module-nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    margin-bottom: 2rem;
}

.module-nav-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.module-nav-card:hover {
    border-color: #004d99;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 77, 153, 0.08);
}

.module-nav-card.active {
    border-color: #004d99;
    background: #f0f7ff;
    box-shadow: 0 4px 12px rgba(0, 77, 153, 0.12);
}

.module-icon-box {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: #eef4ff;
    color: #004d99;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

/* Module Content Card - Clean, spacious cards */
.section-a-module-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.module-header {
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.module-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #004d99;
    font-weight: 700;
}

/* Control Buttons & Controls - Aligned with TEF Canada button standards */
.btn-primary-a {
    background: #004d99;
    color: #ffffff;
    border: none;
    padding: 0.65rem 1.4rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary-a:hover {
    background: #003366;
    color: #ffffff;
}

.btn-secondary-a {
    background: #64748b;
    color: #ffffff;
    border: none;
    padding: 0.55rem 1.2rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-secondary-a:hover {
    background: #475569;
}

.btn-outline-a {
    background: transparent;
    border: 1px solid #004d99;
    color: #004d99;
    padding: 0.5rem 1.1rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-outline-a:hover {
    background: #f0f7ff;
}

.tts-controls {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.tts-speed-select {
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    font-size: 0.82rem;
}

/* Quiz Option Card */
.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.quiz-option-btn {
    text-align: left;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.92rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quiz-option-btn:hover {
    border-color: #0d6efd;
    background: #f8fafc;
}

.quiz-option-btn.correct {
    background: #d1e7dd;
    border-color: #0f5132;
    color: #0f5132;
    font-weight: 600;
}

.quiz-option-btn.incorrect {
    background: #f8d7da;
    border-color: #842029;
    color: #842029;
}
