/* ==========================================================================
PrepBIX Educational Portal - Custom Site Stylesheet (assets/css/site.css)
Loaded after bootstrap.min.css and main.min.css with automatic cache-busting
========================================================================== */

/* 0. Global Viewport Geometry Lock & Fixed Sticky Header (Zero Shift on Theme Toggle) */
html,
body,
body.darkTheme {
overflow-y: scroll !important;
box-sizing: border-box;
}

*,
*::before,
*::after {
box-sizing: inherit;
}

.main-wrapper,
body.darkTheme .main-wrapper,
.section,
body.darkTheme .section,
.container-fluid,
body.darkTheme .container-fluid {
transform: none !important;
transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease !important;
}

.header,
body.darkTheme .header {
position: sticky !important;
top: 0 !important;
z-index: 1030 !important;
width: 100% !important;
min-height: 64px !important;
box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06) !important;
transform: none !important;
transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease !important;
}

body.darkTheme .header {
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.38) !important;
}

body.darkTheme .card-style,
.card-style,
body.darkTheme .card-style-list,
.card-style-list {
padding: 20px 22px !important;
margin-bottom: 22px !important;
border-radius: 10px !important;
border: 1px solid #e2e8f0 !important;
box-sizing: border-box !important;
transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease !important;
}

body.darkTheme .card-style,
body.darkTheme .card-style-list {
border-color: #3a3e44 !important;
}

/* 1. WordPress Core Alignment & Accessibility Helpers */
.alignleft {
float: left;
margin-right: 1.5rem;
margin-bottom: 1rem;
}

.alignright {
float: right;
margin-left: 1.5rem;
margin-bottom: 1rem;
}

.aligncenter {
display: block;
margin-left: auto;
margin-right: auto;
margin-bottom: 1rem;
}

.wp-caption {
max-width: 100%;
margin-bottom: 1rem;
}

.wp-caption-text {
font-size: 0.85rem;
color: #6c757d;
text-align: center;
padding-top: 0.35rem;
}

.screen-reader-text {
border: 0;
clip: rect(1px, 1px, 1px, 1px);
clip-path: inset(50%);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute !important;
width: 1px;
word-wrap: normal !important;
}

/* 2. Custom SVG Brand Logo & Dark/Light Mode Color Adaptation */
.navbar-logo .bix-custom-svg-logo {
display: inline-flex;
align-items: center;
text-decoration: none;
color: #262d3f;
transition: opacity 0.2s ease-in-out;
}

.navbar-logo .bix-custom-svg-logo:hover {
opacity: 0.9;
color: #262d3f;
}

body.darkTheme .navbar-logo .bix-custom-svg-logo,
body.darkTheme .navbar-logo .bix-custom-svg-logo:hover {
color: #f8c555;
}

.navbar-logo .custom-logo-link img {
max-height: 55px;
width: auto;
}

/* 3. Inline Color SVG Alignment & Interactive Hover Polish */
.bix-color-svg,
.bix-inline-svg,
.bix-title-svg,
.bix-ql-svg,
.bix-carousel-svg {
display: inline-block;
vertical-align: middle;
flex-shrink: 0;
}

.header-button .bix-color-svg,
.menu-toggle-btn .bix-color-svg {
transition: transform 0.18s ease-in-out;
}

.header-button:hover .bix-color-svg,
.menu-toggle-btn:hover .bix-color-svg {
transform: scale(1.08);
}

/* Sidebar SVG Icon Container */
.sidebar-nav-wrapper .sidebar-nav ul .nav-item a span.icon svg {
width: 20px;
height: 20px;
display: block;
}

/* 4. Suppress Duplicate/Broken MDI Pseudo-Icons Where Custom SVGs Are Used */
.topics-wrapper ul li.has-custom-svg::before,
.topics-wrapper ul li.has-custom-svg::after,
.topics-wrapper ul li.has-custom-svg a::before,
.topics-wrapper ul li.has-custom-svg a::after,
.topics-wrapper .multi-topics a.has-custom-svg::before,
.topics-wrapper .multi-topics a.has-custom-svg::after,
.bix-div-toolbar a.has-custom-svg::before,
.bix-div-toolbar a.has-custom-svg::after,
.quick-link ul.bix-ql-list li.bix-ql-item::before,
.quick-link ul.bix-ql-list li.bix-ql-item a::before,
.card-style-list .card-content ul li.bix-home-cat-item::before,
.card-style-list .card-content ul li.bix-home-cat-item a::before,
.bix-ca-cat-list li::before,
.bix-ca-cat-list li a::before {
display: none !important;
content: none !important;
}

.quick-link ul.bix-ql-list {
list-style: none !important;
padding-left: 0 !important;
}

