/**
 * TestBaazi Web — Question & Answer Page Styling
 * public_html/assets/web/css/pages/question.css
 * Clean Crisp Light Theme exclusive styling for Programmatic SEO Question pages.
 */

:root {
    --bg-page: #F8FAFC;
    --bg-card: #FFFFFF;
    --bg-subtle: #F1F5F9;
    --border-card: #E2E8F0;
    --border-inner: #EEF2F6;
    --text-heading: #0F172A;
    --text-body: #334155;
    --text-muted: #64748B;
    --primary: #2563EB;
    --primary-dark: #1D4ED8;
    --primary-soft: #EFF6FF;
    --accent: #0EA5E9;
    --correct-bg: #ECFDF5;
    --correct-border: #A7F3D0;
    --correct-text: #065F46;
    --correct-badge: #10B981;
    --card-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);

    --font-body: 'Outfit', 'Noto Sans Devanagari', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Outfit', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

body {
    background-color: var(--bg-page);
    color: var(--text-body);
    font-family: var(--font-body);
    font-size: 1rem; /* 16px standard base */
    line-height: 1.65;
    min-height: 100vh;
}

/* ── Main Layout ── */
.main-layout {
    max-width: 880px;
    margin: 22px auto 50px;
    padding: 0 16px;
}

/* ── Box Containers ── */
.box-container {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    margin-bottom: 18px;
    overflow: hidden;
}

.box-header {
    padding: 9px 16px;
    border-bottom: 1px solid var(--border-inner);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--bg-subtle);
    flex-wrap: wrap;
}

.header-breadcrumb {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.header-breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
}

.header-breadcrumb a:hover {
    color: var(--primary);
}

.header-breadcrumb .bc-sep {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    opacity: 0.6;
    user-select: none;
}

.header-breadcrumb .bc-current {
    color: var(--text-heading);
    font-weight: 600;
}

/* Header Right Actions (Language + Share) */
.header-right-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Language Toggle Button Group */
.lang-switch-cluster {
    display: inline-flex;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 6px;
    height: 30px;
    padding: 2px;
    gap: 2px;
    flex-shrink: 0;
    box-sizing: border-box;
}

.lang-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    height: 24px;
    padding: 0 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.lang-btn:hover {
    color: var(--text-heading);
}

.lang-btn.active {
    background: var(--primary);
    color: #FFFFFF;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

/* Share Outline Button */
.btn-share {
    background: transparent;
    border: 1px solid var(--border-card);
    color: var(--text-muted);
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    height: 30px;
    padding: 0 12px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.15s ease;
    box-sizing: border-box;
    line-height: normal;
}

.btn-share:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: var(--primary-soft);
}

.btn-share i {
    font-size: 12px;
    color: currentColor;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transform: translateY(0.5px);
}

/* Toast feedback */
.share-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(30px);
    background: #0F172A;
    color: #FFFFFF;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.15);
    opacity: 0;
    pointer-events: none;
    transition: all 0.25s ease;
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 8px;
}

.share-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.box-body {
    padding: 20px 22px;
}

/* Question Stem with Rich HTML & MathJax Support */
.q-stem-wrap {
    margin-bottom: 12px;
}

.question-title {
    font-size: 1.125rem; /* 18px */
    font-weight: 600;
    color: var(--text-heading);
    line-height: 1.7;
}

.question-title p {
    margin-bottom: 0.625rem;
    line-height: 1.7;
}

/* Fix list numbering and bullets leaking outside the box */
.question-title ol,
.question-title ul,
.q-stem-wrap ol,
.q-stem-wrap ul {
    padding-left: 1.625rem;
    margin: 0.75rem 0 1rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    list-style-position: outside;
}

.question-title ol {
    list-style-type: decimal;
}

.question-title ul {
    list-style-type: disc;
}

.question-title li,
.q-stem-wrap li {
    font-size: 1rem; /* 16px */
    font-weight: 500;
    line-height: 1.65;
    color: var(--text-heading);
    padding-left: 0.25rem;
}

.question-title img,
.solution-content-rich img,
.option-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 8px 0;
}

.question-title table,
.solution-content-rich table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 14px 0 16px 0;
    font-size: 0.9375rem; /* 15px */
    border: 1px solid var(--border-card);
    border-radius: 6px;
    overflow: hidden;
    background: var(--bg-card);
}

.question-title table th,
.solution-content-rich table th {
    background: var(--bg-subtle);
    color: var(--text-heading);
    font-weight: 600;
    font-size: 0.875rem; /* 14px */
    text-align: left;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-card);
    border-right: 1px solid var(--border-inner);
}

