/* ============================================
   CHEAT-SHEET.CSS - Python Cheat Sheet Page Styles
   ============================================ */

/* Page-specific overrides for scrollable reference document */
html, body {
    overflow-y: auto !important;
    height: auto !important;
}

body {
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    min-height: 100vh;
    padding: 2rem;
}

/* ============================================
   DOCUMENT CONTAINER
   ============================================ */
.coverage-document {
    max-width: 1400px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 3rem;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.15);
}

.document-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #ede9fe;
}

.document-header h1 {
    font-size: 42px;
    color: #5b21b6;
    margin-bottom: 1rem;
    font-weight: 700;
}

/* ============================================
   SEARCH TIP BOX
   ============================================ */
.search-tip {
    background: rgba(139, 92, 246, 0.1);
    border-left: 4px solid #8b5cf6;
    padding: 2rem;
    margin: 2rem 0;
    border-radius: 8px;
    font-size: 1.1rem;
    line-height: 1.8;
}

.search-tip strong {
    color: #5b21b6;
    font-size: 1.1rem;
}

/* ============================================
   LESSON SECTIONS
   ============================================ */
.lesson-section {
    background: white;
    border-radius: 12px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.08);
    border: 1px solid rgba(139, 92, 246, 0.1);
    max-width: 100%;
    overflow-x: auto;
}

.lesson-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #ede9fe;
}

.lesson-number-badge {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
}

.lesson-title {
    font-size: 32px;
    color: #5b21b6;
    margin: 0;
    font-weight: 700;
}

/* ============================================
   LESSON CONTENT
   ============================================ */
.lesson-content h3 {
    color: #5b21b6;
    font-size: 22px;
    margin: 1.5rem 0 1rem 0;
    font-weight: 600;
    background: rgba(139, 92, 246, 0.08);
    padding: 1rem;
    border-radius: 8px;
}

.lesson-content h4 {
    color: #475569;
    font-size: 18px;
    margin: 1.2rem 0 0.8rem 0;
    font-weight: 600;
    background: rgba(251, 191, 36, 0.08);
    padding: 0.8rem;
    border-radius: 6px;
}

.lesson-content p {
    color: #475569;
    line-height: 1.7;
    margin: 0.8rem 0;
}

.lesson-content ul {
    margin: 1rem 0 1rem 2rem;
    color: #475569;
}

.lesson-content li {
    margin: 0.5rem 0;
    line-height: 1.6;
}

.lesson-content > p:first-of-type {
    background: rgba(59, 130, 246, 0.08);
    padding: 1rem;
    border-radius: 8px;
}

/* ============================================
   CODE BLOCKS
   ============================================ */
.code-block {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    line-height: 1.7;
    white-space: pre;
    max-width: 90%;
}

.code-block .comment {
    color: #6a9955;
}

.code-block .keyword {
    color: #569cd6;
}

.code-block .string {
    color: #ce9178;
}

/* ============================================
   MISTAKES TABLE
   ============================================ */
.mistakes-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    background: white;
    display: block;
    overflow-x: auto;
}

.mistakes-table tbody,
.mistakes-table thead {
    display: table;
    width: 100%;
    table-layout: fixed;
}

.mistakes-table td,
.mistakes-table th {
    word-wrap: break-word;
}

.mistakes-table th {
    background: #f8fafc;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    border: 1px solid #e2e8f0;
    color: #1e293b;
}

.mistakes-table td {
    padding: 1rem;
    border: 1px solid #e2e8f0;
    color: #475569;
    vertical-align: top;
}

.mistakes-table tr:hover {
    background: #f8fafc;
}

/* ============================================
   CALLOUT BOXES
   ============================================ */
.ready-box {
    background: rgba(16, 185, 129, 0.1);
    border-left: 4px solid #10b981;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 8px;
}

.ready-box h4 {
    color: #065f46;
    margin: 0 0 0.5rem 0;
}

.ready-box ul {
    margin: 0.5rem 0 0 1.5rem;
    color: #065f46;
}

.highlight-box {
    background: rgba(251, 191, 36, 0.1);
    border-left: 4px solid #f59e0b;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 6px;
}

.highlight-box strong {
    color: #92400e;
}

/* ============================================
   TABLE OF CONTENTS
   ============================================ */
.toc {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.08);
}

.toc h2 {
    color: #5b21b6;
    margin-bottom: 1rem;
}

