/* Dark theme link customization for hacker vibe */

/* Fix macOS bounce scrolling white background in dark mode */
[data-theme="dark"] body {
    background-color: #1a1a1a !important;
}

[data-theme="dark"] html {
    background-color: #1a1a1a !important;
}

/* Fix iPhone status bar color in dark mode */
[data-theme="dark"] {
    color-scheme: dark;
}

[data-theme="light"] {
    color-scheme: light;
}

/* PWA status bar styling for dark mode */
@media (display-mode: standalone) {
    [data-theme="dark"] {
        --status-bar-color: #1a1a1a;
    }
}

/* Mobile-specific status bar fixes */
@media screen and (max-width: 768px) {
    [data-theme="dark"] {
        color-scheme: dark;
        -webkit-color-scheme: dark;
    }
    
    [data-theme="light"] {
        color-scheme: light;
        -webkit-color-scheme: light;
    }
}

/* iOS Safari specific fixes */
@supports (-webkit-touch-callout: none) {
    [data-theme="dark"] {
        color-scheme: dark;
        -webkit-color-scheme: dark;
    }
    
    [data-theme="light"] {
        color-scheme: light;
        -webkit-color-scheme: light;
    }
}

/* Dark mode admonition blocks - Hacker Green theme */
[data-theme="dark"] .rst-content .admonition,
[data-theme="dark"] .rst-content .note,
[data-theme="dark"] .rst-content .seealso,
[data-theme="dark"] .rst-content .wy-alert-info.admonition,
[data-theme="dark"] .rst-content .wy-alert-info.admonition-todo,
[data-theme="dark"] .rst-content .wy-alert-info.attention,
[data-theme="dark"] .rst-content .wy-alert-info.caution,
[data-theme="dark"] .rst-content .wy-alert-info.danger,
[data-theme="dark"] .rst-content .wy-alert-info.error,
[data-theme="dark"] .rst-content .wy-alert-info.hint,
[data-theme="dark"] .rst-content .wy-alert-info.important,
[data-theme="dark"] .rst-content .wy-alert-info.tip,
[data-theme="dark"] .rst-content .wy-alert-info.warning,
[data-theme="dark"] .rst-content .wy-alert.wy-alert-info {
    background-color: #18241e !important; /* Dark green background */
}

[data-theme="dark"] .rst-content .admonition .admonition-title,
[data-theme="dark"] .rst-content .note .admonition-title,
[data-theme="dark"] .rst-content .note .wy-alert-title,
[data-theme="dark"] .rst-content .seealso .admonition-title,
[data-theme="dark"] .rst-content .seealso .wy-alert-title,
[data-theme="dark"] .rst-content .wy-alert-info.admonition-todo .admonition-title,
[data-theme="dark"] .rst-content .wy-alert-info.admonition-todo .wy-alert-title,
[data-theme="dark"] .rst-content .wy-alert-info.admonition .admonition-title,
[data-theme="dark"] .rst-content .wy-alert-info.admonition .wy-alert-title,
[data-theme="dark"] .rst-content .wy-alert-info.attention .admonition-title,
[data-theme="dark"] .rst-content .wy-alert-info.attention .wy-alert-title,
[data-theme="dark"] .rst-content .wy-alert-info.caution .admonition-title,
[data-theme="dark"] .rst-content .wy-alert-info.caution .wy-alert-title,
[data-theme="dark"] .rst-content .wy-alert-info.danger .admonition-title,
[data-theme="dark"] .rst-content .wy-alert-info.danger .wy-alert-title,
[data-theme="dark"] .rst-content .wy-alert-info.error .admonition-title,
[data-theme="dark"] .rst-content .wy-alert-info.error .wy-alert-title,
[data-theme="dark"] .rst-content .wy-alert-info.hint .admonition-title,
[data-theme="dark"] .rst-content .wy-alert-info.hint .wy-alert-title,
[data-theme="dark"] .rst-content .wy-alert-info.important .admonition-title,
[data-theme="dark"] .rst-content .wy-alert-info.important .wy-alert-title,
[data-theme="dark"] .rst-content .wy-alert-info.tip .admonition-title,
[data-theme="dark"] .rst-content .wy-alert-info.tip .wy-alert-title,
[data-theme="dark"] .rst-content .wy-alert-info.warning .admonition-title,
[data-theme="dark"] .rst-content .wy-alert-info.warning .wy-alert-title,
[data-theme="dark"] .rst-content .wy-alert.wy-alert-info .admonition-title,
[data-theme="dark"] .wy-alert.wy-alert-info .rst-content .admonition-title,
[data-theme="dark"] .wy-alert.wy-alert-info .wy-alert-title {
    background-color: #1a4d2e !important; /* Darker green for title */
    color: #71b382 !important; /* Bright green text */
}

