/* ============================================================
   🎨 Gunbot Gold & Teal Theme — Custom Extra CSS
   For: Multi-Gunbot VPS Deployment Guide (MkDocs Material)
   Author: Jonathan Bennett
   Description:
     - Applies Gunbot branding (gold/black/teal)
     - Enhances code blocks, clipboard, and note styling
     - Keeps compatibility with MkDocs Material dark palette
   ============================================================ */

/* ------------------------------
   🕶 Force Gunbot Dark Background
   Ensures the dark theme always applies,
   even if MkDocs defaults to light or resets scheme.
   ------------------------------ */
body {
    background-color: var(--gunbot-bg) !important;
    color: #E0E0E0 !important;
}

[data-md-color-scheme=default],
[data-md-color-scheme=light] {
    background-color: var(--gunbot-bg) !important;
    color: #E0E0E0 !important;
}

/* ------------------------------
   🌈 Color Variables
   ------------------------------ */
:root {
    --gunbot-gold: #FFC107;
    --gunbot-gold-light: #FFB300;
    --gunbot-gold-muted: rgba(255, 193, 7, 0.3);
    --gunbot-bg: #0E0E0E;
    --gunbot-bg-dark: #1C1C1C;
    --gunbot-bg-softer: #0F0F0F;
    --gunbot-bg-inline-code: #1A1A1A;
    --gunbot-teal: #00FFCC;
    --gunbot-teal-hover: #00E6B8;
    --gunbot-teal-active: #00FFD0;
    --gunbot-khaki-gold: #F0E68C;
}

/* ------------------------------
   🧭 Header & Navigation
   ------------------------------ */
.md-header, .md-nav {
    background-color: var(--gunbot-bg);
    border-bottom: 0.125em solid var(--gunbot-gold);
}

.md-header__title,
.md-header__button,
.md-nav__title {
    color: var(--gunbot-gold);
}

.md-nav__link:hover,
.md-header__button:hover {
    color: var(--gunbot-gold-light);
}

/* ------------------------------
   🔍 Search Bar Styling
   ------------------------------ */
.md-search__form {
    background-color: var(--gunbot-bg-dark);
    border: 0.0625em solid var(--gunbot-gold);
}

.md-search__input {
    background-color: var(--gunbot-bg-dark);
    color: #E0E0E0;
}

.md-search__input::placeholder {
    color: rgba(255, 193, 7, 0.6);
}

.md-search__icon {
    color: var(--gunbot-gold);
}

/* ------------------------------
   💻 Code Blocks — Gunbot Themed
   ------------------------------ */
.md-typeset pre,
.md-typeset code {
    background-color: var(--gunbot-bg-softer);
    color: #E8E8E8;
    border: 0.05em solid var(--gunbot-gold-muted);
    border-radius: 0.25em;
    font-family: 'Fira Code', monospace;
}

/* Multi-line code */
.md-typeset pre code {
    background: transparent;
    color: var(--gunbot-khaki-gold); /* warm muted khaki gold */
}

/* Inline code */
.md-typeset code {
    background-color: var(--gunbot-bg-inline-code);
    color: #E0C15F;
    padding: 0.1em 0.3em;
    border-radius: 0.2em;
}

/* Code block container */
.md-typeset pre {
    box-shadow: 0 0.1em 0.25em rgba(255, 193, 7, 0.1);
    margin: 0.75em 0;
    padding: 0.75em;
}

/* Ensure clipboard icon is visible */
.highlight,
.md-typeset pre {
    position: relative;
    z-index: 1;
    overflow: visible;
    border-radius: 0.25em;
}

/* ------------------------------
   🖱 Clipboard Button (Teal Animated)
   ------------------------------ */
body[data-md-color-scheme] .md-typeset button.md-clipboard.md-icon {
    color: var(--gunbot-teal) !important;
    background: none !important;
    border: none !important;
    position: absolute !important;
    top: 0.5em;
    right: 0.6em;
    z-index: 15 !important;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease, filter 0.25s ease;
}

/* Hover glow */
body[data-md-color-scheme] .md-typeset button.md-clipboard.md-icon:hover {
    color: var(--gunbot-teal-hover) !important;
    transform: scale(1.05);
    filter: drop-shadow(0 0 0.6em rgba(0, 230, 184, 0.8));
}

/* Pulse animation */
@keyframes clipboard-pulse {
    0% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(0,255,204,0)); }
    50% { transform: scale(1.25); filter: drop-shadow(0 0 0.75em rgba(0,255,204,0.9)); }
    100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(0,255,204,0)); }
}

