/* ============================================================
   BIOAUREA - Map Components (v2 — Immersive Fullscreen)
   Demo section, glassmorphism sidebars, map controls
   ============================================================ */

/* ===== Demo Section — Fullscreen ===== */
.demo-section {
    padding: 0;
    background: #000;
    position: relative;
    overflow: hidden;
    scroll-margin-top: 0; /* map starts right at nav bottom with scroll-padding */
}

.demo-header { display: none; }

.map-wrapper {
    position: relative;
    width: 100%;
    height: calc(100vh - 95px);
    min-height: 450px;
    background: #000;
}

#map {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100%; height: 100%;
    z-index: 1;
}

/* ===== Glassmorphism Mixin ===== */
.sidebar-left,
.sidebar-right {
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border: 1px solid rgba(0, 255, 136, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5),
                inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* ===== Left Sidebar ===== */
.sidebar-left {
    position: absolute;
    top: 110px;
    left: 16px;
    width: 300px;
    border-radius: 14px;
    padding: 18px;
    z-index: 1000;
    max-height: calc(100% - 126px);
    overflow-y: auto;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(0);
}

.sidebar-left::-webkit-scrollbar { width: 4px; }
.sidebar-left::-webkit-scrollbar-track { background: transparent; }
.sidebar-left::-webkit-scrollbar-thumb { background: rgba(0,255,136,0.2); border-radius: 4px; }

/* ===== Right Sidebar (hidden by default, slides in) ===== */
.sidebar-right {
    position: absolute;
    top: 110px;
    right: 16px;
    width: 240px;
    border-radius: 12px;
    padding: 12px 14px;
    z-index: 1000;
    max-height: calc(100% - 126px);
    overflow-y: auto;
    transform: translateX(calc(100% + 40px));
    opacity: 0;
    pointer-events: none;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-right.slide-in {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}

.sidebar-right::-webkit-scrollbar { width: 4px; }
.sidebar-right::-webkit-scrollbar-track { background: transparent; }
.sidebar-right::-webkit-scrollbar-thumb { background: rgba(0,255,136,0.2); border-radius: 4px; }

/* ===== Right Sidebar Close (desktop) ===== */
.sidebar-right-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 26px;
    height: 26px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    color: #888;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 10;
    padding: 0;
}

.sidebar-right-close:hover {
    background: rgba(255, 68, 68, 0.15);
    border-color: rgba(255, 68, 68, 0.3);
    color: #ff6666;
}

/* ===== Sidebar Content ===== */
.sidebar-title {
    font-size: 1.05em;
    color: #00ff88;
    margin-bottom: 14px;
    font-weight: 700;
}

.search-input-wrapper { position: relative; }

.search-box {
    width: 100%;
    padding: 10px 12px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 8px;
    color: #fff;
    font-size: 0.9em;
    margin-bottom: 8px;
    transition: all 0.3s;
}

.search-box:focus {
    outline: none;
    border-color: #00ff88;
    box-shadow: 0 0 12px rgba(0, 255, 136, 0.3);
    background: rgba(255,255,255,0.08);
}

.search-box::placeholder { color: #666; }

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 255, 136, 0.25);
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 260px;
    overflow-y: auto;
    z-index: 1001;
    display: none;
}

.search-suggestions::-webkit-scrollbar { width: 4px; }
.search-suggestions::-webkit-scrollbar-track { background: transparent; }
.search-suggestions::-webkit-scrollbar-thumb { background: rgba(0,255,136,0.25); border-radius: 4px; }
.search-suggestions.active { display: block; }