/* Link colors for both themes */
/* Light theme - default RTD colors (only for content area) */
[data-theme="light"] .rst-content a {
    color: #3091d1 !important;
    transition: color 0.3s ease;
}

[data-theme="light"] .rst-content a:visited {
    color: #551A8B !important;
}

[data-theme="light"] .rst-content a:hover {
    color: #3091d1 !important;
}

/* Dark mode link colors - Hacker Green (only for content) */
/* General links - keeping sidebar default */
[data-theme="dark"] a {
    color: inherit;
    transition: color 0.3s ease;
}

[data-theme="dark"] a:hover {
    color: inherit;
    text-shadow: none;
}

[data-theme="dark"] a:visited {
    color: inherit;
}

[data-theme="dark"] a:active {
    color: inherit;
}

/* Dark mode link colors for specific elements - keeping sidebar default */
/* Sidebar links keep default dark theme colors */
[data-theme="dark"] .wy-menu-vertical a {
    color: inherit;
}

[data-theme="dark"] .wy-menu-vertical a:hover {
    color: inherit;
    text-shadow: none;
}

[data-theme="dark"] .wy-breadcrumbs a {
    color: inherit;
}

[data-theme="dark"] .wy-breadcrumbs a:hover {
    color: inherit;
    text-shadow: none;
}

[data-theme="dark"] .wy-nav-side a {
    color: inherit;
}

[data-theme="dark"] .wy-nav-side a:hover {
    color: inherit;
    text-shadow: none;
}

/* Dark mode link colors for content */
[data-theme="dark"] .document a {
    color: #66ab5f !important;
}

[data-theme="dark"] .document a:hover {
    color: #7bc069 !important;
    text-decoration: underline;
}

/* Dark mode link colors for navigation */
[data-theme="dark"] .wy-nav-content a {
    color: #66ab5f !important;
}

[data-theme="dark"] .wy-nav-content a:hover {
    color: #7bc069 !important;
    text-decoration: underline;
}

/* Dark mode link colors for footer */
[data-theme="dark"] footer a {
    color: #66ab5f !important;
}

[data-theme="dark"] footer a:hover {
    color: #7bc069 !important;
    text-decoration: underline;
}

/* Dark mode link colors for code blocks */
[data-theme="dark"] .highlight a {
    color: #66ab5f !important;
}

[data-theme="dark"] .highlight a:hover {
    color: #7bc069 !important;
    text-decoration: underline;
}

/* Dark mode link colors for tables */
[data-theme="dark"] table a {
    color: #66ab5f !important;
}

[data-theme="dark"] table a:hover {
    color: #7bc069 !important;
}

/* Ensure light theme uses default RTD colors */
[data-theme="light"] a {
    color: inherit;
}

[data-theme="light"] a:hover {
    color: inherit;
    text-shadow: none;
}

[data-theme="light"] a:visited {
    color: inherit;
}

/* Smooth transitions for theme switching */
a {
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

[data-theme="dark"] .wy-side-nav-search {
    background-color: #012724 !important;
}

[data-theme="dark"] .wy-nav-top {
    background-color: #012724 !important;
}

[data-theme="dark"] .wy-menu-vertical p.caption {
    color: #66ab5f !important;
}
