/**
 * Frontend Student Quiz Styling for Jobtheta Quiz Maker
 */
.jobtheta-quiz-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: #1e293b;
    max-width: 960px;
    margin: 20px auto;
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.jobtheta-quiz-header {
    background: #0f172a;
    color: #fff;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #2563eb;
}

.jobtheta-quiz-header h2 {
    color: #fff;
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.jobtheta-timer-box {
    background: #1e293b;
    border: 1px solid #334155;
    padding: 6px 14px;
    border-radius: 8px;
    font-family: monospace;
    font-size: 16px;
    font-weight: 700;
    color: #38bdf8;
}

.jobtheta-timer-urgent {
    color: #f43f5e !important;
    border-color: #f43f5e !important;
    animation: jobtheta-pulse 1s infinite;
}

@keyframes jobtheta-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.jobtheta-quiz-body {
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .jobtheta-quiz-body {
        flex-direction: row;
    }
}

.jobtheta-question-panel {
    flex: 1;
    padding: 24px;
    border-right: 1px solid #f1f5f9;
}

.jobtheta-palette-panel {
    width: 100%;
    max-width: 280px;
    padding: 20px;
    background: #f8fafc;
    transition: box-shadow 0.2s ease, outline 0.2s ease;
}

/* Question Palette states & responsive grid */
.jobtheta-palette-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-top: 12px;
    max-height: 380px;
    overflow-y: auto;
    padding-right: 2px;
}

.jobtheta-palette-btn {
    width: 100%;
    aspect-ratio: 1;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s ease;
    touch-action: manipulation;
}

/* Responsive Question Palette and Mobile Layout */
@media (max-width: 767px) {
    .jobtheta-quiz-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
        padding: 14px 16px !important;
    }
    .jobtheta-quiz-header > div:last-child {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        gap: 6px;
    }
    .jobtheta-question-panel {
        padding: 16px !important;
        border-right: none !important;
        border-bottom: 1px solid #f1f5f9 !important;
    }
    .jobtheta-palette-panel {
        max-width: 100% !important;
        width: 100% !important;
        padding: 16px !important;
        box-sizing: border-box;
    }
    .jobtheta-palette-grid {
        grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)) !important;
        gap: 6px !important;
        max-height: 280px !important;
    }
    .jobtheta-palette-btn {
        height: 42px !important;
        font-size: 13px !important;
        border-radius: 8px !important;
    }
    .jobtheta-nav-bar {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }
    .jobtheta-nav-bar > div {
        display: flex;
        justify-content: space-between;
        width: 100%;
        gap: 8px;
    }
    .jobtheta-nav-bar .jobtheta-btn {
        flex: 1;
        justify-content: center;
        text-align: center;
        padding: 10px 8px !important;
    }
    .jobtheta-option-card {
        padding: 12px 14px !important;
    }
}

@media (min-width: 768px) {
    .jobtheta-mobile-palette-toggle {
        display: none !important;
    }
}

/* BLUE: Current */
.jobtheta-palette-blue {
    background: #2563eb !important;
    color: #fff !important;
    box-shadow: 0 0 0 2px #93c5fd;
}

/* GREEN: Answered */
.jobtheta-palette-green {
    background: #10b981 !important;
    color: #fff !important;
}

/* ORANGE: Skipped / Visited but unanswered */
.jobtheta-palette-orange {
    background: #f59e0b !important;
    color: #fff !important;
}

/* GRAY: Not visited */
.jobtheta-palette-gray {
    background: #e2e8f0 !important;
    color: #475569 !important;
}

/* Question Content */
.jobtheta-q-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
}

.jobtheta-q-text {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.6;
    margin-bottom: 20px;
    color: #0f172a;
}

.jobtheta-option-card {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    margin-bottom: 10px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 14px;
}

.jobtheta-option-card:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}

.jobtheta-option-card.selected {
    background: #eff6ff;
    border-color: #2563eb;
    color: #1e3a8a;
    font-weight: 600;
}

.jobtheta-option-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: #e2e8f0;
    margin-right: 12px;
    font-weight: 700;
    font-size: 12px;
}

.jobtheta-option-card.selected .jobtheta-option-tag {
    background: #2563eb;
    color: #fff;
}

/* Actions */
.jobtheta-nav-bar {
    display: flex;
    justify-content: space-between;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
}

.jobtheta-btn {
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.15s ease;
}

.jobtheta-btn-primary {
    background: #2563eb;
    color: #fff;
}
.jobtheta-btn-primary:hover {
    background: #1d4ed8;
}

.jobtheta-btn-submit {
    background: #10b981;
    color: #fff;
}
.jobtheta-btn-submit:hover {
    background: #059669;
}

.jobtheta-btn-secondary {
    background: #e2e8f0;
    color: #334155;
}
.jobtheta-btn-secondary:hover {
    background: #cbd5e1;
}

