/* CBT - JAMB style, mobile-first, one question per screen */

.aio-cbt-wrapper {
    max-width: 900px;
    margin: 0 auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,.08);
    overflow: hidden;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
}

.aio-cbt-header {
    background: #1e3a8a;
    color: #fff;
    padding: 12px 16px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.aio-cbt-title {
    font-weight: 700;
    font-size: 1rem;
}
.aio-cbt-timer {
    background: rgba(255,255,255,.15);
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    font-size: 1.1rem;
}
.aio-cbt-timer.warning { background: #b45309; }
.aio-cbt-timer.danger  { background: #b91c1c; animation: pulse 1s infinite; }

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.aio-cbt-body {
    flex: 1;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
}

.aio-cbt-question-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-size: 0.9rem;
    color: #64748b;
}
.aio-cbt-qnum {
    font-weight: 700;
    color: #1e40af;
}

.aio-cbt-question-text {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 24px;
    color: #0f172a;
}

.aio-cbt-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}
.aio-cbt-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s;
    background: #f8fafc;
}
.aio-cbt-option:hover {
    border-color: #93c5fd;
    background: #eff6ff;
}
.aio-cbt-option.selected {
    border-color: #1e40af;
    background: #dbeafe;
}
.aio-cbt-option input {
    margin-top: 3px;
    accent-color: #1e40af;
}
.aio-cbt-option-label {
    font-weight: 600;
    min-width: 24px;
}

/* Calculator */
.aio-cbt-calculator {
    position: fixed;
    bottom: 80px;
    right: 16px;
    width: 260px;
    background: #1e293b;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,.3);
    z-index: 200;
    display: none;
    overflow: hidden;
}
.aio-cbt-calculator.open { display: block; }
.aio-calc-display {
    background: #0f172a;
    color: #22c55e;
    font-family: monospace;
    font-size: 1.5rem;
    padding: 16px;
    text-align: right;
    min-height: 56px;
}
.aio-calc-keys {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: #334155;
}
.aio-calc-keys button {
    border: none;
    background: #1e293b;
    color: #fff;
    font-size: 1.1rem;
    padding: 14px 0;
    cursor: pointer;
}
.aio-calc-keys button:hover { background: #334155; }
.aio-calc-keys button.op { background: #0f766e; }
.aio-calc-keys button.eq { background: #1e40af; grid-column: span 2; }

/* Question navigator */
.aio-cbt-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 12px 16px;
    background: #f1f5f9;
    border-top: 1px solid #e2e8f0;
    max-height: 120px;
    overflow-y: auto;
}
.aio-cbt-nav-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.aio-cbt-nav-btn.answered {
    background: #bbf7d0;
    border-color: #22c55e;
}
.aio-cbt-nav-btn.current {
    background: #1e40af;
    color: #fff;
    border-color: #1e40af;
}
.aio-cbt-nav-btn.flagged {
    background: #fef3c7;
    border-color: #f59e0b;
}

/* Footer actions */
.aio-cbt-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 16px;
    background: #fff;
    border-top: 1px solid #e2e8f0;
    justify-content: space-between;
    align-items: center;
}
.aio-cbt-btn {
    padding: 10px 18px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.15s;
}
.aio-cbt-btn-primary {
    background: #1e40af;
    color: #fff;
}
.aio-cbt-btn-primary:hover { background: #1e3a8a; }
.aio-cbt-btn-secondary {
    background: #e2e8f0;
    color: #0f172a;
}
.aio-cbt-btn-danger {
    background: #b91c1c;
    color: #fff;
}
.aio-cbt-btn-calc {
    background: #0f766e;
    color: #fff;
}

/* Anti-cheat warning */
.aio-cbt-warning {
    position: fixed;
    inset: 0;
    background: rgba(185, 28, 28, 0.95);
    color: #fff;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    text-align: center;
    padding: 30px;
    font-size: 1.3rem;
}
.aio-cbt-warning.show { display: flex; flex-direction: column; gap: 16px; }

/* Mobile optimizations */
@media (max-width: 600px) {
    .aio-cbt-question-text { font-size: 1rem; }
    .aio-cbt-option { padding: 12px; }
    .aio-cbt-calculator {
        width: calc(100% - 32px);
        right: 16px;
        left: 16px;
    }
    .aio-cbt-footer {
        flex-direction: column;
        align-items: stretch;
    }
    .aio-cbt-btn { width: 100%; text-align: center; }
}
