/* =====================================================
   Polenta Connection - Theme Definitions
   Set via data-theme on <html>
   ===================================================== */

[data-theme="terminal"] {
    --bg-color: #000000;
    --bg-secondary: #111111;
    --text-color: #f0f0f0;
    --text-muted: #888888;
    --accent-color: #66ff99;
    --accent-hover: #99ffcc;
    --border-color: #444444;
    --border-light: #888888;
    --divider-start: #444444;
    --divider-mid: #888888;
    --divider-end: #444444;
    --btn-hover-text: #000000;
    --toggler-invert: invert(1);
    --font-family: "Courier New", Courier, monospace;
    --heading-font-family: var(--font-family);
    --border-radius: 0;
    --navbar-bg: #111111;
    --nav-link-color: #f0f0f0;
    --nav-link-active: #66ff99;
    --heading-transform: uppercase;
    --heading-letter-spacing: 2px;
    --heading-weight: normal;
}

[data-theme="classic"] {
    --bg-color: #f5f5f0;
    --bg-secondary: #eaeae4;
    --text-color: #1a1a1a;
    --text-muted: #666666;
    --accent-color: #2d6a4f;
    --accent-hover: #40916c;
    --border-color: #c8c8c0;
    --border-light: #999999;
    --divider-start: #c8c8c0;
    --divider-mid: #888888;
    --divider-end: #c8c8c0;
    --btn-hover-text: #ffffff;
    --toggler-invert: invert(0);
    --font-family: "Courier New", Courier, monospace;
    --heading-font-family: var(--font-family);
    --border-radius: 0;
    --navbar-bg: #eaeae4;
    --nav-link-color: #1a1a1a;
    --nav-link-active: #2d6a4f;
    --heading-transform: uppercase;
    --heading-letter-spacing: 2px;
    --heading-weight: normal;
}

[data-theme="ocean"] {
    --bg-color: #0a1628;
    --bg-secondary: #122240;
    --text-color: #e8f0fa;
    --text-muted: #7a9ab8;
    --accent-color: #4dd0e1;
    --accent-hover: #80deea;
    --border-color: #2a4a6b;
    --border-light: #5a8ab0;
    --divider-start: #2a4a6b;
    --divider-mid: #5a8ab0;
    --divider-end: #2a4a6b;
    --btn-hover-text: #0a1628;
    --toggler-invert: invert(1);
    --font-family: "Courier New", Courier, monospace;
    --heading-font-family: var(--font-family);
    --border-radius: 0;
    --navbar-bg: #122240;
    --nav-link-color: #e8f0fa;
    --nav-link-active: #4dd0e1;
    --heading-transform: uppercase;
    --heading-letter-spacing: 2px;
    --heading-weight: normal;
}

[data-theme="amber"] {
    --bg-color: #1a1208;
    --bg-secondary: #2a2010;
    --text-color: #f5e6d0;
    --text-muted: #a89070;
    --accent-color: #ffb74d;
    --accent-hover: #ffcc80;
    --border-color: #5a4a30;
    --border-light: #8a7050;
    --divider-start: #5a4a30;
    --divider-mid: #8a7050;
    --divider-end: #5a4a30;
    --btn-hover-text: #1a1208;
    --toggler-invert: invert(1);
    --font-family: "Courier New", Courier, monospace;
    --heading-font-family: var(--font-family);
    --border-radius: 0;
    --navbar-bg: #2a2010;
    --nav-link-color: #f5e6d0;
    --nav-link-active: #ffb74d;
    --heading-transform: uppercase;
    --heading-letter-spacing: 2px;
    --heading-weight: normal;
}

