/* Modern, Premium Accordion Styles for BNS Guru */
:root {
    --bns-primary: #1A365D;
    --bns-secondary: #D4AF37; /* Gold */
    --bns-bg: #f8fafc;
    --bns-text: #334155;
    --bns-white: #ffffff;
    --bns-border: #e2e8f0;
    --bns-hover: #f1f5f9;
    --bns-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.bns-guru-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--bns-text);
}

.bns-accordion-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 0;
}

.bns-accordion-item {
    background: var(--bns-white);
    border: 1px solid var(--bns-border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    transition: box-shadow var(--bns-transition), transform var(--bns-transition);
    scroll-margin-top: 80px; /* Essential clearance for site sticky headers */
}

.bns-accordion-item:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

.bns-accordion-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: #fbfbf9; /* Paper-like off-white */
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background var(--bns-transition);
}

.bns-accordion-header:hover {
    background: #f0f0e8; /* Darker paper hover */
}

.bns-section-num {
    font-weight: 700;
    color: #ffffff;
    background: #8b0000; /* Deep crimson red for law vibe */
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 0.95rem;
    margin-right: 18px;
    white-space: nowrap;
    letter-spacing: 0.5px;
}

.bns-section-title {
    font-weight: 700;
    font-size: 1.15rem;
    color: #8b0000; /* Deep red matching devgan */
    flex-grow: 1;
    line-height: 1.4;
}

.bns-icon {
    position: relative;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    margin-left: 16px;
}

.bns-icon::before,
.bns-icon::after {
    content: '';
    position: absolute;
    background-color: var(--bns-primary);
    transition: transform var(--bns-transition);
}

.bns-icon::before {
    top: 11px;
    left: 4px;
    width: 16px;
    height: 2px;
}

.bns-icon::after {
    top: 4px;
    left: 11px;
    width: 2px;
    height: 16px;
}

.bns-accordion-header[aria-expanded="true"] .bns-icon::after {
    transform: rotate(90deg);
}
.bns-accordion-header[aria-expanded="true"] .bns-icon::before {
    transform: rotate(180deg);
}
.bns-accordion-header[aria-expanded="true"] {
    background: var(--bns-hover);
    border-bottom: 1px solid var(--bns-border);
}

.bns-accordion-content {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows var(--bns-transition);
    background: var(--bns-bg);
}

.bns-accordion-header[aria-expanded="true"] + .bns-accordion-content {
    grid-template-rows: 1fr;
}

.bns-accordion-content-wrapper {
    overflow: hidden;
}

.bns-content-inner {
    padding: 35px 40px;
    line-height: 1.9;
    font-size: 1.1rem;
    color: #222;
    border-top: 1px solid var(--bns-border);
    background-color: #ffffff;
    font-family: 'Georgia', 'Times New Roman', serif; /* Serif for law text */
}

.bns-content-inner p {
    margin-bottom: 24px;
    text-align: justify;
}

.bns-content-inner p:last-child {
    margin-bottom: 0;
}

.bns-content-inner ol, .bns-content-inner ul {
    margin: 20px 0;
    padding-left: 30px;
}

.bns-content-inner ol {
    list-style-type: decimal;
}

.bns-content-inner ol.a, .bns-content-inner ol[type="a"] {
    list-style-type: lower-alpha;
}

.bns-content-inner ol.i, .bns-content-inner ol[type="i"] {
    list-style-type: lower-roman;
}

.bns-content-inner li {
    margin-bottom: 14px;
    line-height: 1.8;
    padding-left: 8px;
    text-align: justify;
}

.bns-content-inner li > ol, .bns-content-inner li > ul {
    margin-top: 12px;
    margin-bottom: 0;
}

.bns-content-inner strong, .bns-content-inner b {
    font-weight: 700;
    color: var(--bns-primary);
    background: rgba(212, 175, 55, 0.1);
    padding: 2px 4px;
    border-radius: 4px;
}

.bns-content-inner hr {
    border: none;
    border-top: 1px dashed var(--bns-border);
    margin: 24px 0;
}

/* Pagination */
.bns-pagination {
    display: none; /* Deprecated, using JS now */
}

/* Bookshelf Library landing page */
.bns-library-header {
    position: absolute;
    top: 0;
    left: 60px;
    transform: translateY(-50%);
    z-index: 10;
    margin: 0;
    padding: 0;
    text-align: left;
}

.bns-library-header h1 {
    display: inline-block;
    background: #ffffff;
    color: #111827 !important;
    padding: 10px 28px;
    border: 1px solid #1a1a1a;
    border-radius: 9999px;
    font-size: 1.3rem;
    font-weight: 800;
    margin: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    white-space: nowrap; /* Ensures title stays in a clean line */
}

.bns-bookshelf {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 30px 20px;
    padding: 40px 30px 30px 30px; /* Extra top padding for content clear space */
    background-color: rgb(254, 252, 232);
    border: 1px solid #1a1a1a;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
    position: relative; /* Anchor parent for absolute positioned header */
    margin-top: 40px; /* Ensure there is clear room above for the overlapping title */
}

