/* ========================================================================
   tool-page-deferred.css — deferred CSS bundle (async, below-fold / conditional)
   Generated by scripts/build-css-bundle.sh on 2026-06-01T17:25:26Z
   DO NOT EDIT BY HAND — your changes will be overwritten.
   Edit the source files in /Users/anish/git/crypto-tool/src/main/webapp/modern/css/, then re-run the script.
   ====================================================================== */

/* === [1/3] ads.css === */
/**
 * Modern Ad System Styling
 * Mobile-first, non-intrusive ad placement
 */

/* ============================================
   AD CONTAINER BASE STYLES
   ============================================ */

.ad-container {
    position: relative;
    background: var(--bg-primary, #ffffff);
    border: 1px solid var(--border, #e2e8f0);
    border-left: 3px solid var(--primary, #6366f1);
    border-radius: var(--radius-md, 0.5rem);
    padding: var(--space-4, 1rem);
    margin: var(--space-8, 2rem) 0;
    text-align: center;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ad-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Ad Label (Required by AdSense) */
.ad-label {
    font-size: var(--text-xs, 0.75rem);
    color: var(--text-muted, #94a3b8);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-2, 0.5rem);
    text-align: center;
    font-weight: 500;
}

/* ============================================
   IN-CONTENT AD STYLES
   ============================================ */

.ad-in-content-top,
.ad-in-content-mid {
    min-height: 90px; /* Prevent layout shift */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Desktop: Leaderboard */
@media (min-width: 992px) {
    .ad-in-content-top {
        min-height: 90px;
        padding: var(--space-6, 1.5rem);
        max-width: 970px;
        margin-left: auto;
        margin-right: auto;
    }

    .ad-in-content-mid {
        min-height: 280px; /* Accommodate 336x280 */
        max-width: 336px;
        margin-left: auto;
        margin-right: 0; /* Right-align for better visibility */
    }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 991px) {
    .ad-in-content-top {
        min-height: 90px;
    }

    .ad-in-content-mid {
        min-height: 250px;
        max-width: 300px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .ad-container {
        margin: var(--space-6, 1.5rem) 0;
        padding: var(--space-3, 0.75rem);
    }

    .ad-in-content-top {
        min-height: 100px;
    }

    .ad-in-content-mid {
        min-height: 250px;
        width: 100%;
        max-width: 100%;
    }
}

/* ============================================
   HERO BANNER AD (Above-the-fold, inside hero)
   ============================================ */

.ad-hero-banner {
    margin: 0;
    border: none;
    border-left: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 8px 0;
    min-height: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.ad-hero-banner:hover {
    transform: none;
    box-shadow: none;
}

.ad-hero-banner .ad-label {
    font-size: 9px;
    margin-bottom: 4px;
    opacity: 0.6;
}

/* Desktop: wide leaderboard */
@media (min-width: 992px) {
    .ad-hero-banner {
        min-height: 90px;
        max-width: 970px;
        margin: 0 auto;
        padding: 10px 0;
    }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 991px) {
    .ad-hero-banner {
        min-height: 90px;
        max-width: 728px;
        margin: 0 auto;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .ad-hero-banner {
        min-height: 50px;
        padding: 6px 0;
    }
}

/* Collapse if empty (no ad fill) */
.ad-hero-banner:not(.ad-loaded) {
    min-height: 0;
    padding: 0;
}

/* Dark theme */
[data-theme="dark"] .ad-hero-banner {
    background: transparent;
    border-color: transparent;
}

/* ============================================
   FLOATING RIGHT AD STYLES (Desktop Only)
   ============================================ */

.ad-floating-right {
    position: fixed;
    right: 10px;  /* Moved closer to edge */
    top: 100px;
    width: 300px;  /* Slightly smaller to fit better */
    max-width: 300px;
    z-index: 100;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateX(20px);
    margin: 0;
    border-radius: var(--radius-lg, 0.75rem);
}

.ad-floating-right.ad-visible {
    display: block;
    opacity: 1;
    transform: translateX(0);
}

/* Hide on mobile/tablet and smaller desktop screens */
@media (max-width: 1299px) {
    .ad-floating-right {
        display: none !important;
    }
}

/* Desktop - only show on screens 1300px+ */
/* Hide floating right ad when right column ads are present */
@media (min-width: 1300px) {
    body.has-right-ads .ad-floating-right {
        display: none !important;
    }
    
    .ad-floating-right {
        min-height: 250px;
        bottom: 120px; /* Above sticky footer */
        right: 15px;  /* Safe distance from edge */
    }
}

/* Large screens - more breathing room */
@media (min-width: 1440px) {
    .ad-floating-right {
        right: 25px;
        width: 336px;  /* Can show full size on larger screens */
        max-width: 336px;
    }
}

/* Extra large screens - optimal positioning */
@media (min-width: 1600px) {
    .ad-floating-right {
        right: 40px;
    }
}

/* Ultra-wide screens */
@media (min-width: 1920px) {
    .ad-floating-right {
        right: 60px;
    }
}

/* Close button for floating ad */
.ad-floating-right .ad-close {
    top: var(--space-2, 0.5rem);
    right: var(--space-2, 0.5rem);
    z-index: 2;
}

/* ============================================
   RIGHT COLUMN AD CONTAINER (Desktop Only)
   Uses empty space on the right side
   ============================================ */

.ad-right-column {
    position: fixed;
    right: 10px;
    top: 100px;
    width: 300px;
    max-width: 300px;
    z-index: 99;
    display: none;
    flex-direction: column;
    gap: 1.5rem;
}

/* Show right column ads on large desktop screens */
/* Use dedicated grid column when available, otherwise fixed positioning */
@media (min-width: 1300px) {
    .ad-right-column {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }
    
    /* If inside tool-main grid, use grid positioning instead of fixed */
    .tool-main > .ad-right-column {
        position: sticky;
        top: 100px; /* Sticky within grid column */
        align-self: start;
        width: 100%;
        max-width: 336px;
        height: fit-content;
    }
    
    /* Fallback: Fixed positioning when not in grid */
    .ad-right-column:not(.tool-main > *) {
        position: fixed;
        right: 10px;
        top: 100px;
        width: 300px;
        max-width: 300px;
    }
}

/* Large screens - full size */
@media (min-width: 1440px) {
    .ad-right-column {
        width: 336px;
        max-width: 336px;
        right: 15px;
    }
    
    /* In grid layout, use full width of grid column */
    .tool-main .ad-right-column {
        max-width: 100%;
    }
}

/* Extra large screens */
@media (min-width: 1600px) {
    .ad-right-column {
        right: 25px;
    }
}

/* Ultra-wide screens */
@media (min-width: 1920px) {
    .ad-right-column {
        right: 40px;
    }
}

/* Right Column Ad Slot */
.ad-right-slot {
    position: relative;
    min-height: 250px;
    display: none;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    margin: 0;
}

.ad-right-slot.ad-visible {
    display: block;
    opacity: 1;
    transform: translateX(0);
}

/* Content width optimization - now handled by grid layout */
/* Fallback for when grid is not used */
@media (min-width: 1300px) {
    /* Grid layout handles spacing automatically, but keep fallback for compatibility */
    .tool-main:not(:has(.ad-right-column)) .tool-container {
        max-width: calc(100vw - 3rem);
    }
    
    /* Header and breadcrumbs still use calculated widths */
    body.has-right-ads .tool-header-container {
        max-width: calc(100vw - 380px - 3rem) !important;
        margin-left: 1.5rem !important;
        margin-right: auto !important;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    body.has-right-ads .breadcrumbs-container {
        max-width: calc(100vw - 380px - 3rem) !important;
        margin-left: 1.5rem !important;
        margin-right: auto !important;
    }
}

@media (min-width: 1440px) {
    body.has-right-ads .tool-header-container {
        max-width: calc(100vw - 420px - 3rem) !important;
    }
    
    body.has-right-ads .breadcrumbs-container {
        max-width: calc(100vw - 420px - 3rem) !important;
    }
}

@media (min-width: 1600px) {
    body.has-right-ads .tool-header-container {
        max-width: min(1400px, calc(100vw - 420px - 3rem)) !important;
    }
    
    body.has-right-ads .breadcrumbs-container {
        max-width: min(1400px, calc(100vw - 420px - 3rem)) !important;
    }
}

/* Right column ad close button */
.ad-right-slot .ad-close {
    top: var(--space-2, 0.5rem);
    right: var(--space-2, 0.5rem);
    z-index: 2;
    background: var(--bg-primary, #ffffff);
    border: 1px solid var(--border, #e2e8f0);
}

.ad-right-slot .ad-close:hover {
    background: var(--bg-secondary, #f8fafc);
    border-color: var(--primary, #6366f1);
}

/* ============================================
   STICKY FOOTER AD STYLES
   ============================================ */

.ad-sticky-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: var(--z-fixed, 1030);
    margin: 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
    border-top: 1px solid var(--border, #e2e8f0);
    background: var(--bg-primary, #ffffff);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    padding: var(--space-3, 0.75rem) var(--space-4, 1rem);
    min-height: auto;
    display: none; /* Hidden by default, shown via JS */
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
}

/* Desktop: Position sticky footer ad to the right side */
@media (min-width: 992px) {
    .ad-sticky-footer {
        left: auto; /* Remove left: 0 */
        right: 20px; /* Position from right edge */
        width: 728px; /* Standard leaderboard width */
        max-width: 728px;
        border-radius: var(--radius-lg, 0.75rem) var(--radius-lg, 0.75rem) 0 0;
        border-left: 1px solid var(--border, #e2e8f0);
        border-right: 1px solid var(--border, #e2e8f0);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    }

    /* Ensure close button is easily accessible on desktop */
    .ad-sticky-footer .ad-close {
        top: var(--space-2, 0.5rem);
        right: var(--space-2, 0.5rem);
        background: var(--bg-primary, #ffffff);
        border: 1px solid var(--border, #e2e8f0);
        z-index: 2;
    }

    .ad-sticky-footer .ad-close:hover {
        background: var(--bg-secondary, #f8fafc);
        border-color: var(--primary, #6366f1);
    }
}

.ad-sticky-footer.ad-visible {
    display: block;
    transform: translateY(0);
}

.ad-sticky-footer.ad-collapsed {
    transform: translateY(80%);
}

.ad-sticky-footer.ad-dismissed {
    transform: translateY(100%);
}

/* Close Button */
.ad-close {
    position: absolute;
    top: var(--space-2, 0.5rem);
    right: var(--space-2, 0.5rem);
    background: none;
    border: none;
    font-size: var(--text-xl, 1.25rem);
    color: var(--text-muted, #94a3b8);
    cursor: pointer;
    padding: var(--space-1, 0.25rem);
    line-height: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full, 9999px);
    transition: all 0.2s ease;
    z-index: 1;
}

.ad-close:hover {
    background: var(--bg-secondary, #f8fafc);
    color: var(--text-primary, #0f172a);
}

.ad-close:focus {
    outline: 2px solid var(--primary, #6366f1);
    outline-offset: 2px;
}

/* Mobile Sticky Footer */
@media (max-width: 767px) {
    .ad-sticky-footer {
        padding: var(--space-2, 0.5rem);
    }

    .ad-close {
        width: 36px;
        height: 36px;
        font-size: var(--text-2xl, 1.5rem);
    }
}

/* ============================================
   AD CONTENT WRAPPER
   ============================================ */

.ad-content {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ============================================
   RESPONSIVE AD SIZING
   ============================================ */

/* Ensure ads don't overflow */
.ad-container ins {
    display: block;
    width: 100%;
    max-width: 100%;
}

/* Desktop: Center and constrain leaderboard */
@media (min-width: 992px) {
    #site_8gwifi_org_leaderboard_responsive {
        min-height: 90px;
        max-width: 970px;
        margin: 0 auto;
    }

    #site_8gwifi_org_anchor_responsive {
        min-height: 90px;
        max-width: 970px;
        margin: 0 auto;
    }

    #site_8gwifi_org_rectangle_responsive {
        min-height: 280px;
        max-width: 336px;
    }

    #site_8gwifi_org_floating_right {
        min-height: 280px;
        max-width: 336px;
    }
}


/* Tablet */
@media (min-width: 768px) and (max-width: 991px) {
    #site_8gwifi_org_leaderboard_responsive {
        min-height: 90px;
    }
}

/* Mobile */
@media (max-width: 767px) {
    #site_8gwifi_org_leaderboard_responsive {
        min-height: 100px;
    }

    #site_8gwifi_org_rectangle_responsive {
        min-height: 250px;
    }

    #site_8gwifi_org_anchor_responsive {
        min-height: 100px;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

/* Accessibility: aria-label ensures screen readers can identify ads */

.ad-container:focus-within {
    outline: 2px solid var(--primary, #6366f1);
    outline-offset: 2px;
}

/* ============================================
   DARK MODE SUPPORT
   ============================================ */

@media (prefers-color-scheme: dark) {
    .ad-container {
        background: var(--bg-secondary, #1e293b);
        border-color: var(--border, #334155);
    }

    .ad-label {
        color: var(--text-muted, #94a3b8);
    }

    .ad-sticky-footer {
        background: var(--bg-primary, #0f172a);
        border-top-color: var(--border, #334155);
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
    }

    .ad-close:hover {
        background: var(--bg-secondary, #1e293b);
        color: var(--text-primary, #f1f5f9);
    }
}

[data-theme="dark"] .ad-container {
    background: var(--bg-secondary, #1e293b);
    border-color: var(--border, #334155);
}

[data-theme="dark"] .ad-sticky-footer {
    background: var(--bg-primary, #0f172a);
    border-top-color: var(--border, #334155);
}

[data-theme="dark"] .ad-floating-right {
    background: var(--bg-secondary, #1e293b);
    border-color: var(--border, #334155);
}

[data-theme="dark"] .ad-floating-right .ad-close:hover {
    background: var(--bg-tertiary, #334155);
    color: var(--text-primary, #f1f5f9);
}

/* ============================================
   EDITOR PANEL NATIVE AD
   Fits inside .me-right-panel (280px wide)
   ============================================ */
.ad-panel-native {
    margin: 0;
    padding: 8px;
    border: none;
    border-bottom: 1px solid var(--border, #e2e8f0);
    border-left: none;
    border-radius: 0;
    box-shadow: none;
    background: var(--bg-secondary, #f8fafc);
    max-width: 280px;
    min-height: 250px;
    flex-shrink: 0;
}

.ad-panel-native:hover {
    transform: none;
    box-shadow: none;
}

.ad-panel-native .ad-label {
    font-size: 9px;
    color: var(--text-muted, #94a3b8);
    margin-bottom: 4px;
}

/* Hidden when right panel is hidden (<= 1024px) */
@media (max-width: 1024px) {
    .ad-panel-native {
        display: none !important;
    }
}

/* ============================================
   DASHBOARD SIDEBAR NATIVE AD
   Fits inside .me-sidebar (240px wide)
   ============================================ */
.ad-sidebar-native {
    margin: 16px 0 0 0;
    padding: 8px;
    border: none;
    border-top: 1px solid var(--border, #e2e8f0);
    border-left: none;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    max-width: 220px;
    min-height: 200px;
}

.ad-sidebar-native:hover {
    transform: none;
    box-shadow: none;
}

.ad-sidebar-native .ad-label {
    font-size: 9px;
    color: var(--text-muted, #94a3b8);
    margin-bottom: 4px;
}

/* Hidden when sidebar collapses */
@media (max-width: 768px) {
    .ad-sidebar-native {
        display: none !important;
    }
}

/* ============================================
   DASHBOARD BELOW-GRID LEADERBOARD
   Sits after the document grid
   ============================================ */
.ad-below-grid {
    margin: 32px auto 16px auto;
    padding: 12px;
    max-width: 728px;
    min-height: 90px;
    border-left-width: 2px;
}

@media (max-width: 991px) {
    .ad-below-grid {
        max-width: 100%;
        min-height: 100px;
    }
}

/* Dark mode */
[data-theme="dark"] .ad-panel-native {
    background: var(--bg-secondary, #1e293b);
    border-bottom-color: var(--border, #334155);
}

[data-theme="dark"] .ad-sidebar-native {
    border-top-color: var(--border, #334155);
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .ad-container {
        display: none !important;
    }
}

/* ============================================
   PERFORMANCE OPTIMIZATIONS
   ============================================ */

/* Prevent layout shift while ads load */
.ad-container::before {
    content: '';
    display: block;
    width: 100%;
}

.ad-in-content-top::before {
    padding-bottom: 12.4%; /* 90px / 728px ≈ 12.4% */
}

.ad-in-content-mid::before {
    padding-bottom: 83.3%; /* 250px / 300px ≈ 83.3% */
}

@media (max-width: 991px) {
    .ad-in-content-top::before {
        padding-bottom: 31.25%; /* 100px / 320px ≈ 31.25% */
    }
}
/* === [2/3] dark-mode.css === */
/**
 * Dark Mode Styles
 * Complete dark theme support
 */

/* Light theme - explicit reset (uses :root defaults, but ensures consistency) */
[data-theme="light"] {
    /* Background Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-hover: #f8fafc;
    
    /* Text Colors */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-inverse: #ffffff;
    
    /* Border Colors */
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --border-dark: #cbd5e1;
}

/* Ensure light theme body/html */
[data-theme="light"] html,
[data-theme="light"] body {
    background-color: var(--bg-primary, #ffffff) !important;
    color: var(--text-primary, #0f172a) !important;
}

/* Dark theme */
[data-theme="dark"] {
    /* Background Colors */
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-hover: #1e293b;
    
    /* Text Colors */
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-inverse: #0f172a;
    
    /* Border Colors */
    --border: #334155;
    --border-light: #475569;
    --border-dark: #64748b;
}

/* Apply dark mode to html and body - CRITICAL for visible theme change */
[data-theme="dark"] html {
    background-color: var(--bg-primary, #0f172a) !important;
}

[data-theme="dark"] body {
    background-color: var(--bg-primary, #0f172a) !important;
    color: var(--text-primary, #f1f5f9) !important;
}

/* Light theme - breadcrumbs and tool sections */
[data-theme="light"] .breadcrumbs {
    background: var(--bg-secondary, #f8fafc) !important;
    border-bottom-color: var(--border, #e2e8f0) !important;
}

[data-theme="light"] .tool-header {
    background: transparent !important;
}

[data-theme="light"] .tool-main {
    background-color: var(--bg-primary, #ffffff) !important;
}

/* Dark mode breadcrumbs */
[data-theme="dark"] .breadcrumbs {
    background: var(--bg-secondary, #1e293b) !important;
    border-bottom-color: var(--border, #334155) !important;
}

[data-theme="dark"] .breadcrumb-current {
    color: var(--text-secondary, #cbd5e1) !important;
}

/* Dark mode tool header */
[data-theme="dark"] .tool-header {
    background: var(--bg-primary, #0f172a) !important;
}

[data-theme="dark"] .tool-page-title {
    color: var(--text-primary, #f1f5f9) !important;
}

[data-theme="dark"] .tool-page-description {
    color: var(--text-secondary, #cbd5e1) !important;
}

/* Dark mode tool main */
[data-theme="dark"] .tool-main {
    background-color: var(--bg-primary, #0f172a) !important;
}

/* Theme Toggle Button */
.theme-toggle {
    background: var(--bg-secondary, #f8fafc);
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 0.5rem;
    padding: 0.5rem;
    cursor: pointer;
    font-size: 1.25rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.theme-toggle:hover {
    background: var(--bg-tertiary, #f1f5f9);
    transform: scale(1.1);
}

[data-theme="dark"] .theme-toggle {
    background: var(--bg-secondary, #1e293b);
    border-color: var(--border, #334155);
}

[data-theme="dark"] .theme-toggle:hover {
    background: var(--bg-tertiary, #334155);
}

/* Dark Mode Hero Section */
[data-theme="dark"] .hero {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

[data-theme="dark"] .hero::before {
    background: 
        radial-gradient(circle at 20% 50%, rgba(255,255,255,0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255,255,255,0.05) 0%, transparent 50%);
}

[data-theme="dark"] .hero::after {
    background-image: 
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px);
}

/* Dark Mode Tool Cards */
[data-theme="dark"] .tool-card {
    background: var(--bg-secondary, #1e293b);
    border-color: var(--border, #334155);
    color: var(--text-primary, #f1f5f9);
}

[data-theme="dark"] .tool-card:hover {
    background: var(--bg-tertiary, #334155);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .tool-title {
    color: var(--text-primary, #f1f5f9);
}

[data-theme="dark"] .tool-description {
    color: var(--text-secondary, #cbd5e1);
}

[data-theme="dark"] .tool-link {
    color: var(--text-secondary, #cbd5e1);
}

[data-theme="dark"] .tool-link:hover {
    background: var(--bg-tertiary, #334155);
    color: var(--primary, #818cf8);
}

[data-theme="dark"] .tool-more-btn {
    background: var(--bg-tertiary, #334155);
    border-color: var(--border, #334155);
    color: var(--text-secondary, #cbd5e1);
}

[data-theme="dark"] .tool-more-btn:hover {
    background: var(--primary, #6366f1);
    color: white;
}

[data-theme="dark"] .tool-more-content {
    border-top-color: var(--border, #334155);
}

/* Dark Mode Search */
[data-theme="dark"] .search-wrapper {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .search-wrapper:focus-within {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .search-input-hero {
    color: white;
}

/* Dark Mode Footer */
[data-theme="dark"] .page-footer {
    background: #0a0f1a;
    border-top-color: var(--border, #334155);
}

[data-theme="dark"] .footer-link {
    color: rgba(255, 255, 255, 0.7);
}

[data-theme="dark"] .footer-link:hover {
    color: white;
}

/* Dark Mode Navigation */
[data-theme="dark"] .modern-nav {
    background: var(--bg-secondary, #1e293b);
    border-bottom-color: var(--border, #334155);
}

[data-theme="dark"] .nav-link {
    color: var(--text-secondary, #cbd5e1);
}

[data-theme="dark"] .nav-link:hover {
    background: var(--bg-tertiary, #334155);
    color: var(--primary, #818cf8);
}

[data-theme="dark"] .search-input {
    background: var(--bg-tertiary, #334155);
    border-color: var(--border, #334155);
    color: var(--text-primary, #f1f5f9);
}

[data-theme="dark"] .btn-nav-secondary {
    background: var(--bg-tertiary, #334155);
    border-color: var(--border, #334155);
    color: var(--text-secondary, #cbd5e1);
}

/* Dark Mode Mobile Drawer */
[data-theme="dark"] .mobile-drawer {
    background: var(--bg-secondary, #1e293b);
}

[data-theme="dark"] .drawer-header {
    border-bottom-color: var(--border, #334155);
}

[data-theme="dark"] .drawer-link {
    color: var(--text-primary, #f1f5f9);
}

[data-theme="dark"] .drawer-link:hover {
    background: var(--bg-tertiary, #334155);
    color: var(--primary, #818cf8);
}

/* Dark Mode Search Results */
[data-theme="dark"] .search-results {
    background: var(--bg-secondary, #1e293b);
    border-color: var(--border, #334155);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .search-result-item {
    color: var(--text-primary, #f1f5f9);
    border-bottom-color: var(--border, #334155);
}

[data-theme="dark"] .search-result-item:hover {
    background: var(--bg-tertiary, #334155);
}

[data-theme="dark"] .search-result-category {
    color: var(--text-muted, #94a3b8);
}

/* Smooth Transitions - Apply to specific elements only */
html,
body,
.theme-toggle,
.nav-link,
.drawer-link,
.tool-card,
.button,
input,
textarea,
select,
.card,
.alert {
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

/* Faster transitions for interactive elements */
button,
a,
.nav-link,
.drawer-link {
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

/* ──────────────────────────────────────────────────────────────────
   Print stylesheet — force light theme regardless of [data-theme]
   ──────────────────────────────────────────────────────────────────
   Without this block, printing (or "Save as PDF") while in dark
   theme produces near-invisible light text on white paper: the
   browser strips background colors for ink-saving but keeps the
   text color, which in dark mode is a near-white #f1f5f9. The
   result is unreadable on paper.

   Fix: reset every dark-theme CSS variable to its light counterpart
   inside @media print, and force html/body back to dark-on-white.
   This auto-applies to every JSP that loads dark-mode.css, so the
   worksheet engine, math calculators, biology tools, and any future
   tool benefits without per-tool changes.

   Also kills CSS transitions/animations during print — Chrome
   occasionally snapshots mid-transition states which prints weird. */
@media print {
    [data-theme="dark"] {
        --bg-primary:     #ffffff !important;
        --bg-secondary:   #ffffff !important;
        --bg-tertiary:    #f5f5f5 !important;
        --bg-hover:       #f5f5f5 !important;
        --text-primary:   #0f172a !important;
        --text-secondary: #334155 !important;
        --text-muted:     #64748b !important;
        --text-inverse:   #ffffff !important;
        --border:         #cbd5e1 !important;
        --border-light:   #e2e8f0 !important;
        --border-dark:    #94a3b8 !important;
    }
    /* Belt-and-suspenders: even if a rule sidesteps the vars and
       inherits from html/body, it now starts from dark-on-white. */
    [data-theme="dark"] html,
    [data-theme="dark"] body {
        background: #ffffff !important;
        color: #0f172a !important;
    }
    /* Generic per-element fallback: dark-themed surfaces commonly
       set background:#1e293b or similar. Force their backgrounds
       transparent in print so they don't carry a dark fill onto
       white paper if the browser respects background printing. */
    [data-theme="dark"] .breadcrumbs,
    [data-theme="dark"] .tool-header,
    [data-theme="dark"] .tool-main,
    [data-theme="dark"] .tool-card,
    [data-theme="dark"] .modern-nav,
    [data-theme="dark"] .page-footer,
    [data-theme="dark"] .hero,
    [data-theme="dark"] .mobile-drawer,
    [data-theme="dark"] .search-results {
        background: #ffffff !important;
        color: #0f172a !important;
    }
    /* Strip transitions and animations during print so the browser
       doesn't snapshot an in-progress fade as the printable frame. */
    *, *::before, *::after {
        transition: none !important;
        animation: none !important;
    }
}


/* === [3/3] footer.css === */
/**
 * Footer Styles
 * Shared footer styling for all pages
 */

/* Footer */
.page-footer {
    background: #0f172a;
    color: white;
    padding: 3rem 1.5rem;
    text-align: center;
    margin-top: 5rem;
    width: 100%;
    clear: both; /* Clear any floats */
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto; /* Center the footer content */
    padding: 0;
}

.footer-text {
    font-size: 0.9375rem;
    opacity: 0.8;
    margin-bottom: 1rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.footer-link {
    color: white;
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.2s;
    font-size: 0.875rem;
}

.footer-link:hover {
    opacity: 1;
}

/* Ensure footer is not affected by grid layouts */
.page-footer {
    display: block;
    grid-column: 1 / -1; /* Span all columns if inside grid */
}

/* Dark mode support */
[data-theme="dark"] .page-footer {
    background: #0a0f1a;
    border-top: 1px solid var(--border, #334155);
}

[data-theme="dark"] .footer-link {
    color: rgba(255, 255, 255, 0.7);
}

[data-theme="dark"] .footer-link:hover {
    color: white;
}



