/* Airport detail panel — opened by clicking an airport marker on the map.
   House style: dark-blue gradient panels, cyan #00d4ff accent, system font,
   matching flightarrow-cameras.css. */

.fa-ap-panel {
    position: fixed;
    /* 16px matcht de zwevende linker-sidebar (flightarrow-panel.css) */
    top: 16px;
    right: 16px;
    z-index: 1550;
    width: 340px;
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 32px);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.55);
}

/* ---- Header ---- */
.fa-ap-head {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 13px 12px 12px 14px;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.6) 0%, rgba(22, 33, 62, 0.6) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.fa-ap-titlewrap { flex: 1; min-width: 0; }
.fa-ap-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    color: #00d4ff;
    overflow: hidden;
    text-overflow: ellipsis;
}
.fa-ap-sub {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 4px;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.85);
}
.fa-ap-flag { font-size: 15px; line-height: 1; }
.fa-ap-flag:empty { display: none; }
.fa-ap-elev {
    margin-top: 3px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.45);
}
.fa-ap-elev:empty { display: none; }
.fa-ap-close {
    flex: none;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    cursor: pointer;
}
.fa-ap-close:hover { color: #ff8a80; background: rgba(231, 76, 60, 0.18); }

/* ---- Scrollable body ---- */
.fa-ap-body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 12px 14px 14px;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 212, 255, 0.35) transparent;
}
.fa-ap-body::-webkit-scrollbar { width: 7px; }
.fa-ap-body::-webkit-scrollbar-thumb {
    background: rgba(0, 212, 255, 0.32);
    border-radius: 6px;
}
.fa-ap-body::-webkit-scrollbar-thumb:hover { background: rgba(0, 212, 255, 0.5); }

/* ---- Weather stat tiles ---- */
.fa-ap-tiles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 7px;
    margin-bottom: 12px;
}
.fa-ap-tile {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 9px 8px;
    border: 1px solid rgba(0, 212, 255, 0.18);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.04);
    min-width: 0;
}
.fa-ap-tile-label {
    font-size: 9.5px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.42);
}
.fa-ap-tile-val {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.15;
    min-width: 0;
}
.fa-ap-cond-icon { width: 18px; height: 18px; flex: none; }
.fa-ap-cond-text {
    font-size: 12.5px;
    overflow-wrap: break-word;
}
.fa-ap-wind-arrowwrap {
    display: inline-flex;
    flex: none;
    transform-origin: 50% 50%;
}
.fa-ap-wind-arrow { width: 15px; height: 15px; display: block; }
.fa-ap-wind-text { font-size: 12.5px; overflow-wrap: break-word; min-width: 0; }

/* ---- Meta grid ---- */
.fa-ap-meta { display: flex; flex-direction: column; gap: 6px; }
.fa-ap-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-size: 13px;
}
.fa-ap-key {
    flex: none;
    width: 118px;
    color: rgba(255, 255, 255, 0.45);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.fa-ap-val { flex: 1; min-width: 0; }
.fa-ap-loading {
    padding: 12px 0;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
}

/* ---- Webcams accordion ---- */
.fa-ap-cams { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.fa-ap-cams-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fa-ap-scanbtn {
    flex: none;
    padding: 2px 9px;
    border: 1px solid rgba(0, 212, 255, 0.35);
    border-radius: 10px;
    background: transparent;
    color: #00d4ff;
    font: inherit;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    cursor: pointer;
}
.fa-ap-scanbtn:hover { background: rgba(0, 212, 255, 0.12); }
.fa-ap-scanbtn:disabled { opacity: 0.5; cursor: default; }
.fa-ap-cam-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; display: none; }
.fa-ap-cam-dot.busy { display: inline-block; background: rgba(255, 255, 255, 0.3); animation: fa-ap-dot-pulse 1s ease-in-out infinite; }
.fa-ap-cam-dot.ok { display: inline-block; background: #2ecc55; box-shadow: 0 0 6px rgba(46, 204, 85, 0.6); }
.fa-ap-cam-dot.dead { display: inline-block; background: #ff4444; box-shadow: 0 0 6px rgba(255, 68, 68, 0.5); }
.fa-ap-cam-dot.unknown { display: inline-block; background: #777; }
@keyframes fa-ap-dot-pulse { 50% { opacity: 0.3; } }
.fa-ap-section {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.4);
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.fa-ap-cam {
    border: 1px solid rgba(0, 212, 255, 0.22);
    border-radius: 8px;
    overflow: hidden;
    background: #0d1020;
}
.fa-ap-cam-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 9px 10px;
    border: 0;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.7) 0%, rgba(22, 33, 62, 0.7) 100%);
    color: #fff;
    font: 600 12px -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    text-align: left;
    cursor: pointer;
}
.fa-ap-cam-row:hover { background: linear-gradient(135deg, rgba(0, 212, 255, 0.14) 0%, rgba(0, 212, 255, 0.08) 100%); }
.fa-ap-cam-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.fa-ap-cam-chevron {
    flex: none;
    color: #00d4ff;
    font-size: 16px;
    line-height: 1;
    transition: transform 0.18s ease;
}
.fa-ap-cam.open .fa-ap-cam-chevron { transform: rotate(90deg); }
.fa-ap-cam-panel:empty { display: none; }
.fa-ap-cam-media {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
    display: block;
    background: #000;
    object-fit: contain;
}
.fa-ap-cam-panel .fa-ap-cam-openbtn {
    display: block;
    margin: 10px 12px;
    padding: 8px 12px;
    border: 1px solid rgba(0, 212, 255, 0.45);
    border-radius: 8px;
    background: rgba(0, 212, 255, 0.12);
    color: #00d4ff;
    font: 600 11px/1 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}
.fa-ap-cam-panel .fa-ap-cam-openbtn:hover { background: rgba(0, 212, 255, 0.22); }

/* Mobile: dock to the bottom, cap the height, keep the map partly visible.
   The three stat tiles stay side by side, just smaller. */
@media (max-width: 560px) {
    .fa-ap-panel {
        top: auto;
        right: 8px;
        left: 8px;
        bottom: 8px;
        width: auto;
        max-width: none;
        max-height: 60vh;
    }
    .fa-ap-tiles { gap: 5px; }
    .fa-ap-tile { padding: 7px 6px; }
    .fa-ap-tile-val { font-size: 12px; }
    .fa-ap-wind-text { font-size: 11px; }
}