/* PURPLE: Marked for Review */
.jobtheta-palette-purple {
    background: #8b5cf6 !important;
    color: #fff !important;
}

/* Detailed Result Styles */
.jobtheta-result-card {
    padding: 24px;
}

.jobtheta-result-summary {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.jobtheta-opt-highlight-correct {
    background: #d1fae5 !important;
    border-color: #10b981 !important;
    color: #065f46 !important;
    font-weight: 600;
}

.jobtheta-opt-highlight-wrong {
    background: #ffe4e6 !important;
    border-color: #f43f5e !important;
    color: #9f1239 !important;
    font-weight: 600;
}

.jobtheta-explanation-box {
    background: #eff6ff;
    border-left: 4px solid #2563eb;
    padding: 12px 16px;
    border-radius: 6px;
    margin-top: 10px;
    font-size: 13px;
    color: #1e3a8a;
    line-height: 1.6;
}

/* Top 3 Podium Cards */
.jobtheta-podium-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

@media (max-width: 640px) {
    .jobtheta-podium-container {
        grid-template-columns: 1fr;
    }
}

.jobtheta-podium-card {
    border-radius: 14px;
    padding: 16px;
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    transition: transform 0.15s ease;
}

.jobtheta-podium-card:hover {
    transform: translateY(-2px);
}

.jobtheta-podium-gold {
    background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%);
    border: 2px solid #fde68a;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.12);
}

.jobtheta-podium-silver {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border: 2px solid #cbd5e1;
    box-shadow: 0 2px 8px rgba(100, 116, 139, 0.1);
}