.quick-link ul.bix-ql-list li.bix-ql-item {
list-style: none !important;
padding-left: 0 !important;
margin-bottom: 0.45rem;
}

.quick-link ul.bix-ql-list li.bix-ql-item a {
padding-left: 0 !important;
}

.bix-div-toolbar a.has-custom-svg {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 4px 6px;
border-radius: 6px;
transition: background-color 0.15s ease, transform 0.15s ease;
}

.bix-div-toolbar a.has-custom-svg:hover {
background-color: rgba(94, 172, 26, 0.1);
transform: translateY(-1px);
}

/* 5. MCQ Option Row Hover & Click Feedback */
.bix-tbl-options .bix-opt-row {
cursor: pointer;
padding: 4px 6px;
border-radius: 6px;
transition: background-color 0.15s ease;
}

.bix-tbl-options .bix-opt-row:hover {
background-color: rgba(94, 172, 26, 0.06);
}

body.darkTheme .bix-tbl-options .bix-opt-row:hover {
background-color: rgba(248, 197, 85, 0.08);
}

/* Global fallback: hide any unstyled MDI font glyphs so broken rectangles never appear */
i.mdi {
display: none !important;
}

/* ==========================================================================
5B. SELF-CONTAINED SVG OPTION LETTER CIRCLES (A, B, C, D, E)
Replaces broken MDI font glyphs on .option-svg-letter-{a..e}
========================================================================== */
.option-svg-letter-a,
.option-svg-letter-b,
.option-svg-letter-c,
.option-svg-letter-d,
.option-svg-letter-e {
display: inline-flex !important;
align-items: center;
justify-content: center;
width: 26px;
height: 26px;
min-width: 26px;
border-radius: 50%;
background-repeat: no-repeat;
background-position: center;
background-size: contain;
vertical-align: middle;
transition: transform 0.15s ease, filter 0.15s ease;
}

.option-svg-letter-a::before,
.option-svg-letter-b::before,
.option-svg-letter-c::before,
.option-svg-letter-d::before,
.option-svg-letter-e::before {
display: none !important;
content: none !important;
}

.bix-td-option:hover .option-svg-letter-a,
.bix-td-option:hover .option-svg-letter-b,
.bix-td-option:hover .option-svg-letter-c,
.bix-td-option:hover .option-svg-letter-d,
.bix-td-option:hover .option-svg-letter-e {
transform: scale(1.08);
}

/* Light Mode Option Letter Circles (Teal Border + Bold Letter) */
.option-svg-letter-a {
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28'%3E%3Ccircle cx='14' cy='14' r='12.5' fill='%23ffffff' stroke='%230096af' stroke-width='2'/%3E%3Ctext x='14' y='18.5' text-anchor='middle' font-family='Inter,Arial,sans-serif' font-size='13' font-weight='700' fill='%230096af'%3EA%3C/text%3E%3C/svg%3E") !important;
}
.option-svg-letter-b {
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28'%3E%3Ccircle cx='14' cy='14' r='12.5' fill='%23ffffff' stroke='%230096af' stroke-width='2'/%3E%3Ctext x='14' y='18.5' text-anchor='middle' font-family='Inter,Arial,sans-serif' font-size='13' font-weight='700' fill='%230096af'%3EB%3C/text%3E%3C/svg%3E") !important;
}
.option-svg-letter-c {
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28'%3E%3Ccircle cx='14' cy='14' r='12.5' fill='%23ffffff' stroke='%230096af' stroke-width='2'/%3E%3Ctext x='14' y='18.5' text-anchor='middle' font-family='Inter,Arial,sans-serif' font-size='13' font-weight='700' fill='%230096af'%3EC%3C/text%3E%3C/svg%3E") !important;
}
.option-svg-letter-d {
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28'%3E%3Ccircle cx='14' cy='14' r='12.5' fill='%23ffffff' stroke='%230096af' stroke-width='2'/%3E%3Ctext x='14' y='18.5' text-anchor='middle' font-family='Inter,Arial,sans-serif' font-size='13' font-weight='700' fill='%230096af'%3ED%3C/text%3E%3C/svg%3E") !important;
}
.option-svg-letter-e {
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28'%3E%3Ccircle cx='14' cy='14' r='12.5' fill='%23ffffff' stroke='%230096af' stroke-width='2'/%3E%3Ctext x='14' y='18.5' text-anchor='middle' font-family='Inter,Arial,sans-serif' font-size='13' font-weight='700' fill='%230096af'%3EE%3C/text%3E%3C/svg%3E") !important;
}