.toc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 0.5rem;
}

.toc-link {
    color: #7c3aed;
    text-decoration: none;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.2s;
    display: block;
}

.toc-link:hover {
    background: rgba(139, 92, 246, 0.1);
    transform: translateX(4px);
}

/* ============================================
   EXAM BOARD BADGES
   ============================================ */
.exam-badges {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.exam-badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
}

.exam-badge.aqa {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.exam-badge.ocr {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.exam-badge.edexcel {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

/* ============================================
   FLOATING NAVIGATION
   ============================================ */
.floating-menu-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
    z-index: 1000;
    transition: all 0.3s;
    color: white;
    font-size: 28px;
}

.floating-menu-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(139, 92, 246, 0.6);
}

.floating-nav-panel {
    position: fixed;
    right: -350px;
    top: 0;
    width: 320px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: -2px 0 20px rgba(139, 92, 246, 0.15);
    transition: right 0.3s ease;
    z-index: 999;
    padding: 2rem;
    overflow-y: auto;
}

.floating-nav-panel.active {
    right: 0;
}

.floating-nav-header {
    font-size: 20px;
    font-weight: 600;
    color: #5b21b6;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #ede9fe;
}

.floating-nav-item {
    padding: 0.75rem;
    margin: 0.5rem 0;
    border-radius: 8px;
    cursor: pointer;
    display: block;
    color: #475569;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.floating-nav-item:hover {
    background: #f5f3ff;
    color: #7c3aed;
    transform: translateX(-5px);
}

.floating-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: none;
    z-index: 998;
}

.floating-overlay.active {
    display: block;
}

/* ============================================
   MENU ITEMS
   ============================================ */
.menu-item {
    display: block;
    padding: 1rem;
    margin: 0.5rem 0;
    border-radius: 8px;
    color: #475569;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
}

.menu-item:hover {
    background: #f5f3ff;
    color: #7c3aed;
}

/* ============================================
   TEACHER GUIDE SPECIFIC STYLES
   ============================================ */

/* Header spacing for fixed nav */
.header-spacing {
    height: 70px;
}

/* Document subtitle */
.document-subtitle {
    font-size: 20px;
    color: #64748b;
    margin-bottom: 1rem;
}

/* Section header wrapper */
.section-header-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Section icons with different colors */
.section-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 24px;
    color: white;
}

.section-icon-purple { background: #8b5cf6; }
.section-icon-green { background: #10b981; }
.section-icon-amber { background: #f59e0b; }
.section-icon-pink { background: #ec4899; }
.section-icon-cyan { background: #06b6d4; }
.section-icon-red { background: #ef4444; }

/* Document footer */
.document-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #ede9fe;
    text-align: center;
    color: #64748b;
}

.document-footer p {
    margin-bottom: 1rem;
}

.document-footer .footer-title {
    font-size: 18px;
}

.document-footer .footer-subtitle {
    font-size: 16px;
}

.document-footer .footer-links {
    font-size: 14px;
    margin-top: 1rem;
}

.footer-brand {
    color: #5b21b6;
    font-weight: bold;
}

.footer-link {
    color: #8b5cf6;
    text-decoration: none;
}

.footer-link:hover {
    text-decoration: underline;
}

/* ============================================
   MOBILE RESPONSIVE - CHEAT SHEET
   ============================================ */
@media (max-width: 768px) {
    body {
        padding: 1rem;
    }

    .coverage-document {
        padding: 1.5rem;
    }

    .document-header h1 {
        font-size: 32px;
    }

    .section-title {
        font-size: 24px;
    }

    .subsection-title {
        font-size: 20px;
    }

    /* Make code blocks scrollable on mobile */
    .code-block,
    .example-code {
        overflow-x: auto;
        font-size: 14px;
    }

    /* Stack any multi-column layouts */
    .cheat-grid,
    .syntax-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

@media (max-width: 600px) {
    body {
        padding: 0.5rem;
    }

    .coverage-document {
        padding: 1rem;
        border-radius: 8px;
    }

    .document-header h1 {
        font-size: 28px;
    }

    .section-title {
        font-size: 22px;
    }

    .code-block,
    .example-code {
        font-size: 13px;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    body {
        background: white;
    }

    .coverage-document {
        box-shadow: none;
    }

    .nav-link,
    .floating-menu-btn,
    .floating-nav-panel {
        display: none;
    }
}