.bns-book-cover {
    position: relative;
    height: 260px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.15), 0 2px 4px -1px rgba(0, 0, 0, 0.1);
    transition: transform 1.2s cubic-bezier(0.15, 0.85, 0.35, 1), box-shadow 1.2s ease;
    user-select: none;
    overflow: visible; /* Let cover swing outside boundary */
    perspective: 1000px;
    transform-style: preserve-3d;
    background: transparent !important;
}

.bns-book-cover:hover {
    transform: translateY(-8px) translateZ(10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.25);
}

/* Beautiful real pages container sitting underneath front cover */
.bns-book-page-content {
    position: absolute;
    top: 4px;
    right: 4px;
    bottom: 4px;
    left: 14px; /* Leaves space for the spine on the left */
    background: #fdfbf7;
    border: 1px solid #e6dec9;
    border-left: none;
    box-shadow: inset 3px 0 8px rgba(0, 0, 0, 0.08), 2px 2px 5px rgba(0, 0, 0, 0.15);
    border-radius: 0 4px 4px 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    box-sizing: border-box;
}

.bns-book-page-inner {
    text-align: center;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 10px 0;
}

.bns-book-page-crest {
    font-size: 1.3rem;
    color: #8a7a5f;
    opacity: 0.7;
    margin-bottom: 5px;
}

.bns-book-page-title {
    font-family: 'Georgia', serif;
    font-size: 0.8rem;
    font-weight: bold;
    color: #4a3e2e;
    margin: 0 0 10px 0 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.3;
}

