/* ==========================================================================
   Spook Map — Custom CSS
   Supplements Tailwind CDN. Covers Material Symbols overrides, glass nav,
   body defaults, scrollbar hiding, animation keyframes, and misc utilities.
   ========================================================================== */

/* ── Fonts ─────────────────────────────────────────────────────────────────── */
body {
    font-family: 'Manrope', sans-serif;
    background-color: #0d001a;
    color: #cdc4cf;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Material Symbols defaults ──────────────────────────────────────────────── */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
    vertical-align: middle;
    line-height: 1;
    user-select: none;
}

/* ── Glass nav ─────────────────────────────────────────────────────────────── */
#spook-nav {
    background: rgba(13, 0, 26, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(75, 69, 78, 0.2);
    transition: box-shadow 0.3s ease;
}

/* ── Headings ──────────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6,
.font-headline {
    font-family: 'Epilogue', sans-serif;
}

.font-label {
    font-family: 'Manrope', sans-serif;
}

/* ── Scrollbar hiding ──────────────────────────────────────────────────────── */
.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

/* ── Custom scrollbar (thin purple) ────────────────────────────────────────── */
::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}
::-webkit-scrollbar-track {
    background: #0d001a;
}
::-webkit-scrollbar-thumb {
    background: #4b454e;
    border-radius: 2px;
}
::-webkit-scrollbar-thumb:hover {
    background: #dabaf7;
}

/* ── Google Maps overrides ─────────────────────────────────────────────────── */
.gm-style .gm-style-iw-c {
    background: #280e40 !important;
    border: 1px solid rgba(75, 69, 78, 0.3) !important;
    border-radius: 12px !important;
    padding: 0 !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5) !important;
}
.gm-style .gm-style-iw-d {
    overflow: hidden !important;
}
.gm-style .gm-style-iw-tc::after {
    background: #280e40 !important;
}
.gm-style-iw-chr {
    display: none !important;
}
.gm-ui-hover-effect {
    top: 8px !important;
    right: 8px !important;
}
.gm-ui-hover-effect span {
    background-color: #cdc4cf !important;
}

/* Google Places autocomplete dropdown */
.pac-container {
    background: #280e40;
    border: 1px solid rgba(75, 69, 78, 0.4);
    border-radius: 8px;
    margin-top: 4px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    font-family: 'Manrope', sans-serif;
}
.pac-item {
    color: #cdc4cf;
    border-top: 1px solid rgba(75, 69, 78, 0.2);
    padding: 10px 14px;
    cursor: pointer;
    font-size: 13px;
}
.pac-item:hover,
.pac-item-selected {
    background: #371e50;
}
.pac-item-query {
    color: #f0dbff;
    font-size: 14px;
}
.pac-matched {
    color: #4ce346;
}
.pac-icon {
    display: none;
}

/* ── Form inputs base ──────────────────────────────────────────────────────── */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
input[type="url"],
select,
textarea {
    background-color: #190032;
    color: #f0dbff;
    border: none;
    outline: none;
}
input::placeholder,
textarea::placeholder {
    color: #968e99;
}
input:focus,
select:focus,
textarea:focus {
    ring: none;
    outline: none;
}
select option {
    background: #190032;
    color: #f0dbff;
}

/* ── Category radio cards ──────────────────────────────────────────────────── */
.spook-cat-card {
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.spook-cat-card:hover {
    transform: translateY(-2px);
}
input[type="radio"].spook-cat-radio:checked + .spook-cat-card,
.spook-cat-radio:checked ~ .spook-cat-card {
    border-color: #4ce346;
    background-color: rgba(76, 227, 70, 0.08);
    box-shadow: 0 0 0 1px #4ce346, 0 4px 16px rgba(76, 227, 70, 0.15);
}

/* ── Gallery drop zone ─────────────────────────────────────────────────────── */
#spook-gallery-drop {
    transition: border-color 0.2s ease, background 0.2s ease;
    cursor: pointer;
}
#spook-gallery-drop.drag-over {
    border-color: #4ce346;
    background: rgba(76, 227, 70, 0.05);
}

/* ── Gallery preview grid ──────────────────────────────────────────────────── */
#spook-gallery-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.spook-gallery-card {
    transition: transform 0.2s ease;
}
.spook-gallery-card:hover {
    transform: scale(1.02);
}

/* ── Upload spinner animation ──────────────────────────────────────────────── */
@keyframes spook-spin {
    to { transform: rotate(360deg); }
}
.animate-spin {
    animation: spook-spin 0.8s linear infinite;
}

/* ── Lightbox ──────────────────────────────────────────────────────────────── */
#spook-lightbox {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
#spook-lightbox img,
#spook-lightbox video {
    max-height: 85vh;
    max-width: 90vw;
    object-fit: contain;
    border-radius: 8px;
}

/* ── Map containers ────────────────────────────────────────────────────────── */
#spook-explore-map,
#spook-route-map-builder,
#spook-save-map,
#spook-listing-map {
    background: #190032;
}

/* ── Explore sidebar ───────────────────────────────────────────────────────── */
#spook-explore-sidebar {
    transition: transform 0.3s ease;
}

/* ── Status badges ─────────────────────────────────────────────────────────── */
.spook-status-published { color: #4ce346; }
.spook-status-pending   { color: #cdc4cf; }
.spook-status-draft     { color: #968e99; }

/* ── Route points list ─────────────────────────────────────────────────────── */
#spook-route-points-list {
    max-height: 200px;
    overflow-y: auto;
}

/* ── Tooltip (generic) ─────────────────────────────────────────────────────── */
[data-tooltip] {
    position: relative;
}
[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: #43295b;
    color: #f0dbff;
    font-size: 11px;
    font-family: 'Manrope', sans-serif;
    white-space: nowrap;
    padding: 4px 8px;
    border-radius: 4px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 100;
}
[data-tooltip]:hover::after {
    opacity: 1;
}

/* ── No underline utility ──────────────────────────────────────────────────── */
.no-underline {
    text-decoration: none !important;
}
.no-underline:hover {
    text-decoration: none !important;
}

/* ── Hero gradient overlay ─────────────────────────────────────────────────── */
.spook-hero-overlay {
    background: linear-gradient(
        to bottom,
        rgba(13, 0, 26, 0.1) 0%,
        rgba(13, 0, 26, 0.5) 60%,
        rgba(13, 0, 26, 1) 100%
    );
}

/* ── Glassmorphism card ────────────────────────────────────────────────────── */
.spook-glass {
    background: rgba(40, 14, 64, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(75, 69, 78, 0.3);
}

/* ── Gradient text ─────────────────────────────────────────────────────────── */
.spook-gradient-text {
    background: linear-gradient(135deg, #ffb691, #cc5800);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Button press effect ───────────────────────────────────────────────────── */
.spook-btn-press {
    transition: transform 0.1s ease;
}
.spook-btn-press:active {
    transform: scale(0.97);
}

/* ── Admin options page ────────────────────────────────────────────────────── */
.spook-admin-wrap {
    font-family: 'Manrope', -apple-system, sans-serif;
}
.spook-admin-wrap h1 {
    font-family: 'Epilogue', -apple-system, sans-serif;
}

/* ── Hide WP admin bar on small screens ────────────────────────────────────── */
@media (max-width: 599px) {
    #wpadminbar {
        display: none !important;
    }
    html[lang] {
        margin-top: 0 !important;
    }
}

/* ── Nav-height-aware main padding ─────────────────────────────────────────── */
:root { --nav-height: 74px; }   /* fallback before JS runs */

main {
    padding-top: 45px !important;
}
