/* AZAF Navigator - əsas üslublar */

:root {
    --azaf-blue: #0a2540;
    --azaf-blue-2: #1f4e79;
    --azaf-gold: #ffc107;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.bg-aviation {
    background: linear-gradient(90deg, var(--azaf-blue), var(--azaf-blue-2));
}
.navbar-dark .navbar-nav .nav-link { color: rgba(255,255,255,.85); }
.navbar-dark .navbar-nav .nav-link:hover { color: var(--azaf-gold); }
.navbar-brand { font-size: 1.15rem; }

/* ============== MAP PAGE LAYOUT ============== */
.map-page {
    display: flex;
    position: relative;
    height: calc(100vh - 56px - 60px);
    min-height: 480px;
    background: #e9eef2;
}
.map-canvas {
    flex: 1;
    height: 100%;
}
.map-sidebar {
    width: 320px;
    background: #fff;
    box-shadow: 1px 0 6px rgba(0,0,0,.08);
    overflow-y: auto;
    z-index: 500;
    transition: transform .25s ease;
}
.sidebar-search {
    padding: .75rem;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 10;
}
.search-results {
    max-height: 360px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 .25rem .25rem;
    display: none;
}
.search-results.open { display:block; box-shadow: 0 4px 12px rgba(0,0,0,.1); }
.search-results .item {
    padding: .5rem .75rem;
    border-bottom: 1px solid #f1f3f5;
    cursor: pointer;
    font-size: .85rem;
}
.search-results .item:hover,
.search-results .item.active { background: #e7f1ff; }
.search-results .item .meta { color:#6c757d; font-size:.75rem; }

.sidebar-section {
    padding: .9rem .75rem;
    border-bottom: 1px solid #f1f3f5;
}
.sidebar-section-title {
    font-weight: 600;
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: #495057;
    margin-bottom: .6rem;
}
.marker-dot {
    display: inline-block;
    width: 10px; height: 10px;
    border-radius: 50%;
    margin-right: .3rem;
    vertical-align: middle;
}
.form-check-label { font-size: .9rem; }

/* Route list */
.route-list {
    list-style: none;
    padding: 0;
    margin: 0 0 .5rem;
    max-height: 240px;
    overflow-y: auto;
}
.route-list li {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .35rem .5rem;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: .25rem;
    margin-bottom: .25rem;
    font-size: .8rem;
}
.route-list li .ident {
    background: #0d6efd; color:#fff;
    padding: 1px 6px; border-radius: 3px;
    font-family: monospace;
    font-size: .75rem;
}
.route-list li .rm { margin-left: auto; cursor: pointer; color:#dc3545; }
.route-list li.empty { background: transparent; border: 1px dashed #ced4da; color:#adb5bd; justify-content:center; }

.route-summary {
    font-size: .8rem;
    background: #f8f9fa;
    border-left: 3px solid var(--azaf-gold);
    padding: .6rem;
    border-radius: .25rem;
}
.route-summary table { width:100%; font-family: monospace; font-size: .75rem; }
.route-summary table td { padding: 2px 4px; }

/* Cursor coord readout */
.cursor-coord {
    position: absolute;
    bottom: 10px; left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,.75);
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-family: monospace;
    font-size: .75rem;
    z-index: 600;
    pointer-events: none;
}

.sidebar-toggle {
    position: absolute;
    top: 10px; left: 10px;
    z-index: 700;
}

/* ============== MAP MARKER STYLE ============== */
.az-marker {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px; height: 26px;
    border-radius: 50%;
    color: #fff;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,.4);
    font-size: 13px;
}
.az-marker.civil   { background: #0d6efd; }
.az-marker.military{ background: #dc3545; }
.az-marker.joint   { background: #6610f2; }
.az-marker.heliport{ background: #ffc107; color: #000; }
.az-marker.private { background: #6c757d; }
.az-marker.closed  { background: #adb5bd; }
.az-marker.vor     { background: #0dcaf0; color: #000; width:22px; height:22px; transform: rotate(45deg); border-radius: 3px; }
.az-marker.vor span { transform: rotate(-45deg); display:inline-block; }
.az-marker.ndb     { background: #6c757d; width:18px; height:18px; font-size: 10px; }
.az-marker.fix     { background: #fff; color: #000; width:14px; height:14px; }

.popup-airport h6 { margin: 0 0 4px; }
.popup-airport .icao {
    background: #0a2540; color: #ffc107; padding: 1px 6px;
    border-radius: 3px; font-family: monospace; font-size: .8rem;
}
.popup-airport .meta { font-size: .75rem; color: #495057; }
.popup-airport .btn { margin-top: 6px; }

/* Modal aerodrom təfsilatı */
.airport-detail table { font-size: .85rem; }
.airport-detail .freq {
    display: inline-block;
    background: #e7f1ff; color: #0a58ca;
    padding: 1px 6px; border-radius: 4px;
    font-family: monospace;
    margin-right: .25rem; margin-bottom: .25rem;
    font-size: .8rem;
}

.white-space-pre { white-space: pre-line; }

/* ============== Mobil ============== */
@media (max-width: 991.98px) {
    .map-page { height: calc(100vh - 56px); }
    .map-sidebar {
        position: absolute;
        top: 0; bottom: 0; left: 0;
        transform: translateX(-100%);
        background: #fff;
        z-index: 800;
        max-width: 88%;
        box-shadow: 4px 0 20px rgba(0,0,0,.2);
    }
    .map-sidebar.open { transform: translateX(0); }

    /* Navbar mobil */
    .navbar-nav .nav-link { padding: .6rem 0; border-bottom: 1px solid rgba(255,255,255,.08); }
    .navbar-nav .nav-link:last-child { border-bottom: 0; }

    /* Cədvəllər mobile-də scroll */
    .table-responsive { -webkit-overflow-scrolling: touch; }

    /* Cards padding azalt */
    .card-body { padding: 1rem; }

    /* H1/H2 ölçüləri */
    h1.h3 { font-size: 1.4rem; }
    h1.h4 { font-size: 1.2rem; }

    /* Bottom safety padding for thumb reach */
    body { padding-bottom: env(safe-area-inset-bottom); }
}

/* Çap üçün — route planner çapı */
@media print {
    .navbar, footer, .sidebar-toggle, .map-sidebar,
    #rpMap, .powered-strip, .alert,
    button, .btn { display: none !important; }
    .card { border: 1px solid #ccc !important; box-shadow: none !important; }
    body { background: #fff !important; }
}

.stat-card { transition: transform .15s; }
.stat-card:hover { transform: translateY(-2px); }