.bns-book-page-lines {
    width: 80%;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.bns-book-page-lines span {
    display: block;
    height: 2px;
    background: #e9e3d3;
    width: 100%;
    border-radius: 1px;
}

.bns-book-page-lines span:nth-child(2) {
    width: 85%;
    align-self: center;
}

.bns-book-page-lines span:nth-child(3) {
    width: 70%;
    align-self: center;
}

.bns-book-page-btn {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: bold;
    color: #fff;
    background: #d4af37; /* Elegant Gold */
    padding: 6px 14px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-transform: uppercase;
    transition: transform 0.3s ease, background 0.3s ease;
}

.bns-book-page-btn.coming-soon {
    background: #a8a296;
    box-shadow: none;
}

.bns-book-cover:hover .bns-book-page-btn:not(.coming-soon) {
    transform: scale(1.05);
    background: #bfa130;
}

.bns-book-spine {
    width: 14px;
    height: 100%;
    background-image: linear-gradient(to right, rgba(0,0,0,0.35) 0%, rgba(255,255,255,0.15) 30%, rgba(0,0,0,0.25) 100%) !important;
    box-shadow: inset -1px 0 2px rgba(0,0,0,0.3);
    border-radius: 3px 0 0 3px;
    z-index: 3;
    position: relative;
}

.bns-book-front {
    flex-grow: 1;
    padding: 10px;
    display: flex;
    flex-direction: column;
    border-radius: 0 8px 8px 0;
    z-index: 3;
    position: relative;
    transform-origin: left center; /* Hinges on the spine */
    transition: transform 1.5s cubic-bezier(0.15, 0.85, 0.35, 1), box-shadow 1.5s ease;
    transform-style: preserve-3d;
    backface-visibility: hidden;
}

/* Hover swing animation to open the cover slowly */
.bns-book-cover:hover .bns-book-front {
    transform: rotateY(-130deg);
    box-shadow: -8px 8px 20px rgba(0, 0, 0, 0.35);
}

.bns-book-border {
    border: 1.5px solid rgba(212, 175, 55, 0.4);
    height: 100%;
    border-radius: 4px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    text-align: center;
}

.bns-book-crest {
    width: 100px;
    height: 100px;
    background: url('../../images/india-emblem.png') no-repeat center;
    background-size: contain;
    opacity: 1;
}

.bns-book-title {
    font-family: 'Georgia', serif;
    font-size: 0.95rem;
    font-weight: bold;
    color: #D4AF37 !important; /* Elegant Gold */
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    margin: 8px 0 4px 0 !important;
    line-height: 1.3;
}

.bns-book-subtitle {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 !important;
}

.bns-coming-badge, .bns-open-badge {
    font-size: 0.75rem;
    font-weight: bold;
    padding: 4px 10px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.bns-coming-badge {
    background: rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.8);
    border: 1px solid rgba(255,255,255,0.2);
}

.bns-open-badge {
    background: rgba(212, 175, 55, 0.2);
    color: #D4AF37;
    border: 1px solid rgba(212, 175, 55, 0.4);
}

/* Book Color Themes */
.bns-book-navy .bns-book-front,
.bns-book-navy .bns-book-spine {
    background-color: #0c1b2a;
}
.bns-book-navy .bns-book-front {
    background-image: linear-gradient(135deg, #102a43 0%, #0c1b2a 100%);
}

.bns-book-maroon .bns-book-front,
.bns-book-maroon .bns-book-spine {
    background-color: #300000;
}
.bns-book-maroon .bns-book-front {
    background-image: linear-gradient(135deg, #5c0606 0%, #300000 100%);
}

.bns-book-dark-green .bns-book-front,
.bns-book-dark-green .bns-book-spine {
    background-color: #032012;
}
.bns-book-dark-green .bns-book-front {
    background-image: linear-gradient(135deg, #0b4f30 0%, #032012 100%);
}

.bns-book-brown .bns-book-front,
.bns-book-brown .bns-book-spine {
    background-color: #2b1a0c;
}
.bns-book-brown .bns-book-front {
    background-image: linear-gradient(135deg, #5c3e21 0%, #2b1a0c 100%);
}

.bns-book-royal-blue .bns-book-front,
.bns-book-royal-blue .bns-book-spine {
    background-color: #112233;
}
.bns-book-royal-blue .bns-book-front {
    background-image: linear-gradient(135deg, #1d3557 0%, #112233 100%);
}

.bns-book-coming-soon {
    opacity: 0.85;
}

/* New JS App Styles */
.bns-search-container {
    margin-bottom: 30px;
    position: relative;
}

#bns-live-search {
    width: 100%;
    padding: 18px 24px;
    font-size: 1.1rem;
    border: 2px solid var(--bns-border);
    border-radius: 12px;
    outline: none;
    transition: all var(--bns-transition);
    background: #fff url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="%2394a3b8" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg>') no-repeat right 20px center;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

#bns-live-search:focus {
    border-color: var(--bns-secondary);
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.1);
}

.bns-chapter-list {
    display: grid;
    gap: 16px;
}

.bns-chapter-btn {
    display: flex;
    align-items: center;
    background: #fbfbf9;
    border: 1px solid var(--bns-border);
    padding: 20px 24px;
    border-radius: 12px;
    cursor: pointer;
    text-align: left;
    transition: all var(--bns-transition);
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.bns-chapter-btn:hover {
    background: #f0f0e8;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.05);
}

.bns-chapter-num {
    background: #8b0000;
    color: white;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 6px;
    margin-right: 20px;
    font-size: 0.95rem;
    white-space: nowrap;
}

.bns-chapter-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #8b0000;
    flex-grow: 1;
}

.bns-chapter-meta {
    font-size: 0.9rem;
    color: #64748b;
    margin-left: 20px;
}

.bns-action-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}

.bns-back-btn {
    background: none;
    border: none;
    color: var(--bns-secondary);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    margin-bottom: 0;
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: #1A365D;
    border-radius: 8px;
    transition: all var(--bns-transition);
}

.bns-back-btn:hover {
    background: #11284b;
    transform: translateX(-4px);
}

.bns-download-pdf-btn {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--bns-secondary);
    color: var(--bns-secondary);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    padding: 8px 18px;
    border-radius: 8px;
    transition: all var(--bns-transition);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.bns-download-pdf-btn:hover {
    background: rgba(30, 41, 59, 0.95);
    transform: scale(1.02);
    box-shadow: 0 6px 12px rgba(212, 175, 55, 0.2);
    color: #facc15;
    border-color: #facc15;
}

.bns-chapter-header {
    background: #fbfbf9;
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 24px;
    border-left: 4px solid #8b0000;
}

.bns-chapter-header h2 {
    margin: 0 0 8px 0;
    color: #8b0000;
    font-size: 1.4rem;
}

.bns-chapter-header p {
    margin: 0;
    color: #64748b;
    font-weight: 500;
}

.bns-loading {
    text-align: center;
    padding: 40px;
    font-size: 1.2rem;
    color: #64748b;
}

@media (max-width: 1024px) {
    .bns-bookshelf {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .bns-bookshelf {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .bns-accordion-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .bns-section-num {
        margin-right: 0;
    }
    .bns-icon {
        position: absolute;
        right: 20px;
        top: 20px;
    }
    .bns-star-toggle {
        position: absolute !important;
        right: 56px;
        top: 18px;
        margin-left: 0 !important;
    }
    .bns-chapter-btn {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .bns-chapter-meta {
        margin-left: 0;
    }
    .bns-bookshelf {
        grid-template-columns: repeat(2, 1fr);
    }
    .bns-library-header {
        left: 50%;
        transform: translate(-50%, -50%);
        text-align: center;
        width: 100%;
    }
}

/* ==========================================================================
   Dark Mode Theme Support (Triggered by html.dark-mode)
   ========================================================================== */
html.dark-mode {
    --bns-bg: #0f172a;
    --bns-white: #1e293b;
    --bns-text: #f8fafc;
    --bns-border: #334155;
    --bns-hover: #334155;
}

html.dark-mode .bns-accordion-item {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
}

html.dark-mode .bns-accordion-header {
    background: #1e293b;
    color: #f1f5f9;
}

html.dark-mode .bns-accordion-header:hover {
    background: #2c3a4e;
}

html.dark-mode .bns-section-title {
    color: #ef4444; /* Brighter red for dark readability */
}

html.dark-mode .bns-icon::before,
html.dark-mode .bns-icon::after {
    background-color: #94a3b8;
}

html.dark-mode .bns-content-inner {
    background-color: #0f172a;
    color: #e2e8f0;
    border-top-color: #334155;
}

html.dark-mode .bns-content-inner strong, 
html.dark-mode .bns-content-inner b {
    color: #facc15; /* Gold text for contrast */
    background: rgba(250, 204, 21, 0.15);
}

html.dark-mode .bns-accordion-header[aria-expanded="true"] {
    background: #1e3a8a26; /* Subtle dark blue tint */
    border-bottom-color: #334155;
}

/* Bookshelf Dark Mode */
html.dark-mode .bns-bookshelf {
    background-color: #0f172a;
    border-color: #334155;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
}

html.dark-mode .bns-library-header h1 {
    background: #1e293b;
    color: #f8fafc !important;
    border-color: #334155;
}

/* Chapter List Dark Mode */
html.dark-mode .bns-chapter-btn {
    background: #1e293b;
    border-color: #334155;
    color: #f8fafc;
}

html.dark-mode .bns-chapter-btn:hover {
    background: #334155;
}

html.dark-mode .bns-chapter-title {
    color: #ef4444; /* Vibrant accent */
}

html.dark-mode .bns-chapter-meta {
    color: #94a3b8;
}

html.dark-mode .bns-chapter-header {
    background: #1e293b;
    border-left-color: #ef4444;
}

html.dark-mode .bns-chapter-header h2 {
    color: #ef4444;
}

html.dark-mode .bns-chapter-header p {
    color: #94a3b8;
}

/* Inputs & Misc */
html.dark-mode #bns-live-search {
    background-color: #1e293b;
    color: #f8fafc;
    border-color: #334155;
}

/* ==========================================================================
   Dark Mode Theme Support (Triggered by html.dark-mode)
   ========================================================================== */
html.dark-mode {
    --bns-bg: #0f172a;
    --bns-white: #1e293b;
    --bns-text: #f8fafc;
    --bns-border: #334155;
    --bns-hover: #334155;
}

html.dark-mode .bns-accordion-item {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
}

html.dark-mode .bns-accordion-header {
    background: #1e293b;
    color: #f1f5f9;
}

html.dark-mode .bns-accordion-header:hover {
    background: #2c3a4e;
}

html.dark-mode .bns-section-title {
    color: #ef4444; /* Brighter red for dark readability */
}

html.dark-mode .bns-icon::before,
html.dark-mode .bns-icon::after {
    background-color: #94a3b8;
}

html.dark-mode .bns-content-inner {
    background-color: #0f172a;
    color: #e2e8f0;
    border-top-color: #334155;
}

html.dark-mode .bns-content-inner strong, 
html.dark-mode .bns-content-inner b {
    color: #facc15; /* Gold text for contrast */
    background: rgba(250, 204, 21, 0.15);
}

html.dark-mode .bns-accordion-header[aria-expanded="true"] {
    background: #1e3a8a26; /* Subtle dark blue tint */
    border-bottom-color: #334155;
}

/* Bookshelf Dark Mode */
html.dark-mode .bns-bookshelf {
    background-color: #0f172a;
    border-color: #334155;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
}

html.dark-mode .bns-library-header h1 {
    background: #1e293b;
    color: #f8fafc !important;
    border-color: #334155;
}

/* Chapter List Dark Mode */
html.dark-mode .bns-chapter-btn {
    background: #1e293b;
    border-color: #334155;
    color: #f8fafc;
}

html.dark-mode .bns-chapter-btn:hover {
    background: #334155;
}

html.dark-mode .bns-chapter-title {
    color: #ef4444; /* Vibrant accent */
}

html.dark-mode .bns-chapter-meta {
    color: #94a3b8;
}

html.dark-mode .bns-chapter-header {
    background: #1e293b;
    border-left-color: #ef4444;
}

html.dark-mode .bns-chapter-header h2 {
    color: #ef4444;
}

html.dark-mode .bns-chapter-header p {
    color: #94a3b8;
}

/* Inputs & Misc */
html.dark-mode #bns-live-search {
    background-color: #1e293b;
    color: #f8fafc;
    border-color: #334155;
}

html.dark-mode #bns-live-search::placeholder {
    color: #64748b;
}

html.dark-mode .bns-back-btn {
    background: #334155;
    color: #facc15;
}

html.dark-mode .bns-back-btn:hover {
    background: #475569;
}

/* ==========================================================================
   WordPress Admin Settings Panel Styling
   ========================================================================== */
.bns-admin-wrap {
    max-width: 800px;
    margin: 20px 0;
    font-family: 'Inter', sans-serif;
}

.bns-settings-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 30px;
    margin: 20px 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.bns-settings-card h2 {
    margin-top: 0;
    color: #1A365D;
    font-size: 1.4rem;
    font-weight: 700;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 12px;
}

.bns-settings-card .form-table th {
    font-weight: 600;
    color: #334155;
    width: 220px;
    padding: 20px 10px 20px 0;
}

.bns-settings-card .form-table td {
    padding: 15px 0;
}

.bns-settings-tip {
    display: block;
    margin-top: 6px;
    font-size: 0.85rem;
    color: #64748b;
}

/* iOS Toggle Switch */
.bns-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
    vertical-align: middle;
    margin-right: 10px;
}

.bns-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.bns-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .4s;
    border-radius: 34px;
}

.bns-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.bns-switch input:checked + .bns-slider {
    background-color: #1A365D;
}

.bns-switch input:focus + .bns-slider {
    box-shadow: 0 0 1px #1A365D;
}

.bns-switch input:checked + .bns-slider:before {
    transform: translateX(24px);
}

/* Image Upload Previewer */
.bns-image-upload-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
}