/* Click or focus pulse */
body[data-md-color-scheme] .md-typeset button.md-clipboard.md-icon:focus,
body[data-md-color-scheme] .md-typeset button.md-clipboard.md-icon:active {
    color: var(--gunbot-teal-active) !important;
    animation: clipboard-pulse 0.4s ease;
    outline: none !important;
}

/* Keep SVG visible */
body[data-md-color-scheme] .md-typeset button.md-clipboard.md-icon svg {
    stroke: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    width: 1.1em !important;
    height: 1.1em !important;
    z-index: 16 !important;
    pointer-events: none !important;
}

/* ------------------------------
   ✳️ Headings
   ------------------------------ */
h1 {
    color: var(--gunbot-gold) !important; /* enforce vivid gold text */
    font-weight: 800;
    font-size: 2.3em;
    text-transform: uppercase;
    letter-spacing: 0.045em;
    margin-top: 1em;
    margin-bottom: 0.6em;
    border: none;
    padding-bottom: 0.3em;
    text-align: left;
    background: linear-gradient(90deg, var(--gunbot-gold-muted) 0%, rgba(0,0,0,0) 100%);
    border-radius: 0.25em;
    padding-left: 0.4em;
}

h2 {
    color: var(--gunbot-gold);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-left: 0.25em solid var(--gunbot-gold-light);
    padding-left: 0.75em;
    margin-top: 1.8em;
    margin-bottom: 0.8em;
    background: linear-gradient(90deg, rgba(255,193,7,0.15) 0%, rgba(0,0,0,0) 100%);
    border-radius: 0.1875em;
}

h3 {
    color: #FFD54F;
    font-weight: 600;
    border-left: 0.1875em solid rgba(255, 213, 79, 0.5);
    padding-left: 0.625em;
    margin-top: 1.4em;
    margin-bottom: 0.6em;
}

/* Hover animation */
h2:hover, h3:hover {
    text-shadow: 0 0 0.625em rgba(255, 193, 7, 0.3);
    transition: all 0.3s ease;
}

/* ------------------------------
   💬 Note / Blockquote Styling
   ------------------------------ */
.md-typeset blockquote {
    border-left: 0.2em solid var(--gunbot-teal) !important; /* force teal sidebar */
    color: #D9D9D9;
    border-radius: 0.1em;
    box-shadow: 0 0.05em 0.15em rgba(0,0,0,0.3);
    padding: 0.4em 0.8em;
    margin: 0.6em 0;
    font-size: 0.9em;
    line-height: 1.35;
    background: #111 linear-gradient(90deg, rgba(0, 255, 204, 0.06) 0%, rgba(0, 0, 0, 0) 100%);
}

.md-typeset blockquote strong:first-child {
    display: inline-block;
    background: var(--gunbot-teal);
    color: var(--gunbot-bg);
    padding: 0.1em 0.25em;
    border-radius: 0.2em 0.2em 0 0;
    font-size: 0.8em;
    letter-spacing: 0.025em;
    margin-bottom: 0.1em;
}

/* ------------------------------
   🔗 Links
   ------------------------------ */
a {
    color: var(--gunbot-gold);
    transition: color 0.2s ease, text-shadow 0.2s ease;
}

a:hover {
    color: var(--gunbot-gold-light);
    text-shadow: 0 0 0.375em rgba(255, 193, 7, 0.5);
}

/* ------------------------------
   ⚡ Horizontal Rules
   ------------------------------ */
hr {
    border: 0;
    border-top: 0.0625em solid rgba(255, 193, 7, 0.2);
    margin: 1.5em 0;
}

/* ------------------------------
   🪶 Logo Refinement
   ------------------------------ */
img[alt~="Gunbot"],
img[src*="gunbot-logo"] {
    background: none;
    box-shadow: none;
    border: none;
    filter: drop-shadow(0 0 0.5em rgba(255, 215, 0, 0.4));
}

/* ------------------------------
   🔽 TOC Dropdown Lines Styling
   ------------------------------ */
.md-nav__item--active > .md-nav__link::after,
.md-nav__link::before {
    border-color: var(--gunbot-khaki-gold) !important;
}

/* ------------------------------
   🧭 Navigation Sidebar Alignment
   ------------------------------ */
.md-sidebar.md-sidebar--primary {
    margin-left: 0 !important;
    padding-left: 0 !important;
    left: 0 !important;
}

.md-nav {
    padding-left: 0 !important;
    margin-left: 0 !important;
}