.jobtheta-podium-bronze {
    background: linear-gradient(180deg, #fff7ed 0%, #ffedd5 100%);
    border: 2px solid #fed7aa;
    box-shadow: 0 2px 8px rgba(234, 88, 12, 0.1);
}

.jobtheta-podium-avatar {
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

.jobtheta-podium-gold .jobtheta-podium-avatar {
    width: 64px;
    height: 64px;
    border: 3px solid #f59e0b;
}

.jobtheta-podium-silver .jobtheta-podium-avatar {
    width: 52px;
    height: 52px;
    border: 3px solid #94a3b8;
}

.jobtheta-podium-bronze .jobtheta-podium-avatar {
    width: 52px;
    height: 52px;
    border: 3px solid #f97316;
}

/* Solution Filter Pills */
.jobtheta-filter-pill {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #475569;
    transition: all 0.15s ease;
}

.jobtheta-filter-pill:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}

.jobtheta-filter-pill.active {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

/* Print Styles */
@media print {
    body { background: #fff !important; }
    .jobtheta-nav-bar, #jobtheta-tab-switcher, .jobtheta-no-print { display: none !important; }
    .jobtheta-quiz-wrapper, .jobtheta-result-card { box-shadow: none !important; border: none !important; }
}

/* ==========================================================================
   Jobtheta Modern Quiz Portal (v3.1.0) Styles - 100% Visual Parity
   ========================================================================== */

.jobtheta-portal-root {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #1e293b;
    line-height: 1.5;
    box-sizing: border-box;
}

.jobtheta-portal-root *, .jobtheta-portal-root *::before, .jobtheta-portal-root *::after {
    box-sizing: border-box;
}

.jobtheta-portal-gradient-text {
    background: linear-gradient(135deg, #ea580c 0%, #d97706 50%, #f97316 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* Navbar */
.jobtheta-portal-nav {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 40;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.jobtheta-portal-nav-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 16px;
    height: 64px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.jobtheta-portal-nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
    height: 100%;
}

.jobtheta-portal-nav-link {
    color: #475569;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    height: 100%;
    display: inline-flex;
    align-items: center;
    border-bottom: 2px solid transparent;
    transition: all 0.15s ease;
    cursor: pointer;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    padding: 0 4px;
}

.jobtheta-portal-nav-link:hover, .jobtheta-portal-nav-link.active {
    color: #ea580c;
    border-bottom-color: #ea580c;
}

/* Hero Section */
.jobtheta-hero-card {
    background: linear-gradient(135deg, rgba(255, 247, 237, 0.9) 0%, rgba(254, 243, 199, 0.5) 50%, rgba(255, 237, 213, 0.7) 100%);
    border: 1px solid rgba(254, 215, 170, 0.8);
    border-radius: 24px;
    padding: 32px 28px;
    position: relative;
    overflow: hidden;
    margin-bottom: 28px;
    box-shadow: 0 4px 16px -2px rgba(234, 88, 12, 0.05);
}

.jobtheta-hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 800;
    background: rgba(255, 237, 213, 0.95);
    color: #c2410c;
    border: 1px solid #fed7aa;
    margin-bottom: 14px;
}

.jobtheta-hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
    align-items: center;
}

@media (min-width: 992px) {
    .jobtheta-hero-grid {
        grid-template-columns: 7fr 5fr;
    }
}

/* 4 Feature Items */
.jobtheta-feature-pills {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 20px;
}

@media (min-width: 600px) {
    .jobtheta-feature-pills {
        grid-template-columns: repeat(4, 1fr);
    }
}

.jobtheta-feature-pill-item {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #ffedd5;
    border-radius: 14px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.jobtheta-feature-pill-item:hover {
    border-color: #fdba74;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(234, 88, 12, 0.1);
}

/* 3D Scene Graphic */
.jobtheta-cbt-graphic-box {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(254, 215, 170, 0.9);
    border-radius: 20px;
    padding: 18px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
}

.jobtheta-graphic-top {
    background: #0f172a;
    color: #ffffff;
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 12px;
    border: 1px solid #1e293b;
}

.jobtheta-book-spine {
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    padding: 5px 10px;
    border-radius: 6px;
    margin-bottom: 6px;
    letter-spacing: 0.03em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Global Search Bar */
.jobtheta-search-section {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 18px 20px;
    margin-bottom: 28px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.jobtheta-search-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

@media (min-width: 640px) {
    .jobtheta-search-form {
        flex-direction: row;
        align-items: center;
    }
}

.jobtheta-search-input-wrap {
    flex: 1;
    position: relative;
}

.jobtheta-search-input {
    width: 100%;
    padding: 12px 16px 12px 42px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    font-size: 13px;
    outline: none;
    font-weight: 500;
    transition: all 0.15s ease;
}

.jobtheta-search-input:focus {
    background: #fff;
    border-color: #ea580c;
    box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.15);
}

.jobtheta-search-btn {
    background: #ea580c;
    color: #ffffff;
    font-weight: 800;
    font-size: 13px;
    padding: 12px 22px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.15s ease;
    white-space: nowrap;
}

.jobtheta-search-btn:hover {
    background: #c2410c;
}

.jobtheta-cat-tab {
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #fed7aa;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.jobtheta-cat-tab:hover {
    background: #ffedd5;
    border-color: #fdba74;
}

/* 3 Prominent Action Cards */
.jobtheta-action-cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 36px;
}

@media (min-width: 768px) {
    .jobtheta-action-cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.jobtheta-action-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.jobtheta-action-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px -3px rgba(0,0,0,0.07);
}

.jobtheta-action-card-daily:hover { border-color: #fdba74; }
.jobtheta-action-card-weekly:hover { border-color: #93c5fd; }
.jobtheta-action-card-monthly:hover { border-color: #86efac; }

.jobtheta-cal-badge {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

.jobtheta-cal-header {
    width: 100%;
    text-align: center;
    font-size: 8px;
    font-weight: 800;
    color: #fff;
    padding: 2px 0;
    border-top-left-radius: 11px;
    border-top-right-radius: 11px;
    letter-spacing: 0.05em;
}

.jobtheta-btn-card-orange {
    width: 100%;
    background: #ea580c;
    color: #ffffff;
    font-weight: 800;
    font-size: 13px;
    padding: 12px 16px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.15s ease;
    text-decoration: none;
}

.jobtheta-btn-card-orange:hover {
    background: #c2410c;
    color: #ffffff;
}

/* Lower Two Column Section */
.jobtheta-lower-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
    align-items: start;
}

@media (min-width: 992px) {
    .jobtheta-lower-grid {
        grid-template-columns: 7fr 5fr;
    }
}

/* Quiz Item Card */
.jobtheta-portal-quiz-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 12px;
    transition: all 0.15s ease;
}

@media (min-width: 640px) {
    .jobtheta-portal-quiz-item {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.jobtheta-portal-quiz-item:hover {
    border-color: #fdba74;
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.07);
}

/* Category Modal */
.jobtheta-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.jobtheta-modal-container {
    background: #ffffff;
    border-radius: 24px;
    max-width: 680px;
    width: 100%;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    animation: jobthetaModalPop 0.2s ease-out;
}

@keyframes jobthetaModalPop {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.jobtheta-modal-header {
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.jobtheta-modal-body {
    padding: 20px 24px;
    overflow-y: auto;
}

.jobtheta-modal-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all 0.15s ease;
}

@media (min-width: 600px) {
    .jobtheta-modal-card {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.jobtheta-modal-card:hover {
    border-color: #fdba74;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.jobtheta-start-test-btn {
    background: #ea580c;
    color: #ffffff;
    font-weight: 800;
    font-size: 13px;
    padding: 9px 18px;
    border-radius: 10px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    border: none;
    cursor: pointer;
    transition: background 0.15s ease;
}

.jobtheta-start-test-btn:hover {
    background: #c2410c;
    color: #ffffff;
}

@media (max-width: 600px) {
    .jobtheta-start-test-btn {
        width: 100%;
        justify-content: center;
    }
}