.bns-image-upload-wrapper input[type="text"] {
    flex-grow: 1;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    padding: 8px 12px;
}

.bns-preview-placeholder {
    width: 80px;
    height: 80px;
    background: #f1f5f9;
    border: 2px dashed #cbd5e1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #94a3b8;
}

/* ==========================================================================
   Floating Chat Trigger Styles
   ========================================================================== */
#bns-chatbot-widget-root {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

#bns-chatbot-trigger {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 99999;
    background: linear-gradient(135deg, #1A365D 0%, #0d1b3a 100%);
    border: 2px solid #D4AF37; /* Golden border */
    border-radius: 50px;
    padding: 12px 24px;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    box-shadow: 0 10px 25px -5px rgba(26, 54, 93, 0.4), 0 8px 10px -6px rgba(212, 175, 55, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#bns-chatbot-trigger:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 20px 30px -10px rgba(26, 54, 93, 0.5), 0 10px 15px -5px rgba(212, 175, 55, 0.3);
}

#bns-chatbot-avatar-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #D4AF37;
    object-fit: cover;
}

.bns-chatbot-trigger-icon {
    font-size: 1.3rem;
    line-height: 1;
}

.bns-chatbot-trigger-text {
    letter-spacing: 0.3px;
}

/* Pulsing Ambient Halo Keyframe */
.bns-pulse-glow {
    animation: bnsPulseGlow 2.5s infinite;
}

