/* ==========================================================================
   VRMAP QUẢNG YÊN - DESIGN SYSTEM & UI/UX INTERACTION STYLESHEET
   Standard: Modern Light Glassmorphism, Micro-interactions, High Contrast
   ========================================================================== */

.vrmap-wrapper {
    font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    letter-spacing: -0.01em;
}

/* 1. Custom Smooth Scrollbars */
.custom-scrollbar::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(241, 245, 249, 0.6);
    border-radius: 6px;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(203, 213, 225, 0.8);
    border-radius: 6px;
    transition: background 0.2s ease;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #2563eb;
}

/* 2. Glassmorphism Elevation & Borders */
.glass-panel {
    background: rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: blur(16px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(16px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
    box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.08), 0 4px 12px -2px rgba(15, 23, 42, 0.04) !important;
}

.glass-panel-hover {
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.glass-panel-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 36px -6px rgba(37, 99, 235, 0.12), 0 6px 16px -2px rgba(15, 23, 42, 0.06) !important;
    border-color: rgba(191, 219, 254, 0.9) !important;
}

/* 3. Custom Map Marker Pin System (Sa Bàn Cyan Pill Badges + Stem Line + Target Pulse Dot) */
.vrmap-custom-marker-wrapper, .vrmap-2d-marker-wrapper {
    background: transparent !important;
    border: none !important;
    overflow: visible !important;
}

.saban-hotspot {
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    overflow: visible !important;
    position: absolute !important;
    z-index: 20;
}

.saban-pin-container,
.saban-gateway-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.6));
    transform: translate(-50%, calc(-100% + 6px));
    transform-origin: 50% calc(100% - 6px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.vrmap-custom-marker-wrapper:hover .saban-pin-container,
.saban-hotspot:hover .saban-pin-container,
.saban-hotspot:hover .saban-gateway-container {
    transform: translate(-50%, calc(-100% + 6px)) scale(1.12);
    z-index: 1000 !important;
}

.saban-pin-badge {
    background: linear-gradient(135deg, #0284c7 0%, #1d4ed8 100%);
    color: #ffffff;
    font-family: 'Geist', -apple-system, sans-serif;
    font-weight: 500;
    font-size: 12px;
    letter-spacing: 0.01em;
    line-height: 1.2;
    padding: 5px 13px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 6px 22px rgba(2, 132, 199, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 0 0 2.5px #ffffff;
    white-space: nowrap;
    backdrop-filter: blur(6px);
    transition: all 0.25s ease;
}

/* Category Specific Vibrant Color Gradients for 2D Map & 3D Sa Bàn */
.saban-pin-badge.badge-red {
    background: linear-gradient(135deg, #f43f5e 0%, #be123c 100%) !important;
    box-shadow: 0 6px 24px rgba(244, 63, 94, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 0 0 2.5px #ffffff !important;
}
.saban-pin-badge.badge-green {
    background: linear-gradient(135deg, #10b981 0%, #047857 100%) !important;
    box-shadow: 0 6px 24px rgba(16, 185, 129, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 0 0 2.5px #ffffff !important;
}
.saban-pin-badge.badge-amber {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    box-shadow: 0 6px 24px rgba(245, 158, 11, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 0 0 2.5px #ffffff !important;
}
.saban-pin-badge.badge-cyan {
    background: linear-gradient(135deg, #06b6d4 0%, #1d4ed8 100%) !important;
    box-shadow: 0 6px 24px rgba(6, 182, 212, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 0 0 2.5px #ffffff !important;
}
.saban-pin-badge.badge-purple {
    background: linear-gradient(135deg, #a855f7 0%, #6d28d9 100%) !important;
    box-shadow: 0 6px 24px rgba(168, 85, 247, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 0 0 2.5px #ffffff !important;
}
.saban-pin-badge.badge-event {
    background: linear-gradient(135deg, #ec4899 0%, #7c3aed 100%) !important;
    box-shadow: 0 6px 24px rgba(236, 72, 153, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 0 0 2.5px #ffffff !important;
}
.saban-pin-badge.badge-news {
    background: linear-gradient(135deg, #14b8a6 0%, #0f766e 100%) !important;
    box-shadow: 0 6px 24px rgba(20, 184, 166, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 0 0 2.5px #ffffff !important;
}

.saban-pin-badge .pin-icon-wrap {
    background: rgba(255, 255, 255, 0.28);
    border-radius: 9999px;
    padding: 3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.vrmap-custom-marker-wrapper:hover .saban-pin-badge,
.saban-hotspot:hover .saban-pin-badge {
    filter: brightness(1.15);
    box-shadow: 0 8px 28px rgba(255, 255, 255, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 0 0 3px #ffffff !important;
}

.saban-pin-stem {
    width: 2.5px;
    height: 40px;
    background: linear-gradient(to bottom, #ffffff 0%, rgba(255, 255, 255, 0.4) 100%);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.9);
}

.saban-pin-dot-wrap {
    position: relative;
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.saban-pin-dot {
    width: 9px;
    height: 9px;
    background-color: #ffffff;
    border-radius: 50%;
    box-shadow: 0 0 14px 5px rgba(255, 255, 255, 1);
}
.saban-pin-pulse {
    position: absolute;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 0 14px rgba(255, 255, 255, 0.9);
    animation: saban-pulse-anim 2s infinite ease-out;
}
@keyframes saban-pulse-anim {
    0% { transform: scale(0.3); opacity: 1; }
    100% { transform: scale(2.4); opacity: 0; }
}

/* 4. Leaflet Map Controls & Popup Styling */
.vrmap-wrapper .leaflet-container {
    background-color: #f8fafc !important;
    font-family: inherit;
}

.vrmap-wrapper .leaflet-control-zoom {
    border: 1px solid rgba(226, 232, 240, 0.9) !important;
    border-radius: 14px !important;
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.1) !important;
    margin-right: 16px !important;
    margin-bottom: 24px !important;
}

@media (max-width: 639px) {
    .vrmap-wrapper .leaflet-control-zoom {
        margin-bottom: 220px !important;
        margin-right: 12px !important;
    }
}
.vrmap-wrapper .leaflet-control-zoom-in,
.vrmap-wrapper .leaflet-control-zoom-out {
    background-color: rgba(255, 255, 255, 0.95) !important;
    color: #1e293b !important;
    border-bottom: 1px solid rgba(226, 232, 240, 0.9) !important;
    width: 36px !important;
    height: 36px !important;
    line-height: 36px !important;
    font-weight: bold;
    transition: all 0.2s ease;
}
.vrmap-wrapper .leaflet-control-zoom-in:hover,
.vrmap-wrapper .leaflet-control-zoom-out:hover {
    background-color: #eff6ff !important;
    color: #2563eb !important;
}

/* Global Leaflet Popup & Stacking System */
.vrmap-wrapper .leaflet-popup-pane,
.vrmap-wrapper .leaflet-popup {
    z-index: 1000 !important;
}

.vrmap-wrapper .leaflet-popup-content-wrapper {
    background: rgba(255, 255, 255, 0.96) !important;
    backdrop-filter: blur(12px) !important;
    color: #0f172a !important;
    border: 1px solid rgba(226, 232, 240, 0.9) !important;
    border-radius: 20px !important;
    box-shadow: 0 20px 35px -5px rgba(15, 23, 42, 0.18), 0 8px 16px -4px rgba(15, 23, 42, 0.08) !important;
    padding: 0 !important;
    overflow: hidden;
}
.vrmap-wrapper .leaflet-popup-content {
    margin: 0 !important;
    width: 270px !important;
    max-width: calc(100vw - 32px) !important;
}
.vrmap-wrapper .leaflet-popup-tip {
    background: rgba(255, 255, 255, 0.96) !important;
    border: 1px solid rgba(226, 232, 240, 0.9) !important;
}

/* 5. Bottom Dock & Card Interactions */
.vrmap-card {
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}
.vrmap-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #2563eb, #3b82f6);
    opacity: 0;
    transition: opacity 0.25s ease;
}
.vrmap-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -4px rgba(37, 99, 235, 0.15) !important;
}
.vrmap-card:hover::after {
    opacity: 1;
}

/* Active State Badge Indicators */
.dock-tab-btn {
    position: relative;
    transition: all 0.2s ease;
}
.dock-tab-btn.active {
    background-color: #2563eb !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3) !important;
}

.cat-filter-item {
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.cat-filter-item:hover {
    transform: translateX(3px);
}
.cat-filter-item.active {
    background-color: #eff6ff !important;
    color: #1d4ed8 !important;
    border-color: #bfdbfe !important;
    font-weight: 700 !important;
}

/* 6. Drawer Overlay Blur Effect */
.vrmap-drawer-backdrop {
    background: rgba(15, 23, 42, 0.25);
    backdrop-filter: blur(4px);
    transition: opacity 0.3s ease;
}

/* 7. Custom Marker Hover Tooltip System */
.leaflet-tooltip.vrmap-custom-tooltip {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.leaflet-tooltip.vrmap-custom-tooltip::before {
    display: none !important;
}

.vrmap-tooltip-card {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(226, 232, 240, 0.9) !important;
    box-shadow: 0 14px 30px -4px rgba(15, 23, 42, 0.2), 0 4px 10px -2px rgba(15, 23, 42, 0.08) !important;
    border-radius: 14px !important;
    animation: tooltipFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateY(4px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 8. Hide Leaflet Map Bottom-Right Attribution & Watermark */
.vrmap-wrapper .leaflet-bottom.leaflet-right,
.vrmap-wrapper .leaflet-control-attribution,
.leaflet-bottom.leaflet-right,
.leaflet-control-attribution {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* 9. Compact Card Padding & Radius (0.25rem) */
.rounded-card {
    border-radius: 0.25rem !important;
    padding: 0.05rem !important;
}

.vrmap-card {
    padding: 0.25rem !important;
    border-radius: 0.25rem !important;
}

/* 10. Drawer Active State Styling */
body.vrmap-drawer-active #vrmap-drawer {
    /* Smooth entrance shadow */
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25) !important;
}

/* 11. High-Contrast Easy-to-See Close Buttons with Border & Hover Effects */
.vrmap-wrapper .leaflet-popup-close-button,
.leaflet-container a.leaflet-popup-close-button {
    width: 26px !important;
    height: 26px !important;
    line-height: 24px !important;
    text-align: center !important;
    border-radius: 50% !important;
    background: #ffffff !important;
    border: 1.5px solid #cbd5e1 !important;
    color: #475569 !important;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.15) !important;
    top: 8px !important;
    right: 8px !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
}

.vrmap-wrapper .leaflet-popup-close-button:hover,
.leaflet-container a.leaflet-popup-close-button:hover {
    background: #fff1f2 !important;
    color: #e11d48 !important;
    border-color: #fda4af !important;
    transform: scale(1.1) !important;
}
