/* ── Quiz Portal — immersive 3-panel layout ─────────────── */

/* Shell */
.qp-shell {
    display: flex;
    height: 100vh;
    overflow: hidden;
    font-family: inherit;
}

/* ── Left sidebar ──────────────────────────────────────── */
.qp-sidebar {
    width: 240px;
    flex-shrink: 0;
    background: #f5ede0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 16px 20px;
    position: relative;
    overflow: hidden;
}

.qp-sidebar-logo {
    width: 100%;
    display: flex;
    justify-content: flex-start;
    margin-bottom: 24px;
}

.qp-logo-img {
    height: 42px;
    object-fit: contain;
}

.qp-sidebar-welcome {
    width: 100%;
    margin-bottom: 12px;
}

.qp-welcome-text {
    font-size: 1rem;
    color: #3a2a1a;
    line-height: 1.5;
    margin: 0;
}

.qp-africa-map {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    opacity: 0.18;
    pointer-events: none;
}

.qp-map-img {
    width: 160px;
    height: auto;
}

/* Question circles */
.qp-q-circles {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding-bottom: 8px;
}

.qp-q-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid #c8a882;
    background: transparent;
    color: #5a3e28;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.18s;
}

.qp-q-circle:hover {
    border-color: #c85a1a;
    color: #c85a1a;
}

.qp-q-circle.current {
    background: #2d1c0e;
    border-color: #2d1c0e;
    color: #fff;
}

.qp-q-circle.answered {
    background: #c85a1a;
    border-color: #c85a1a;
    color: #fff;
}

/* ── Center panel ──────────────────────────────────────── */
.qp-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #fdf8f2;
    overflow-y: auto;
    padding: 0;
}

/* Top bar */
.qp-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 28px 12px;
    gap: 16px;
    border-bottom: 1px solid #ede0ce;
    flex-shrink: 0;
}

.qp-progress-wrap {
    flex: 1;
}

.qp-progress-label {
    font-size: 0.8rem;
    color: #888;
    font-weight: 500;
    margin-bottom: 6px;
}

.qp-progress-track {
    height: 5px;
    background: #e8d9c4;
    border-radius: 4px;
    overflow: hidden;
}

.qp-progress-fill {
    height: 100%;
    background: #c85a1a;
    border-radius: 4px;
    transition: width 0.35s ease;
}

/* Close button */
.qp-btn-close {
    padding: 8px 20px;
    border-radius: 8px;
    border: 2px solid #ddd;
    background: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.18s;
}

.qp-btn-close:hover {
    border-color: #c85a1a;
    color: #c85a1a;
}

/* Question card */
.qp-question-card {
    margin: 24px 28px 16px;
    border: 2px solid #c85a1a;
    border-radius: 12px;
    padding: 28px 28px;
    background: #fff;
    flex-shrink: 0;
}

.qp-question-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.6;
    text-align: center;
}

/* Options */
.qp-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 28px;
    flex-shrink: 0;
}

.qp-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-radius: 50px;
    border: none;
    background: #1e1208;
    color: #f0e6d6;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: background 0.18s, transform 0.12s;
}

.qp-option:hover {
    background: #2f1e0e;
    transform: translateX(3px);
}

.qp-option--selected {
    background: #c85a1a !important;
    color: #fff !important;
}

.qp-option-letter {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.qp-option--selected .qp-option-letter {
    border-color: rgba(255,255,255,0.6);
}

.qp-option-text {
    flex: 1;
}

/* Bottom nav bar */
.qp-nav-bar {
    margin-top: auto;
    padding: 16px 28px;
    border-top: 1px solid #ede0ce;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-shrink: 0;
}

.qp-nav-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.qp-btn-prev {
    padding: 10px 22px;
    border-radius: 8px;
    border: none;
    background: #e8d9c4;
    color: #5a3e28;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.18s;
}

.qp-btn-prev:hover:not(:disabled) {
    background: #d4c4aa;
}

.qp-btn-prev:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.qp-btn-next {
    padding: 12px 32px;
    border-radius: 10px;
    border: none;
    background: #c85a1a;
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.18s, box-shadow 0.18s;
    margin-left: auto;
}

.qp-btn-next:hover {
    background: #a8480f;
    box-shadow: 0 6px 18px rgba(200,90,26,0.35);
}

.qp-btn-submit {
    padding: 12px 28px;
    border-radius: 10px;
    border: none;
    background: #48bb78;
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.18s, box-shadow 0.18s;
    margin-left: auto;
    display: flex;
    align-items: center;
}

.qp-btn-submit:hover:not(:disabled) {
    background: #38a169;
    box-shadow: 0 6px 18px rgba(72,187,120,0.35);
}

.qp-btn-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.qp-ad {
    text-align: center;
}

/* Loading / empty states */
.qp-loading, .qp-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    text-align: center;
    color: #5a3e28;
}

.qp-loading .spinner-border {
    width: 3rem;
    height: 3rem;
    color: #c85a1a;
}

.qp-empty-icon {
    font-size: 3.5rem;
    color: #c85a1a;
    margin-bottom: 1rem;
}

/* ── Right culture panel ───────────────────────────────── */
.qp-culture-panel {
    width: 280px;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
}

.qp-culture-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

/* ── Submit modal ──────────────────────────────────────── */
.qp-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    padding: 1rem;
}

.qp-modal {
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}

.qp-modal-title {
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 1rem;
}

.qp-modal-warn {
    background: #fed7d7;
    border-left: 4px solid #fc8181;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    color: #742a2a;
    font-size: 0.9rem;
    margin-top: 0.75rem;
}

.qp-modal-ok {
    background: #c6f6d5;
    border-left: 4px solid #48bb78;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    color: #22543d;
    font-size: 0.9rem;
    margin-top: 0.75rem;
}

.qp-modal-footer {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 900px) {
    .qp-culture-panel {
        display: none;
    }
    .qp-sidebar {
        width: 180px;
    }
}

@media (max-width: 600px) {
    .qp-shell {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }
    .qp-sidebar {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        height: auto;
        padding: 12px 16px;
        justify-content: space-between;
    }
    .qp-sidebar-logo { width: auto; margin-bottom: 0; }
    .qp-sidebar-welcome { display: none; }
    .qp-africa-map { display: none; }
    .qp-q-circles { flex: 1; justify-content: flex-end; padding: 0; }
    .qp-center { overflow-y: visible; }
    .qp-question-card { margin: 16px; padding: 18px; }
    .qp-options { padding: 0 16px; }
    .qp-top-bar { padding: 12px 16px; }
    .qp-nav-bar { padding: 12px 16px; }
}
