/* ═══════════════════════════════════════════════════
   Question Paper Bank — Front-end Styles
   All classes prefixed .qpb- to avoid theme conflicts
   ═══════════════════════════════════════════════════ */

/* ── Paper page ──────────────────────────────────── */
.qpb-paper {
    max-width: 860px;
    margin: 0 auto;
    font-family: inherit;
}

.qpb-paper__header {
    background: #f0f6fc;
    border: 1px solid #c8d8e8;
    border-radius: 6px;
    padding: 20px 24px;
    margin-bottom: 28px;
}

.qpb-paper__header h1 {
    margin: 0 0 10px;
    font-size: 1.5em;
    color: #1a2942;
}

.qpb-paper__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 24px;
    font-size: 0.9em;
    color: #444;
}

.qpb-paper__meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.qpb-instructions {
    background: #fffbea;
    border-left: 4px solid #f0b429;
    padding: 12px 16px;
    margin-bottom: 24px;
    border-radius: 0 4px 4px 0;
    font-size: 0.9em;
    color: #555;
}

.qpb-instructions ol {
    margin: 6px 0 0 18px;
    padding: 0;
}

/* ── Question block ──────────────────────────────── */
.qpb-question {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 18px 20px;
    margin-bottom: 16px;
    background: #fff;
    transition: box-shadow 0.15s;
}

.qpb-question:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.qpb-question__header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
}

.qpb-question__number {
    background: #2271b1;
    color: #fff;
    font-weight: 700;
    font-size: 0.85em;
    padding: 3px 10px;
    border-radius: 12px;
    white-space: nowrap;
    flex-shrink: 0;
}

.qpb-question__marks {
    margin-left: auto;
    background: #f0f0f0;
    color: #555;
    font-size: 0.82em;
    padding: 3px 10px;
    border-radius: 12px;
    white-space: nowrap;
    flex-shrink: 0;
}

.qpb-question__body {
    color: #222;
    font-size: 0.97em;
    line-height: 1.65;
    margin-bottom: 12px;
}

.qpb-question__body img {
    max-width: 100%;
    border-radius: 4px;
    margin-top: 8px;
}

.qpb-view-solution {
    display: inline-block;
    background: #2271b1;
    color: #fff !important;
    text-decoration: none !important;
    padding: 7px 18px;
    border-radius: 4px;
    font-size: 0.88em;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: background 0.15s;
}

.qpb-view-solution:hover {
    background: #135e96 !important;
}

.qpb-no-solution {
    display: inline-block;
    color: #999;
    font-size: 0.85em;
    padding: 7px 0;
    font-style: italic;
}

/* ── Solution page ───────────────────────────────── */
.qpb-solution {
    max-width: 860px;
    margin: 0 auto;
}

.qpb-solution__breadcrumb {
    font-size: 0.88em;
    color: #666;
    margin-bottom: 16px;
}

.qpb-solution__breadcrumb a {
    color: #2271b1;
    text-decoration: none;
}

.qpb-solution__breadcrumb a:hover {
    text-decoration: underline;
}

.qpb-solution__header {
    background: #f0f6fc;
    border: 1px solid #c8d8e8;
    border-radius: 6px;
    padding: 16px 20px;
    margin-bottom: 20px;
}

.qpb-solution__header h2 {
    margin: 0 0 6px;
    font-size: 1.15em;
    color: #1a2942;
}

.qpb-solution__question-text {
    color: #333;
    font-size: 0.95em;
    line-height: 1.6;
}

.qpb-solution__body {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 20px 24px;
    margin-bottom: 24px;
    line-height: 1.75;
    font-size: 0.97em;
}

.qpb-solution__body img {
    max-width: 100%;
    border-radius: 4px;
    margin: 12px 0;
}

.qpb-solution__pdf-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #e8f4fd;
    color: #2271b1;
    padding: 10px 18px;
    border-radius: 4px;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 0.9em;
    border: 1px solid #b8d8f0;
    margin-top: 10px;
}

.qpb-solution__pdf-link:hover {
    background: #d0eafb;
}

/* ── Navigation bar ──────────────────────────────── */
.qpb-nav {
    display: flex;
    align-items: stretch;
    gap: 0;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
    margin: 24px 0;
    background: #f9fafb;
}

.qpb-nav__btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    text-decoration: none !important;
    color: #2271b1 !important;
    font-size: 0.88em;
    line-height: 1.3;
    flex: 1;
    transition: background 0.15s;
    border: none;
    background: transparent;
}

.qpb-nav__btn:hover {
    background: #e8f4fd;
}

.qpb-nav__btn--prev {
    border-right: 1px solid #e2e8f0;
    justify-content: flex-start;
}

.qpb-nav__btn--next {
    border-left: 1px solid #e2e8f0;
    justify-content: flex-end;
    text-align: right;
}

.qpb-nav__btn--disabled {
    color: #aaa !important;
    cursor: default;
}

.qpb-nav__btn--disabled:hover {
    background: transparent;
}

.qpb-nav__arrow {
    font-size: 1.3em;
    font-weight: 700;
}

.qpb-nav__back {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 16px;
    font-size: 0.85em;
    color: #555 !important;
    text-decoration: none !important;
    white-space: nowrap;
    border-left: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
}

.qpb-nav__back:hover {
    background: #f0f0f0;
}

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 600px) {
    .qpb-paper__meta {
        flex-direction: column;
        gap: 6px;
    }
    .qpb-nav {
        flex-direction: column;
    }
    .qpb-nav__btn--prev,
    .qpb-nav__btn--next {
        border: none;
        border-bottom: 1px solid #e2e8f0;
    }
    .qpb-nav__back {
        border: none;
        border-bottom: 1px solid #e2e8f0;
    }
}

/* ── Section headings ────────────────────────────── */
.qpb-section-heading {
    background: linear-gradient(135deg, #1a2942 0%, #2271b1 100%);
    color: #fff;
    font-weight: 700;
    font-size: 1em;
    letter-spacing: 0.5px;
    padding: 12px 20px;
    border-radius: 6px;
    margin: 28px 0 16px;
    text-transform: uppercase;
}

/* First section heading needs less top margin */
.qpb-questions-list > .qpb-section-heading:first-child {
    margin-top: 0;
}

/* Optional per-section colour overrides via slug class */
.qpb-section--section-a { background: linear-gradient(135deg, #1a2942 0%, #2271b1 100%); }
.qpb-section--section-b { background: linear-gradient(135deg, #1a4235 0%, #0f9d58 100%); }
.qpb-section--section-c { background: linear-gradient(135deg, #3d1a42 0%, #8e24aa 100%); }
.qpb-section--section-d { background: linear-gradient(135deg, #42280a 0%, #e65100 100%); }

/* ── OR divider ──────────────────────────────────── */
.qpb-or-divider {
    display: flex;
    align-items: center;
    margin: 12px 0;
    gap: 12px;
    color: #888;
    font-size: 0.85em;
    font-weight: 700;
    letter-spacing: 1px;
}

.qpb-or-divider::before,
.qpb-or-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #d0d5dd;
}

.qpb-or-divider span {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
    border-radius: 20px;
    padding: 2px 14px;
    font-size: 0.85em;
}

/* OR questions get a subtle left accent */
.qpb-question--or {
    border-left: 3px solid #fcd34d;
}
