/* GPS Platform Albania - Refined, Accessible, and Beautiful Docs Theme */

:root {
    /* Brand */
    --brand-500: #0ea5e9;   /* sky-500 */
    --brand-600: #0284c7;   /* sky-600 */
    --brand-700: #0369a1;   /* sky-700 */

    /* Neutrals */
    --bg-page: #f8fafc;     /* slate-50 */
    --bg-surface: #ffffff;  /* white */
    --text-900: #0f172a;    /* slate-900 */
    --text-700: #334155;    /* slate-700 */
    --text-500: #64748b;    /* slate-500 */
    --border-200: #e2e8f0;  /* slate-200 */
    --border-300: #cbd5e1;  /* slate-300 */

    /* Sidebar */
    --sidebar-start: #0b1220;  /* deep navy */
    --sidebar-end:   #111827;  /* slate-900 */
    --sidebar-text:  #eef6ff;
    --sidebar-muted: #b6c2d1;

    /* Code */
    --code-bg: #0b1220;
    --code-text: #e2e8f0;
    --code-border: #1f2937;
}

/* Base layout */
html, body { background: var(--bg-page) !important; }
.wy-nav-content-wrap { background: var(--bg-page) !important; }
.wy-nav-content { background: var(--bg-surface) !important; max-width: 1100px !important; box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06); border: 1px solid var(--border-200); border-radius: 10px; }