@keyframes bnsPulseGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.5), 0 10px 25px -5px rgba(26, 54, 93, 0.4);
    }
    70% {
        box-shadow: 0 0 0 12px rgba(212, 175, 55, 0), 0 10px 25px -5px rgba(26, 54, 93, 0.4);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(212, 175, 55, 0), 0 10px 25px -5px rgba(26, 54, 93, 0.4);
    }
}

/* ==========================================================================
   Chat Widget Window Overlay
   ========================================================================== */
#bns-chatbot-window {
    position: fixed;
    bottom: 95px;
    right: 30px;
    width: 380px;
    height: 520px;
    max-height: calc(100vh - 120px);
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    z-index: 99998;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    transform-origin: bottom right;
}

#bns-chatbot-window.bns-chat-hidden {
    transform: translateY(20px) scale(0.92);
    opacity: 0;
    pointer-events: none;
}

/* Chat Header */
.bns-chat-header {
    background: linear-gradient(135deg, #1A365D 0%, #0d1b3a 100%);
    border-bottom: 2px solid #D4AF37;
    color: #ffffff;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.bns-chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bns-chat-header-avatar {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    border: 1px solid rgba(212,175,55,0.5);
}

.bns-chat-header-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.bns-chat-online-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 11px;
    height: 11px;
    background-color: #22c55e;
    border: 2px solid #1A365D;
    border-radius: 50%;
}

.bns-chat-header-info h3 {
    margin: 0 !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    color: #ffffff !important;
}

.bns-chat-header-info p {
    margin: 2px 0 0 0 !important;
    font-size: 0.75rem !important;
    color: rgba(255,255,255,0.7) !important;
}

#bns-chat-close-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.8);
    font-size: 1.7rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
    transition: color 0.2s;
}

#bns-chat-close-btn:hover {
    color: #D4AF37;
}

/* Chat Messages Area */
.bns-chat-messages-container {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 14px;
    scroll-behavior: smooth;
}

.bns-chat-messages-container::-webkit-scrollbar {
    width: 6px;
}

.bns-chat-messages-container::-webkit-scrollbar-track {
    background: transparent;
}

.bns-chat-messages-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

