/*
Theme Name: IndiaBIX Aptitude & MCQ Theme
Theme URI: https://example.com/
Author: Senior WordPress Theme Developer
Description: Custom WordPress theme replicating the IndiaBIX Aptitude, MCQ, Category Directory, and Discussion Forum experience with Light/Dark theme support and Color SVG icons.
Version: 2.18.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bix-theme
Tags: education, quiz, mcq, aptitude, dark-mode, two-columns, left-sidebar
*/

/* =========================================================================
WordPress Core & Admin Bar Adjustments
========================================================================= */
body.admin-bar .sidebar-nav-wrapper {
top: 32px;
height: calc(100% - 32px);
}

@media screen and (max-width: 782px) {
body.admin-bar .sidebar-nav-wrapper {
top: 46px;
height: calc(100% - 46px);
}
}

/* =========================================================================
Sidebar Inline Color SVG Logo & Navigation Icons (Fixes missing logo.png)
========================================================================= */
.sidebar-nav-wrapper .navbar-logo a.bix-svg-brand,
body.darkTheme .sidebar-nav-wrapper .navbar-logo a.bix-svg-brand {
background-image: none !important;
width: auto !important;
height: auto !important;
margin-top: 8px !important;
display: inline-flex !important;
align-items: center;
justify-content: center;
text-decoration: none !important;
}

.bix-logo-primary {
fill: #262d3f;
transition: fill 0.15s ease-in-out;
}

body.darkTheme .bix-logo-primary {
fill: #ffffff;
}

.sidebar-nav-wrapper .sidebar-nav ul .nav-item a .icon .bix-nav-svg {
width: 21px;
height: 21px;
display: block;
flex-shrink: 0;
}

/* =========================================================================
Inline SVG Option Badges (Fallback if external SVG files are not present)
========================================================================= */
.bix-td-option span[class^="option-svg-letter-"],
.bix-ans-option span[class^="option-svg-letter-"] {
display: inline-flex;
align-items: center;
justify-content: center;
width: 1.65em;
height: 1.65em;
border-radius: 50%;
border: 1.5px solid #5eac1a;
color: #5eac1a;
font-weight: 700;
font-size: 0.9em;
line-height: 1;
margin-top: 4px;
content: normal !important;
background-color: transparent;
transition: all 0.15s ease-in-out;
}

.bix-td-option:hover span[class^="option-svg-letter-"] {
background-color: #5eac1a;
color: #ffffff;
}

.option-svg-letter-a::after { content: "A"; }
.option-svg-letter-b::after { content: "B"; }
.option-svg-letter-c::after { content: "C"; }
.option-svg-letter-d::after { content: "D"; }
.option-svg-letter-e::after { content: "E"; }

body.darkTheme .bix-td-option span[class^="option-svg-letter-"],
body.darkTheme .bix-ans-option span[class^="option-svg-letter-"] {
border-color: #f8c555;
color: #f8c555;
content: normal !important;
}

body.darkTheme .bix-td-option:hover span[class^="option-svg-letter-"] {
background-color: #f8c555;
color: #202125;
}

/* Phase 3: moderated content submission forms */
.bix-phase3-mcq-form,
.bix-phase3-tech-form,
.bix-phase3-paper-form { max-width: 920px; margin: 0 auto 24px; }
.bix-phase3-mcq-form h3,
.bix-phase3-tech-form h3,
.bix-phase3-paper-form h3 { margin: 0 0 8px; font-size: 1.25rem; font-weight: 600; }
.bix-phase3-mcq-form .input-style-1,
.bix-phase3-tech-form .input-style-1,
.bix-phase3-paper-form .input-style-1 { margin-bottom: 16px; }
.bix-phase3-mcq-form textarea,
.bix-phase3-tech-form textarea,
.bix-phase3-paper-form textarea,
.bix-phase3-paper-form input:not([type="checkbox"]),
.bix-phase3-mcq-form select { width: 100%; max-width: 100%; }
.bix-phase3-mcq-form .resp-div,
.bix-phase3-tech-form .resp-div,
.bix-phase3-paper-form .resp-div { margin: 12px 0; }

