/* ============================================
   GeoScope Header Premium Styles
   Homogeneous with leaf-premium.css aesthetic
   ============================================ */

/* Header Search - Premium Style */
.search-input-header {
    background: rgba(30, 41, 59, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
    border-radius: 99px !important;
    padding: 0.625rem 1.25rem !important;
    font-size: 0.9rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-input-header::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-input-header:focus {
    background: rgba(30, 41, 59, 0.8) !important;
    border-color: rgba(56, 189, 248, 0.4) !important;
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.1), 0 4px 12px rgba(0,0,0,0.2) !important;
    outline: none;
}

.search-suggestions-header {
    position: absolute;
    top: 110%;
    left: 0;
    width: 100%;
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: #f1f5f9;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
    z-index: 2000;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.05);
}

.search-suggest {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.9rem;
    transition: background 0.2s ease;
}

.search-suggest:hover {
    background: rgba(56, 189, 248, 0.15);
}

.search-suggest:last-child {
    border-bottom: none;
}

/* Light Theme - Premium Search */
body.map-theme-light .search-input-header {
    background: rgba(255, 255, 255, 0.7) !important;
    border-color: rgba(15, 23, 42, 0.15) !important;
    color: #0f172a !important;
}

body.map-theme-light .search-input-header::placeholder {
    color: rgba(15, 23, 42, 0.5);
}

body.map-theme-light .search-input-header:focus {
    background: rgba(255, 255, 255, 0.9) !important;
    border-color: rgba(37, 99, 235, 0.4) !important;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1) !important;
}

body.map-theme-light .search-suggestions-header {
    background: rgba(255, 255, 255, 0.95);
    color: #0f172a;
    border-color: rgba(15, 23, 42, 0.1);
}

body.map-theme-light .search-suggest:hover {
    background: rgba(37, 99, 235, 0.1);
}

/* Hero Section - Premium Glass Effect */
body.leaf-layout .hero,
body.map-layout .hero {
    position: relative;
    z-index: 2600;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(30, 41, 59, 0.85) 100%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* Brand Logo */
body.leaf-layout .brand-logo,
body.map-layout .brand-logo {
    height: 34px;
    width: auto;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
    transition: transform 0.2s ease;
}

body.leaf-layout .brand-logo:hover,
body.map-layout .brand-logo:hover {
    transform: scale(1.02);
}

/* Navbar - Premium Style */
body.leaf-layout .hero .navbar,
body.map-layout .hero .navbar {
    padding: 0;
    position: relative;
    z-index: 2600;
}

body.leaf-layout .hero .navbar-collapse,
body.map-layout .hero .navbar-collapse {
    position: relative;
    z-index: 2600;
}

body.leaf-layout .hero .dropdown-menu,
body.map-layout .hero .dropdown-menu {
    z-index: 3000;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
    padding: 6px;
    min-width: 120px;
}

/* Unified Dropdown Items - Same style everywhere */
.dropdown-item,
.geoscope-dropdown-item,
select.panel-select {
    border-radius: 8px;
    padding: 8px 12px;
    color: #e2e8f0;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    opacity: 1;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dropdown-item:hover,
.geoscope-dropdown-item:hover,
select.panel-select:hover {
    background: rgba(56, 189, 248, 0.2);
    color: #ffffff;
    transform: translateX(2px);
    border-color: rgba(56, 189, 248, 0.3);
}

.dropdown-item.active,
.dropdown-item:active,
.geoscope-dropdown-item.active,
select.panel-select:focus {
    background: rgba(56, 189, 248, 0.25);
    border-color: rgba(56, 189, 248, 0.4);
    color: #ffffff;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

.dropdown-item .code,
.geoscope-dropdown-item .code {
    font-weight: 700;
    opacity: 0.9;
}

.dropdown-item:hover .code,
.geoscope-dropdown-item:hover .code {
    opacity: 1;
}

/* Panel Select specific */
select.panel-select {
    width: 100%;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

select.panel-select option {
    background: #0f172a;
    color: #e2e8f0;
    padding: 8px;
}

/* Panel Label */
.panel-label {
    font-size: 11px;
    color: rgba(148, 163, 184, 0.9);
    margin-right: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Layers Control - Match dropdown-item style */
#layers-control .leaflet-control-layers {
    box-shadow: none;
    border: none;
    margin: 0;
    background: transparent;
}

#layers-control .leaflet-control-layers-expanded {
    background: transparent;
    padding: 0;
    width: 100%;
}

#layers-control .leaflet-control-layers label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #e2e8f0;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin: 2px 0;
    transition: all 0.2s ease;
    cursor: pointer;
}

#layers-control .leaflet-control-layers label:hover {
    background: rgba(56, 189, 248, 0.2);
    color: #ffffff;
    transform: translateX(2px);
    border-color: rgba(56, 189, 248, 0.3);
}

#layers-control .leaflet-control-layers input[type="checkbox"],
#layers-control .leaflet-control-layers input[type="radio"] {
    accent-color: #38bdf8;
    width: 16px;
    height: 16px;
    cursor: pointer;
    border-radius: 4px;
}