/* Bootstrap 5 default palette */
[data-theme="bootstrap"] {
    --bg-color: #ffffff;
    --bg-secondary: #f8f9fa;
    --text-color: #212529;
    --text-muted: #6c757d;
    --accent-color: #0d6efd;
    --accent-hover: #0a58ca;
    --border-color: #dee2e6;
    --border-light: #adb5bd;
    --divider-start: #dee2e6;
    --divider-mid: #adb5bd;
    --divider-end: #dee2e6;
    --btn-hover-text: #ffffff;
    --toggler-invert: invert(1);
    --font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --heading-font-family: var(--font-family);
    --border-radius: 0.375rem;
    --navbar-bg: #212529;
    --nav-link-color: rgba(255, 255, 255, 0.75);
    --nav-link-active: #ffffff;
    --heading-transform: none;
    --heading-letter-spacing: normal;
    --heading-weight: 500;
}

/* Windows XP Luna */
[data-theme="winxp"] {
    --bg-color: #ece9d8;
    --bg-secondary: #ffffff;
    --text-color: #000000;
    --text-muted: #444444;
    --accent-color: #0054e3;
    --accent-hover: #003399;
    --border-color: #808080;
    --border-light: #aca899;
    --divider-start: #aca899;
    --divider-mid: #808080;
    --divider-end: #aca899;
    --btn-hover-text: #ffffff;
    --toggler-invert: invert(0);
    --font-family: Tahoma, "MS Sans Serif", sans-serif;
    --heading-font-family: var(--font-family);
    --border-radius: 0;
    --navbar-bg: linear-gradient(180deg, #0997ff 0%, #0053ee 8%, #0050ee 40%, #0066ff 88%, #005cee 95%, #0054e3 100%);
    --nav-link-color: #ffffff;
    --nav-link-active: #ffffcc;
    --heading-transform: none;
    --heading-letter-spacing: normal;
    --heading-weight: bold;
}

/* Windows Vista Aero */
[data-theme="winvista"] {
    --bg-color: #eef4fb;
    --bg-secondary: #ffffff;
    --text-color: #1a1a1a;
    --text-muted: #5a6a7a;
    --accent-color: #0078d7;
    --accent-hover: #005a9e;
    --border-color: #aecff7;
    --border-light: #7eb6ea;
    --divider-start: #c8dff5;
    --divider-mid: #7eb6ea;
    --divider-end: #c8dff5;
    --btn-hover-text: #ffffff;
    --toggler-invert: invert(1);
    --font-family: "Segoe UI", Tahoma, sans-serif;
    --heading-font-family: var(--font-family);
    --border-radius: 4px;
    --navbar-bg: linear-gradient(180deg, #5a5a5a 0%, #3a3a3a 50%, #2a2a2a 100%);
    --nav-link-color: #e8e8e8;
    --nav-link-active: #46a3ff;
    --heading-transform: none;
    --heading-letter-spacing: normal;
    --heading-weight: 600;
}

/* Windows 7 Aero */
[data-theme="win7"] {
    --bg-color: #f0f0f0;
    --bg-secondary: #ffffff;
    --text-color: #1a1a1a;
    --text-muted: #555555;
    --accent-color: #3399ff;
    --accent-hover: #1a7ae6;
    --border-color: #b8b8b8;
    --border-light: #999999;
    --divider-start: #d0d0d0;
    --divider-mid: #999999;
    --divider-end: #d0d0d0;
    --btn-hover-text: #ffffff;
    --toggler-invert: invert(1);
    --font-family: "Segoe UI", Tahoma, sans-serif;
    --heading-font-family: var(--font-family);
    --border-radius: 3px;
    --navbar-bg: linear-gradient(180deg, #4a4a4a 0%, #2d2d2d 40%, #1a1a1a 100%);
    --nav-link-color: #f0f0f0;
    --nav-link-active: #66b3ff;
    --heading-transform: none;
    --heading-letter-spacing: normal;
    --heading-weight: 600;
}

/* Windows 11 Fluent */
[data-theme="win11"] {
    --bg-color: #fafafa;
    --bg-secondary: #ffffff;
    --text-color: #1a1a1a;
    --text-muted: #616161;
    --accent-color: #0067c0;
    --accent-hover: #005299;
    --border-color: #e5e5e5;
    --border-light: #c8c8c8;
    --divider-start: #e5e5e5;
    --divider-mid: #c8c8c8;
    --divider-end: #e5e5e5;
    --btn-hover-text: #ffffff;
    --toggler-invert: invert(0);
    --font-family: "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
    --heading-font-family: var(--font-family);
    --border-radius: 8px;
    --navbar-bg: #f3f3f3;
    --nav-link-color: #1a1a1a;
    --nav-link-active: #0067c0;
    --heading-transform: none;
    --heading-letter-spacing: normal;
    --heading-weight: 600;
}

/* Visual Studio Code docs / Dark Modern */
[data-theme="vscode"] {
    --bg-color: #1e1e1e;
    --bg-secondary: #252526;
    --text-color: #cccccc;
    --text-muted: #858585;
    --accent-color: #3794ff;
    --accent-hover: #4daafc;
    --border-color: #3c3c3c;
    --border-light: #454545;
    --divider-start: #3c3c3c;
    --divider-mid: #454545;
    --divider-end: #3c3c3c;
    --btn-hover-text: #ffffff;
    --toggler-invert: invert(1);
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --heading-font-family: var(--font-family);
    --border-radius: 2px;
    --navbar-bg: #181818;
    --nav-link-color: #cccccc;
    --nav-link-active: #ffffff;
    --heading-transform: none;
    --heading-letter-spacing: normal;
    --heading-weight: 600;
}

/* =====================================================
   Theme-specific component tweaks
   ===================================================== */

[data-theme="winxp"] .navbar {
    border-bottom: 2px solid #003399;
}

[data-theme="winxp"] .card {
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    box-shadow: inset 1px 1px 0 #dfdfdf;
}

[data-theme="winxp"] .btn-custom {
    border-color: #808080;
    background: linear-gradient(180deg, #ffffff 0%, #ece9d8 100%);
    color: #000000;
}

[data-theme="winxp"] .btn-custom:hover {
    background: linear-gradient(180deg, #ffffff 0%, #ddd9ce 100%);
    color: #000000;
}

[data-theme="winvista"] .card,
[data-theme="win7"] .card {
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

[data-theme="winvista"] .navbar {
    border-bottom: 1px solid #1a1a1a;
}

[data-theme="win7"] .navbar {
    border-bottom: 1px solid #000000;
}

[data-theme="win11"] .card {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

[data-theme="win11"] .navbar {
    border-bottom: 1px solid #e5e5e5;
    backdrop-filter: blur(20px);
}

[data-theme="bootstrap"] .card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

[data-theme="vscode"] h1,
[data-theme="vscode"] h2,
[data-theme="vscode"] h3 {
    color: #e7e7e7;
}

[data-theme="vscode"] .navbar {
    border-bottom: 1px solid #454545;
}

[data-theme="vscode"] .nav-link:hover {
    color: #ffffff !important;
}

[data-theme="vscode"] .nav-link.active {
    color: #ffffff !important;
    box-shadow: inset 0 -2px 0 #007acc;
}

[data-theme="vscode"] .card {
    background-color: #252526;
    border-color: #3c3c3c;
}

[data-theme="vscode"] .highlight {
    background-color: #2d2d2d;
    border-left-color: #007acc;
}

[data-theme="vscode"] .highlight code,
[data-theme="vscode"] code {
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.9em;
    color: #ce9178;
}

[data-theme="vscode"] .btn-custom {
    border-color: #007acc;
    color: #3794ff;
}

[data-theme="vscode"] .btn-custom:hover {
    background-color: #007acc;
    border-color: #007acc;
}

[data-theme="vscode"] footer {
    background-color: #181818;
}

[data-theme="vscode"] .site-pages-toggle {
    background-color: #252526;
}

[data-theme="vscode"] .site-pages-content {
    background-color: #252526;
}