/* Phase 4: public, administrator-approved submission archives and detail pages */
.bix-public-submissions { padding: 22px; }
.bix-submission-card { padding: 20px 0; border-bottom: 1px solid rgba(120,130,150,.2); }
.bix-submission-card:first-child { padding-top: 4px; }
.bix-submission-card:last-of-type { border-bottom: 0; }
.bix-submission-card h2 { margin: 0 0 10px; font-size: 1.12rem; line-height: 1.5; font-weight: 650; }
.bix-submission-card h2 a { color: inherit; text-decoration: none; }
.bix-submission-card h2 a:hover { color: #5eac1a; }
.bix-submission-card p { margin: 10px 0; line-height: 1.75; }
.bix-submission-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 10px 0 14px; color: #7b8494; font-size: .84rem; }
.bix-submission-meta span + span:before { content: "•"; margin-right: 18px; color: #aab1bc; }
.bix-paper-single, .bix-tech-single { padding: clamp(18px,3vw,30px); }
.bix-submission-content, .bix-tech-answer { line-height: 1.85; overflow-wrap: anywhere; }
.bix-tech-question { padding: 16px 18px; margin-bottom: 22px; border-left: 4px solid #5eac1a; background: rgba(94,172,26,.07); border-radius: 5px; }
.bix-tech-question h2, .bix-tech-answer h2 { font-size: 1.12rem; font-weight: 700; margin: 0 0 12px; }
.bix-tech-question p { margin: 0; line-height: 1.75; }
.bix-pagination { margin-top: 22px; }
.bix-pagination ul { display: flex; flex-wrap: wrap; gap: 7px; list-style: none; padding: 0; }
.bix-pagination a, .bix-pagination span { display: inline-flex; min-width: 36px; min-height: 36px; align-items: center; justify-content: center; padding: 6px 10px; border: 1px solid rgba(120,130,150,.25); border-radius: 5px; text-decoration: none; }
.bix-pagination .current { background: #5eac1a; color: #fff; border-color: #5eac1a; }
body.darkTheme .bix-submission-card { border-color: rgba(255,255,255,.12); }
body.darkTheme .bix-tech-question { background: rgba(248,197,85,.08); border-left-color: #f8c555; }
@media (max-width: 767px) { .bix-public-submissions { padding: 16px; } .bix-submission-card { padding: 16px 0; } .bix-submission-meta { gap: 6px 12px; } .bix-submission-meta span + span:before { margin-right: 12px; } }
.bix-submission-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 150px; }
.bix-submission-actions .bix-btn { padding: 5px 9px; font-size: .78rem; }
.bix-submission-editor { flex-basis: 100%; min-width: 240px; padding: 12px; margin-top: 8px; border: 1px solid rgba(120,130,150,.25); border-radius: 7px; }
.bix-submission-editor .input-style-1 { margin-bottom: 12px; }
.bix-submission-editor input, .bix-submission-editor textarea { width: 100%; max-width: 100%; }
.bix-submission-feedback { flex-basis: 100%; font-size: .82rem; color: #b54747; }


/* Phase 5: administrator moderation workspace */
.bix-phase5-admin .bix-phase5-filters { display:flex; flex-wrap:wrap; gap:8px; margin:18px 0; }
.bix-phase5-admin .bix-phase5-filters input[type="search"] { min-width:220px; }
.bix-phase5-table th, .bix-phase5-table td { vertical-align:top; }
.bix-phase5-table td { padding:12px 10px; }
.bix-phase5-status { display:inline-block; padding:3px 8px; border-radius:20px; background:#eef1f4; font-size:11px; font-weight:700; }
.bix-phase5-admin .bix-status-pending { background:#fff3cd; color:#765400; }
.bix-phase5-admin .bix-status-publish { background:#dff3e4; color:#176b32; }
.bix-phase5-admin .bix-status-draft { background:#fce8e6; color:#a12622; }
.bix-phase5-decision-form { min-width:270px; max-width:460px; }
.bix-phase5-decision-form textarea { width:100%; min-height:54px; margin:5px 0 7px; }
.bix-phase5-buttons { display:flex; flex-wrap:wrap; gap:5px; }
.bix-phase5-last-note { max-width:420px; padding:8px 10px; border-left:3px solid #dba617; background:#fff9e8; white-space:pre-wrap; }
.bix-phase5-table details { margin-top:8px; }
.bix-phase5-table details ol { margin-left:18px; }
.bix-phase5-table details li { margin:8px 0; }
@media(max-width:782px) { .bix-phase5-table { min-width:950px; } .bix-phase5-admin .bix-phase5-filters select,.bix-phase5-admin .bix-phase5-filters input { max-width:100%; } }