/* Dark Mode Option Letter Circles (Gold Border & Letter on Dark Charcoal) */
body.darkTheme .option-svg-letter-a {
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28'%3E%3Ccircle cx='14' cy='14' r='12.5' fill='%2326282b' stroke='%23f8c555' stroke-width='2'/%3E%3Ctext x='14' y='18.5' text-anchor='middle' font-family='Inter,Arial,sans-serif' font-size='13' font-weight='700' fill='%23f8c555'%3EA%3C/text%3E%3C/svg%3E") !important;
}
body.darkTheme .option-svg-letter-b {
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28'%3E%3Ccircle cx='14' cy='14' r='12.5' fill='%2326282b' stroke='%23f8c555' stroke-width='2'/%3E%3Ctext x='14' y='18.5' text-anchor='middle' font-family='Inter,Arial,sans-serif' font-size='13' font-weight='700' fill='%23f8c555'%3EB%3C/text%3E%3C/svg%3E") !important;
}
body.darkTheme .option-svg-letter-c {
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28'%3E%3Ccircle cx='14' cy='14' r='12.5' fill='%2326282b' stroke='%23f8c555' stroke-width='2'/%3E%3Ctext x='14' y='18.5' text-anchor='middle' font-family='Inter,Arial,sans-serif' font-size='13' font-weight='700' fill='%23f8c555'%3EC%3C/text%3E%3C/svg%3E") !important;
}
body.darkTheme .option-svg-letter-d {
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28'%3E%3Ccircle cx='14' cy='14' r='12.5' fill='%2326282b' stroke='%23f8c555' stroke-width='2'/%3E%3Ctext x='14' y='18.5' text-anchor='middle' font-family='Inter,Arial,sans-serif' font-size='13' font-weight='700' fill='%23f8c555'%3ED%3C/text%3E%3C/svg%3E") !important;
}
body.darkTheme .option-svg-letter-e {
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28'%3E%3Ccircle cx='14' cy='14' r='12.5' fill='%2326282b' stroke='%23f8c555' stroke-width='2'/%3E%3Ctext x='14' y='18.5' text-anchor='middle' font-family='Inter,Arial,sans-serif' font-size='13' font-weight='700' fill='%23f8c555'%3EE%3C/text%3E%3C/svg%3E") !important;
}

/* ==========================================================================
6. MCQ CORRECT ANSWER GREEN RIGHT CHECKMARK & WRONG ANSWER CROSS (NO BROKEN FONT)
========================================================================== */
.bix-td-option-val.correct-ans {
color: #2e7d32 !important;
font-weight: 600;
}

body.darkTheme .bix-td-option-val.correct-ans {
color: #81c784 !important;
}

/* Override main.min.css ::after font-icon with crisp inline SVG green checkmark */
.bix-td-option-val.correct-ans::after {
content: "" !important;
display: inline-block !important;
width: 22px;
height: 22px;
min-width: 22px;
margin-left: 10px;
vertical-align: middle;
background-repeat: no-repeat;
background-position: center;
background-size: contain;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Ccircle cx='12' cy='12' r='10' fill='%2328a745'/%3E%3Cpath d='M7.5 12.3L10.4 15.2L16.7 8.9' stroke='%23ffffff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
animation: bixCheckPop 0.22s ease-out;
}

.bix-td-option-val.wrong-ans::after {
content: "" !important;
display: inline-block !important;
width: 22px;
height: 22px;
min-width: 22px;
margin-left: 10px;
vertical-align: middle;
background-repeat: no-repeat;
background-position: center;
background-size: contain;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Ccircle cx='12' cy='12' r='10' fill='%23ed4956'/%3E%3Cpath d='M8.5 8.5L15.5 15.5M15.5 8.5L8.5 15.5' stroke='%23ffffff' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E") !important;
animation: bixCheckPop 0.22s ease-out;
}

@keyframes bixCheckPop {
0% {
transform: scale(0.5);
opacity: 0;
}
70% {
transform: scale(1.15);
opacity: 1;
}
100% {
transform: scale(1);
}
}

/* 7. Profile Avatar Picker & Modal Polish */
.sel-avatar {
position: relative;
padding: 8px;
border-radius: 10px;
border: 2px solid transparent;
transition: border-color 0.15s ease, transform 0.15s ease;
}

.sel-avatar:hover {
border-color: #5eac1a;
transform: translateY(-2px);
}

.sel-avatar .avatar-select {
position: absolute;
top: 4px;
right: 4px;
}

/* 8. Responsive Safeguards for Tables, Equations & Video Embeds */
.bix-td-qtxt table,
.bix-ans-description table {
max-width: 100%;
overflow-x: auto;
}

.bix-video-embed {
position: relative;
width: 100%;
padding-bottom: 56.25%;
height: 0;
overflow: hidden;
border-radius: 8px;
}

.bix-video-embed iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border: 0;
}

.cursor-pointer {
cursor: pointer;
}