/* Message Bubbles */
.bns-chat-bubble {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 14px;
    font-size: 0.92rem;
    line-height: 1.5;
    word-wrap: break-word;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.bns-chat-bubble-bot {
    align-self: flex-start;
    background: #ffffff;
    color: #334155;
    border-bottom-left-radius: 2px;
    border: 1px solid #e2e8f0;
}

.bns-chat-bubble-user {
    align-self: flex-end;
    background: #1A365D;
    color: #ffffff;
    border-bottom-right-radius: 2px;
}

/* Quick Action Chips */
.bns-chat-chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 4px 0;
    align-self: flex-start;
    max-width: 90%;
}

.bns-chat-chip {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #1A365D;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.bns-chat-chip:hover {
    border-color: #D4AF37;
    background: #fdfdf9;
    transform: translateY(-1px);
}

/* Structured Comparison & Legal Cards in Chat */
.bns-chat-card {
    background: #ffffff;
    border-left: 4px solid #8b0000;
    border-top: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 0.88rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
    align-self: flex-start;
    width: 90%;
}

.bns-chat-card-title {
    font-weight: 700;
    color: #8b0000;
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bns-chat-card-tag {
    font-size: 0.7rem;
    background: #8b0000;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 800;
}

.bns-chat-card-meta {
    font-size: 0.8rem;
    color: #64748b;
    margin: 4px 0 8px 0;
    font-weight: 600;
}

.bns-chat-card-content {
    font-family: 'Georgia', serif;
    line-height: 1.6;
    color: #334155;
    margin-bottom: 8px;
}

.bns-chat-card-link {
    display: inline-block;
    color: #D4AF37;
    font-weight: 700;
    text-decoration: none;
    font-size: 0.82rem;
    transition: color 0.2s;
}

.bns-chat-card-link:hover {
    color: #1A365D;
    text-decoration: underline;
}

/* Typing Indicator State */
.bns-chat-typing {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 12px 18px !important;
}

.bns-chat-typing span {
    width: 6px;
    height: 6px;
    background: #94a3b8;
    border-radius: 50%;
    animation: bnsTyping 1.4s infinite ease-in-out both;
}

.bns-chat-typing span:nth-child(1) { animation-delay: -0.32s; }
.bns-chat-typing span:nth-child(2) { animation-delay: -0.16s; }

@keyframes bnsTyping {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* Chat Footer & Input */
.bns-chat-footer {
    padding: 12px 16px;
    border-top: 1px solid #e2e8f0;
    background: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
}

#bns-chat-input {
    flex-grow: 1;
    border: 1px solid #cbd5e1;
    border-radius: 24px;
    padding: 10px 16px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}

#bns-chat-input:focus {
    border-color: #D4AF37;
}

#bns-chat-send-btn {
    background: #1A365D;
    color: #ffffff;
    border: none;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    flex-shrink: 0;
}

#bns-chat-send-btn:hover {
    background: #11284b;
    transform: scale(1.05);
}

#bns-chat-send-btn:active {
    transform: scale(0.95);
}

/* ==========================================================================
   Chatbot Dark Mode Theme Support
   ========================================================================== */
html.dark-mode #bns-chatbot-window {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
}

html.dark-mode .bns-chat-messages-container {
    background-color: #0f172a;
}

html.dark-mode .bns-chat-bubble-bot {
    background: #1e293b;
    color: #f8fafc;
    border-color: #334155;
}

html.dark-mode .bns-chat-bubble-user {
    background: #1e3a8a;
    color: #ffffff;
}

html.dark-mode .bns-chat-chip {
    background: #1e293b;
    border-color: #334155;
    color: #facc15;
}

html.dark-mode .bns-chat-chip:hover {
    border-color: #facc15;
    background: #334155;
}

html.dark-mode .bns-chat-card {
    background: #1e293b;
    border-color: #334155;
    border-left-color: #ef4444;
}

html.dark-mode .bns-chat-card-title {
    color: #ef4444;
}

html.dark-mode .bns-chat-card-tag {
    background: #ef4444;
}

html.dark-mode .bns-chat-card-meta {
    color: #94a3b8;
}

html.dark-mode .bns-chat-card-content {
    color: #cbd5e1;
}

html.dark-mode .bns-chat-card-link {
    color: #facc15;
}

html.dark-mode .bns-chat-card-link:hover {
    color: #60a5fa;
}

html.dark-mode .bns-chat-footer {
    background: #1e293b;
    border-top-color: #334155;
}

html.dark-mode #bns-chat-input {
    background-color: #0f172a;
    color: #f8fafc;
    border-color: #334155;
}

html.dark-mode #bns-chat-input:focus {
    border-color: #facc15;
}

html.dark-mode #bns-chat-send-btn {
    background: #334155;
}

html.dark-mode #bns-chat-send-btn:hover {
    background: #475569;
}

/* Admin Dashboard Dark Mode (Standard WP Admin doesn't have it natively, but good practice) */
html.dark-mode .bns-settings-card {
    background: #1e293b;
    border-color: #334155;
}

html.dark-mode .bns-settings-card h2 {
    color: #f8fafc;
    border-bottom-color: #334155;
}

html.dark-mode .bns-settings-card .form-table th {
    color: #e2e8f0;
}