.suggestion-item {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    color: #fff;
    transition: all 0.2s;
}
.suggestion-item:last-child { border-bottom: none; }
.suggestion-item:hover { background: rgba(0,255,136,0.12); color: #00ff88; }
.suggestion-name { font-weight: 600; font-size: 0.9em; }
.suggestion-location { font-size: 0.78em; color: #888; margin-top: 2px; }
.suggestion-item:hover .suggestion-location { color: rgba(0,255,136,0.6); }

.btn-search {
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, #00ff88, #00cc6a);
    border: none;
    border-radius: 8px;
    color: #000;
    font-weight: 700;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn-search:disabled { opacity: 0.85; cursor: wait; }
.btn-search .search-spinner {
    width: 14px; height: 14px;
    border: 2px solid rgba(0,0,0,0.2);
    border-top-color: #000;
    border-radius: 50%;
    animation: spin-search 0.7s linear infinite;
    display: inline-block;
}
.btn-search:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 255, 136, 0.35);
}

.search-result {
    margin-top: 10px;
    padding: 8px 10px;
    background: rgba(255,255,255,0.04);
    border-radius: 6px;
    color: #00ff88;
    font-size: 0.85em;
}

.date-selector { margin-top: 12px; }

.date-label {
    display: block;
    color: #00ff88;
    font-size: 0.82em;
    margin-bottom: 6px;
    font-weight: 600;
}

.date-input {
    width: 100%;
    padding: 8px 10px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 8px;
    color: #fff;
    font-size: 0.88em;
}

.btn-report {
    width: 100%;
    padding: 11px;
    background: linear-gradient(135deg, #ffd700, #ffaa00);
    border: none;
    border-radius: 8px;
    color: #000;
    font-weight: 700;
    font-size: 0.92em;
    cursor: pointer;
    margin-top: 12px;
    transition: all 0.3s;
}
.btn-report:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(255, 215, 0, 0.4);
}
.btn-report:disabled { opacity: 0.4; cursor: not-allowed; }

/* ===== Sidebar Footer Info (moved from map-footer) ===== */
.sidebar-footer-info {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 255, 136, 0.12);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-footer-info .searches-counter {
    padding: 7px 10px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 6px;
    color: #00ff88;
    font-weight: 600;
    font-size: 0.78em;
    text-align: center;
}

.btn-premium-sidebar {
    padding: 8px 12px;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 8px;
    color: #ffd700;
    font-weight: 600;
    font-size: 0.82em;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.btn-premium-sidebar:hover {
    background: rgba(255, 215, 0, 0.18);
    border-color: rgba(255, 215, 0, 0.5);
}

/* ===== Right Sidebar Info ===== */
.sidebar-right .sidebar-title { font-size: 0.92em; margin-bottom: 10px; }
.info-placeholder { color: #777; text-align: center; padding: 20px 12px; font-size: 0.82em; line-height: 1.5; }
.vereda-info { display: none; }
.vereda-info.active { display: block; }

.info-item { margin-bottom: 6px; padding: 6px 8px; background: rgba(255,255,255,0.04); border-radius: 5px; }
.info-grid-compact { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.info-cell { padding: 5px 7px; background: rgba(255,255,255,0.04); border-radius: 5px; }
.info-label { font-size: 0.68em; color: #777; margin-bottom: 1px; text-transform: uppercase; letter-spacing: 0.03em; }
.info-value { font-size: 0.82em; color: #fff; font-weight: 600; }

/* ===== Map Footer (hidden — content in sidebar) ===== */
.map-footer { display: none; }

/* ===== Vereda Tooltip ===== */
.vereda-tooltip {
    background: rgba(0, 0, 0, 0.85) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(0, 255, 136, 0.4) !important;
    color: #00ff88 !important;
    font-weight: 700 !important;
    padding: 8px 12px !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6) !important;
    font-size: 0.88em !important;
}

/* ===== Leaflet Controls — Dark Theme ===== */
.leaflet-control-zoom {
    border: none !important;
    border-radius: 10px !important;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.5) !important;
    margin-top: 100px !important;
}

.leaflet-control-zoom a {
    background: rgba(0, 0, 0, 0.55) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    color: #00ff88 !important;
    border: none !important;
    border-bottom: 1px solid rgba(0, 255, 136, 0.12) !important;
    width: 34px !important;
    height: 34px !important;
    line-height: 34px !important;
    font-size: 15px !important;
    transition: background 0.2s !important;
}

.leaflet-control-zoom a:hover {
    background: rgba(0, 255, 136, 0.15) !important;
    color: #fff !important;
}

.leaflet-control-zoom a:last-child {
    border-bottom: none !important;
}

.leaflet-control-attribution {
    background: rgba(0,0,0,0.4) !important;
    color: #666 !important;
    font-size: 0.65em !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
}
.leaflet-control-attribution a { color: #888 !important; }

/* ===== Onboarding Overlay ===== */
.map-onboarding-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    background: rgba(0, 0, 0, 0.35);
    transition: opacity 0.5s;
}

.map-onboarding-overlay.dismissed {
    opacity: 0;
    pointer-events: none;
}

.onboarding-card {
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    border: 1px solid rgba(0, 255, 136, 0.25);
    border-radius: 18px;
    padding: 30px 36px;
    text-align: center;
    max-width: 400px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.6);
}

.onboarding-card h3 {
    color: #00ff88;
    font-size: 1.2em;
    margin: 0 0 10px;
    font-weight: 700;
}

.onboarding-card p {
    color: #bbb;
    font-size: 0.9em;
    line-height: 1.55;
    margin: 0 0 18px;
}

.btn-onboarding-dismiss {
    padding: 9px 28px;
    background: linear-gradient(135deg, #00ff88, #00cc6a);
    border: none;
    border-radius: 8px;
    color: #000;
    font-weight: 700;
    font-size: 0.88em;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-onboarding-dismiss:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 255, 136, 0.4);
}

/* ===== Mobile Map Toggle Buttons ===== */
.mobile-map-toggles {
    display: none;
    position: absolute;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;
    gap: 6px;
}

.mobile-toggle-btn {
    padding: 8px 14px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 20px;
    color: #00ff88;
    font-weight: 600;
    font-size: 0.8em;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px;
}

.mobile-toggle-btn:hover,
.mobile-toggle-btn.active {
    background: rgba(0, 255, 136, 0.15);
    border-color: #00ff88;
}

/* ===== Mobile Sidebar Close Button ===== */
.mobile-sidebar-close {
    display: none;
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid rgba(255, 68, 68, 0.3);
    border-radius: 50%;
    color: #ff6666;
    font-size: 1em;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s;
}
.mobile-sidebar-close:hover {
    background: rgba(255, 68, 68, 0.25);
}

/* ===== Mobile Overlay ===== */
.mobile-sidebar-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}
.mobile-sidebar-overlay.active {
    display: block;
}

/* ===== Animations ===== */
@keyframes spin-search {
    to { transform: rotate(360deg); }
}