/* Legend Items - Match dropdown-item style */
.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin: 2px 0;
    font-size: 0.875rem;
    font-weight: 500;
    color: #e2e8f0;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.legend-item:hover {
    background: rgba(56, 189, 248, 0.2);
    color: #ffffff;
    transform: translateX(2px);
    border-color: rgba(56, 189, 248, 0.3);
}

.legend-icon {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Navbar Toggler */
body.leaf-layout .hero .navbar-toggler,
body.map-layout .hero .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 6px 10px;
    transition: all 0.2s ease;
}

body.leaf-layout .hero .navbar-toggler:hover,
body.map-layout .hero .navbar-toggler:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

body.leaf-layout .hero .navbar-toggler-icon,
body.map-layout .hero .navbar-toggler-icon {
    filter: invert(1);
}

/* Nav Links - Premium Pill Style */
body.leaf-layout .hero .nav-link,
body.map-layout .hero .nav-link {
    color: rgba(203, 213, 225, 0.85);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 99px;
    border: 1px solid transparent;
    background: rgba(15, 23, 42, 0.4);
    white-space: nowrap;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

body.leaf-layout .hero .nav-link:hover,
body.leaf-layout .hero .nav-link:focus,
body.map-layout .hero .nav-link:hover,
body.map-layout .hero .nav-link:focus {
    border-color: rgba(148, 163, 184, 0.3);
    background: rgba(30, 41, 59, 0.6);
    color: #e2e8f0;
    transform: translateY(-1px);
}

body.leaf-layout .hero .nav-link.active,
body.map-layout .hero .nav-link.active {
    background: rgba(56, 189, 248, 0.2);
    border-color: rgba(56, 189, 248, 0.4);
    color: #ffffff;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.2);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    body.leaf-layout .hero,
    body.map-layout .hero {
        padding: 0.5rem 0.75rem;
    }
    
    .header-search-wrapper {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }

    body.leaf-layout .hero .nav-link,
    body.map-layout .hero .nav-link {
        padding: 8px 14px;
        font-size: 0.9rem;
    }
}

@media (max-width: 420px) {
    body.leaf-layout .brand-logo,
    body.map-layout .brand-logo {
        height: 28px;
    }
}

/* Language Switcher - Premium Style */
body.leaf-layout .hero .language-switcher select,
body.map-layout .hero .language-switcher select {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 99px;
    color: rgba(203, 213, 225, 0.85);
    padding: 4px 28px 4px 10px;
    font-size: 0.8rem;
    backdrop-filter: blur(8px);
    cursor: pointer;
    transition: all 0.2s ease;
}

body.leaf-layout .hero .language-switcher select:hover,
body.map-layout .hero .language-switcher select:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(30, 41, 59, 0.6);
}

/* ============================================
   LEAFLET POPUP & TOOLTIP STYLES
   ============================================ */

.leaflet-popup-content-wrapper,
.leaflet-popup-content-wrapper * {
    background: transparent !important;
    color: #e2e8f0 !important;
}

.leaflet-popup-content-wrapper {
    background: rgba(30, 41, 59, 0.95) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border-radius: 12px !important;
    padding: 0 !important;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.leaflet-popup-content {
    margin: 0 !important;
    width: auto !important;
    line-height: normal;
    color: #e2e8f0 !important;
    font-size: 14px !important;
}

.leaflet-popup-content > * {
    color: #e2e8f0 !important;
}

.leaflet-popup-tip-container {
    display: none !important;
}

.leaflet-popup-scrolled {
    border: none !important;
    color: #e2e8f0 !important;
}

/* Popup close button */
.leaflet-popup-close-button {
    display: none !important;
}

/* Popup buttons */
.leaflet-popup-content .btn {
    border-radius: 8px !important;
    background: rgba(56, 189, 248, 0.2) !important;
    border-color: rgba(56, 189, 248, 0.4) !important;
    color: #fff !important;
    font-weight: 500 !important;
}

/* Tooltips - Glass style */
.leaflet-tooltip,
.leaflet-tooltip * {
    background: rgba(30, 41, 59, 0.95) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border-radius: 8px !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3) !important;
    color: #e2e8f0 !important;
    font-size: 13px !important;
    font-weight: 500 !important;
}

.leaflet-tooltip-top:before,
.leaflet-tooltip-bottom:before {
    border-top-color: rgba(30, 41, 59, 0.95) !important;
}

/* ============================================
   MAP OVERLAY ELEMENTS
   ============================================ */

.aircraft-count-badge {
    position: fixed;
    bottom: 65px;
    left: 12px;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: #f8fafc;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.aircraft-count-badge:hover {
    background: rgba(15, 23, 42, 0.95);
    border-color: rgba(255, 255, 255, 0.12);
}