html.dark-mode .bns-preview-placeholder {
    background: #0f172a;
    border-color: #334155;
    color: #475569;
}

/* ==========================================================================
   Chat Widget Mobile Responsiveness
   ========================================================================== */
@media (max-width: 480px) {
    #bns-chatbot-window {
        bottom: 0 !important;
        right: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
    }
    
    #bns-chatbot-trigger {
        bottom: 20px !important;
        right: 20px !important;
        padding: 10px 18px !important;
    }
}

/* ==========================================================================
   Advanced Bare Act Features (Bookmarks, Tooltips, Citations & Print Exporter)
   ========================================================================== */

/* 📂 Bookmarks Star Indicator & Button */
.bns-star-toggle {
    position: relative; /* Containing block for absolute pill tooltip */
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.35rem;
    color: #cbd5e1;
    padding: 4px;
    margin-left: 14px; /* Margin-left on the right side */
    margin-right: 0;
    transition: color var(--bns-transition), transform 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    outline: none;
}
.bns-star-toggle:hover {
    color: var(--bns-secondary);
    transform: scale(1.2);
}
.bns-star-toggle.active {
    color: var(--bns-secondary);
    text-shadow: 0 0 3px rgba(212, 175, 55, 0.45);
}

/* Elegant Pill-Style Tooltip Popup sliding from the left side */
.bns-star-toggle::after {
    content: attr(data-tooltip);
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%) translateX(-6px) scale(0.85);
    background: rgba(15, 23, 42, 0.95); /* Deep slate premium glass */
    color: #fdfbf7;
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 20px; /* Perfect pill style shape */
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s cubic-bezier(0.25, 1, 0.5, 1), transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(212, 175, 55, 0.35); /* Subtle gold boundary */
    pointer-events: none; /* Clicking the star won't be blocked by tooltip */
}

/* Hover reveals and expands the pill tooltip */
.bns-star-toggle:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(-10px) scale(1);
}

/* Floating Bookmarks Drawer Panel */
.bns-search-container {
    display: flex !important;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    width: 100%;
}
#bns-live-search {
    flex-grow: 1;
}
.bns-bookmarks-trigger-btn {
    background: var(--bns-primary);
    color: var(--bns-white);
    border: 1px solid var(--bns-primary);
    border-radius: 9999px;
    padding: 10px 22px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 6px rgba(26, 54, 93, 0.12);
    transition: all 0.2s ease;
    white-space: nowrap;
    outline: none;
}
.bns-bookmarks-trigger-btn:hover {
    background: #11284b;
    border-color: #11284b;
    box-shadow: 0 6px 12px rgba(26, 54, 93, 0.2);
    transform: translateY(-1px);
}
.bns-bookmarks-trigger-btn span {
    color: var(--bns-secondary);
}

/* Bookmarks Drawer DOM Layer */
.bns-bookmarks-drawer {
    position: fixed;
    top: 0;
    right: -380px;
    width: 380px;
    height: 100vh;
    background: var(--bns-white);
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.12);
    z-index: 100000;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}
.bns-bookmarks-drawer.open {
    right: 0;
}
.bns-drawer-header {
    padding: 24px;
    background: var(--bns-primary);
    color: var(--bns-white);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid var(--bns-secondary);
}
.bns-drawer-header h3 {
    margin: 0 !important;
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    color: var(--bns-white) !important;
    display: flex;
    align-items: center;
    gap: 8px;
}
.bns-drawer-close-btn {
    background: none;
    border: none;
    color: var(--bns-white);
    font-size: 1.6rem;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}
.bns-drawer-close-btn:hover {
    color: var(--bns-secondary);
}
.bns-drawer-content {
    padding: 24px;
    flex-grow: 1;
    overflow-y: auto;
    background: #f8fafc;
}
.bns-bookmark-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.bns-bookmark-item {
    background: var(--bns-white);
    border: 1px solid var(--bns-border);
    border-radius: 8px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.01);
}
.bns-bookmark-item:hover {
    border-color: var(--bns-secondary);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.04);
}
.bns-bookmark-item-title {
    font-weight: 700;
    font-size: 1rem;
    color: var(--bns-primary);
    line-height: 1.3;
}
.bns-bookmark-item-meta {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 600;
    letter-spacing: 0.3px;
}
.bns-bookmark-empty {
    text-align: center;
    color: #94a3b8;
    padding: 60px 20px;
    font-size: 1rem;
}
.bns-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(2px);
    z-index: 99999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.bns-drawer-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

/* Fix: Prevent glossary tooltips from being clipped by overflow/stacking context of accordion panels when expanded */
.bns-accordion-item:has(.bns-accordion-header[aria-expanded="true"]) {
    overflow: visible !important;
    position: relative;
    z-index: 99 !important; /* Forces expanded card to stack above adjacent ones */
}

.bns-accordion-header[aria-expanded="true"] + .bns-accordion-content {
    overflow: visible !important;
}