.question-title table th:last-child,
.solution-content-rich table th:last-child {
    border-right: none;
}

.question-title table td,
.solution-content-rich table td {
    padding: 9px 14px;
    border-bottom: 1px solid var(--border-inner);
    border-right: 1px solid var(--border-inner);
    color: var(--text-body);
    text-align: left;
    line-height: 1.55;
}

.question-title table td:last-child,
.solution-content-rich table td:last-child {
    border-right: none;
}

.question-title table tr:last-child td,
.solution-content-rich table tr:last-child td {
    border-bottom: none;
}

/* PYQ Exam Tags Container (Bottom-Right of Question Stem) */
.q-pyq-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--border-inner);
}

.pyq-badge {
    background: var(--bg-subtle);
    color: var(--text-muted);
    border: 1px solid var(--border-card);
    font-size: 0.75rem; /* 12px */
    font-weight: 500;
    padding: 3px 12px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.pyq-badge i {
    color: var(--text-muted);
    font-size: 0.7rem;
}

/* Options */
.options-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.option-box {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    border: 1px solid var(--border-inner);
    background: var(--bg-subtle);
    color: var(--text-body);
    font-size: 0.96875rem;
    font-weight: 500;
    line-height: 1.55;
}

.option-content {
    flex: 1;
    word-break: break-word;
}

.option-letter {
    width: 1.625rem;
    height: 1.625rem;
    border-radius: 4px;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 0.8125rem;
    color: var(--text-muted);
    flex-shrink: 0;
    margin-top: 1px;
}

/* ── 2. Independent Answer Box (Clean Natural Exam Format) ── */
.answer-box {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    margin-bottom: 18px;
    padding: 14px 18px;
}

.answer-natural-text {
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text-body);
}

.answer-natural-label {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: var(--text-heading);
    margin-right: 4px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.answer-natural-label i {
    color: var(--primary);
}

.answer-opt-text {
    color: var(--text-heading);
    font-weight: 600;
}

/* ── 3. Solution Box ── */
.solution-box {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    margin-bottom: 20px;
    overflow: hidden;
}

.solution-box-header {
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-inner);
    background: var(--primary-soft);
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-family: 'Outfit', sans-serif;
    font-size: 0.9375rem;
    font-weight: 600;
}

.solution-box-body {
    padding: 1.25rem 1.375rem;
}

.solution-content-rich {
    color: var(--text-body);
    font-size: 1rem;
    line-height: 1.75;
}

.solution-content-rich p {
    margin-bottom: 12px;
}

.solution-content-rich ul,
.solution-content-rich ol {
    padding-left: 22px;
    margin: 10px 0 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.solution-content-rich li {
    font-size: 1rem;
    color: var(--text-body);
    line-height: 1.65;
}

.solution-content-rich h3,
.solution-content-rich h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-heading);
    margin: 18px 0 10px;
}

/* ── App Promo Card ── */
.app-promo-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 8px;
    padding: 18px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    box-shadow: var(--card-shadow);
    margin-bottom: 20px;
}

.app-promo-info h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 3px;
}

.app-promo-info p {
    font-size: 13px;
    color: var(--text-muted);
}

.btn-promo-download {
    background: var(--primary);
    color: #FFFFFF;
    font-size: 13.5px;
    font-weight: 600;
    padding: 9px 18px;
    border-radius: 6px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
    border: 1px solid var(--primary);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-promo-download:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1.5px);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.28);
}

/* ── Related Questions Box ── */
.related-box {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    padding: 18px 20px;
    margin-bottom: 36px;
}

.related-title {
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 12px;
}

.related-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.related-list a {
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.related-list a:hover {
    text-decoration: underline;
}

/* Responsive Scaling for Mobile & Tablets */
@media (max-width: 768px) {
    html {
        font-size: 15px;
    }
    .main-layout {
        padding: 0 12px;
        margin: 16px auto 36px;
    }
    .box-body {
        padding: 16px 14px;
    }
    .question-title ol,
    .question-title ul,
    .q-stem-wrap ol,
    .q-stem-wrap ul {
        padding-left: 1.25rem;
    }
}

/* Clean Text Selection Experience */
::selection {
    background: #BFDBFE;
    color: #1E3A8A;
}

.option-letter,
.pyq-badge,
.bc-sep,
.answer-natural-label i {
    user-select: none;
    -webkit-user-select: none;
}