/* Sidebar */
.wy-nav-side { background: linear-gradient(180deg, var(--sidebar-start), var(--sidebar-end)) !important; border-right: 1px solid rgba(255,255,255,0.06); }
.wy-side-nav-search { background: transparent !important; padding: 1.2rem !important; border-bottom: 1px solid rgba(255,255,255,0.06); }
.wy-side-nav-search input[type=text] { background: rgba(255,255,255,0.06) !important; border: 1px solid rgba(255,255,255,0.12) !important; color: #fff !important; border-radius: 8px !important; padding: 8px 12px !important; }
.wy-side-nav-search input[type=text]::placeholder { color: var(--sidebar-muted) !important; }
.wy-side-nav-search input[type=text]:focus { outline: none; border-color: var(--brand-500) !important; box-shadow: 0 0 0 3px rgba(14,165,233,0.25); }

/* Navigation */
.wy-menu-vertical, .wy-menu-vertical ul, .wy-menu-vertical li { background: transparent !important; }
.wy-menu-vertical a { color: var(--sidebar-text) !important; padding: 8px 16px !important; font-size: 14px; border-left: 2px solid transparent; transition: background .15s ease, color .15s ease, border-color .15s ease; }
.wy-menu-vertical a:hover { background: rgba(2,132,199,0.2) !important; color: #fff !important; border-left-color: var(--brand-500) !important; }
/* Force the active/current item to stay dark blue for readability */
.wy-menu-vertical li.current > a,
.wy-menu-vertical li.toctree-l1.current > a,
.wy-menu-vertical li.on > a,
.wy-menu-vertical a.current,
.wy-menu-vertical a.reference.internal.current {
    background: var(--brand-700) !important;
    color: #ffffff !important;
    border-left-color: var(--brand-500) !important;
    font-weight: 700 !important;
}
.wy-nav-side .wy-menu-vertical li.toctree-l1.current > a { background: var(--brand-700) !important; }
.wy-menu-vertical li.current > ul { background: transparent !important; }
.wy-menu-vertical li.current > ul li > a { background: transparent !important; color: var(--sidebar-text) !important; }
.wy-menu-vertical li.current > ul li > a:hover { background: rgba(2,132,199,0.2) !important; color: #fff !important; }
.wy-menu-vertical li.current > ul li.current > a { background: var(--brand-700) !important; color: #fff !important; }
.wy-menu-vertical a:focus { background: var(--brand-700) !important; color: #fff !important; outline: none; }
.wy-menu-vertical li.toctree-l1 > a { color: var(--sidebar-text) !important; }
.wy-menu-vertical li.toctree-l2 > a { color: #e6f0ff !important; }
.wy-menu-vertical span.toctree-expand { color: #d5eaff !important; }

/* Typography */
.rst-content { font-size: 16px; line-height: 1.7; color: var(--text-900); }
.rst-content p { color: var(--text-700); }

/* Headings */
.rst-content h1, .rst-content h2, .rst-content h3, .rst-content h4 { color: var(--text-900) !important; font-weight: 700 !important; }
.rst-content h1 { font-size: 2.25rem !important; margin: 1.2rem 0 1rem !important; padding-bottom: .5rem !important; border-bottom: 3px solid var(--border-200) !important; }
.rst-content h2 { font-size: 1.75rem !important; margin-top: 1.8rem !important; margin-bottom: .6rem !important; }
.rst-content h3 { font-size: 1.25rem !important; margin-top: 1.2rem !important; }

/* Links */
.rst-content a { color: var(--brand-600) !important; text-decoration: none !important; }
.rst-content a:hover { color: var(--brand-700) !important; text-decoration: underline !important; }
.rst-content a:focus { outline: none; box-shadow: 0 0 0 3px rgba(14,165,233,0.25); border-radius: 4px; }

/* Lists & blockquotes */
.rst-content blockquote { color: var(--text-700); border-left: 4px solid var(--brand-500); background: rgba(14,165,233,0.08); padding: .8rem 1rem; border-radius: 6px; }

/* Code */
.rst-content code { background: #eef2ff !important; color: #1e293b !important; border: 1px solid var(--border-300) !important; padding: 2px 6px !important; border-radius: 4px !important; font-size: .92em; }
.rst-content pre, .rst-content div[class*="highlight"] { background: var(--code-bg) !important; color: var(--code-text) !important; border: 1px solid var(--code-border) !important; padding: 1rem !important; border-radius: 8px !important; overflow: auto; }

/* Tables */
.rst-content table { border: 1px solid var(--border-200) !important; border-radius: 8px; overflow: hidden; }
.rst-content table thead th { background: #f1f5f9 !important; color: var(--text-900) !important; font-weight: 700 !important; border-bottom: 2px solid var(--border-200) !important; }
.rst-content table tbody tr:nth-child(odd) { background: #fcfdff !important; }
.rst-content table tbody tr:hover { background: #f8fbff !important; }

/* Admonitions */
.rst-content .admonition { border-left: 4px solid var(--brand-600) !important; background: rgba(14,165,233,0.08) !important; border-radius: 8px !important; padding: .75rem 1rem !important; }
.rst-content .admonition .admonition-title { font-weight: 700; color: var(--text-900); }
.rst-content .admonition.note { border-left-color: var(--brand-600) !important; background: rgba(14,165,233,0.08) !important; }
.rst-content .admonition.tip { border-left-color: #16a34a !important; background: rgba(22,163,74,.08) !important; }
.rst-content .admonition.warning { border-left-color: #f59e0b !important; background: rgba(245,158,11,.1) !important; }
.rst-content .admonition.danger, .rst-content .admonition.important { border-left-color: #ef4444 !important; background: rgba(239,68,68,.08) !important; }

/* Breadcrumbs */
.wy-breadcrumbs { font-size: 14px; }
.wy-breadcrumbs li a { color: var(--brand-600) !important; }

/* Footer: text only on black (no bar) */
footer, .footer { 
    background: transparent !important; 
    color: #cbd5e1 !important; 
    margin-top: 3rem; 
    border-top: none !important; 
    box-shadow: none !important;
}

/* Mobile top bar */
.wy-nav-top { background: linear-gradient(90deg, var(--brand-700), var(--brand-600)) !important; color: #fff !important; }

/* Utilities */
.rst-content hr { border: 0; border-top: 1px solid var(--border-200); }
.rst-content .toctree-wrapper ul { border: 1px solid var(--border-200); border-radius: 8px; padding: .5rem 1rem; background: #fbfdff; }

/* Accessibility: ensure sufficient contrast in sidebar disabled/muted items */
.wy-menu-vertical .caption { color: var(--sidebar-muted) !important; text-transform: uppercase; font-size: 12px; letter-spacing: .04em; padding: 8px 16px; }

/* Language switcher */
.lang-switch { position: fixed; right: 16px; bottom: 16px; display: flex; gap: 6px; padding: 6px; z-index: 1000; border-radius: 999px; background: rgba(2, 6, 23, 0.72); backdrop-filter: blur(4px); border: 1px solid rgba(255,255,255,.08); }
.lang-switch button { appearance: none; border: none; background: transparent; color: #e2e8f0; font-weight: 600; padding: 6px 10px; border-radius: 999px; cursor: pointer; }
.lang-switch button:hover { background: rgba(255,255,255,.08); color: #fff; }
.lang-switch button.active { background: var(--brand-600); color: #fff; }

@media screen and (max-width: 768px) {
    .rst-content h1 { font-size: 1.9rem !important; }
}