.bns-accordion-header[aria-expanded="true"] + .bns-accordion-content .bns-accordion-content-wrapper {
    overflow: visible !important;
}

/* 🗣️ Bilingual Legal Glossary Tooltips */
.bns-glossary-term {
    border-bottom: 1.5px dotted var(--bns-secondary);
    cursor: help;
    position: relative;
    display: inline-block;
    transition: background-color 0.2s ease;
    font-weight: inherit;
    color: inherit;
    padding: 0 1px;
}
.bns-glossary-term:hover {
    background-color: rgba(212, 175, 55, 0.12);
}
.bns-tooltip-bubble {
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: #1e293b;
    color: #f8fafc;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    line-height: 1.6;
    width: 240px;
    max-width: 80vw; /* Perfect mobile responsiveness constraint */
    box-shadow: 0 10px 20px rgba(0,0,0,0.18);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    text-align: left;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
}
.bns-tooltip-bubble::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: #1e293b transparent transparent transparent;
}
.bns-glossary-term:hover .bns-tooltip-bubble {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(-2px);
}
.bns-tooltip-hindi {
    display: block;
    font-weight: 700;
    color: var(--bns-secondary);
    font-size: 0.98rem;
    margin-bottom: 4px;
}
.bns-tooltip-eng-meaning {
    display: block;
    font-size: 0.78rem;
    color: #94a3b8;
    border-top: 1px solid #334155;
    margin-top: 6px;
    padding-top: 6px;
}

/* 📋 Citation & Print Exporter Buttons */
.bns-section-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-bottom: 18px;
    border-bottom: 1px dashed var(--bns-border);
    padding-bottom: 14px;
}
.bns-action-btn {
    background: #f8fafc;
    color: #475569;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
    outline: none;
}
.bns-action-btn:hover {
    background: var(--bns-hover);
    color: var(--bns-primary);
    border-color: #cbd5e1;
}
.bns-action-btn svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}
.bns-action-btn.copied {
    background: #10b981 !important;
    color: white !important;
    border-color: #10b981 !important;
}

/* ==========================================================================
   Advanced Premium Dark Mode Theme Support
   ========================================================================== */
html.dark-mode .bns-bookmarks-drawer {
    background: #1e293b;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.45);
}
html.dark-mode .bns-drawer-header {
    background: #0f172a;
    border-bottom-color: var(--bns-secondary);
}
html.dark-mode .bns-drawer-content {
    background: #0f172a;
}
html.dark-mode .bns-bookmark-item {
    background: #1e293b;
    border-color: #334155;
}
html.dark-mode .bns-bookmark-item:hover {
    border-color: var(--bns-secondary);
}
html.dark-mode .bns-bookmark-item-title {
    color: var(--bns-white);
}
html.dark-mode .bns-bookmark-item-meta {
    color: #94a3b8;
}
html.dark-mode .bns-action-btn {
    background: #1e293b;
    color: #cbd5e1;
    border-color: #334155;
}
html.dark-mode .bns-action-btn:hover {
    background: #334155;
    color: var(--bns-white);
}
html.dark-mode .bns-tooltip-bubble {
    background: #0f172a;
    box-shadow: 0 8px 16px rgba(0,0,0,0.45);
}
html.dark-mode .bns-tooltip-bubble::after {
    border-color: #0f172a transparent transparent transparent;
}
html.dark-mode .bns-glossary-term {
    border-bottom-color: #facc15;
}
html.dark-mode .bns-glossary-term:hover {
    background-color: rgba(250, 204, 21, 0.15);
}

/* ==========================================================================
   🖨️ Courtroom Print Stylesheet Overrides
   ========================================================================== */
@media print {
    body * {
        visibility: hidden !important;
    }
    .bns-guru-container, .bns-guru-container *, 
    .bns-accordion-item.print-active, .bns-accordion-item.print-active *,
    .bns-accordion-item.print-active .bns-accordion-content, .bns-accordion-item.print-active .bns-accordion-content * {
        visibility: visible !important;
    }
    
    .bns-accordion-item {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        border: none !important;
        box-shadow: none !important;
        transform: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    .bns-accordion-header {
        border: none !important;
        background: none !important;
        padding: 10px 0 !important;
    }
    .bns-accordion-content {
        grid-template-rows: 1fr !important;
    }
    .bns-content-inner {
        border: none !important;
        padding: 20px 0 !important;
        font-size: 13pt !important;
        line-height: 1.7 !important;
        font-family: 'Georgia', serif !important;
        color: #000000 !important;
    }
    .bns-star-toggle, .bns-section-actions, .bns-icon, #bns-chatbot-widget-root, .bns-back-btn, .bns-bookmarks-trigger-btn, .bns-search-container {
        display: none !important;
        visibility: hidden !important;
    }
}
@media (max-width: 480px) {
    .bns-bookmarks-drawer {
        width: 100vw !important;
        right: -100vw !important;
    }
}
