/**
 * ==============================================================================
 * eBSSL - Our Global Client Base Stylesheet
 * Minimalist Corporate UI, Dotted Map Visualization, Location Pins & Stats
 * ==============================================================================
 */

/* -------------------------------------------------------------------------- */
/* Map Stage & Wrapper                                                        */
/* -------------------------------------------------------------------------- */
.ebssl-global-stage {
    position: relative;
    width: 100%;
    border-radius: 1.5rem;
    background: radial-gradient(circle at 50% 40%, rgba(240, 249, 255, 0.85) 0%, rgba(255, 255, 255, 0.95) 75%), #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 10px 30px -10px rgba(0, 132, 255, 0.07), 0 1px 3px rgba(0, 0, 0, 0.03);
    overflow: hidden;
}

.ebssl-map-visual {
    position: relative;
    width: 100%;
    padding-bottom: 58%; /* 1000:580 aspect ratio */
}

@media (max-width: 640px) {
    .ebssl-map-visual {
        padding-bottom: 70%;
    }
}

.ebssl-map-svg-wrap {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.ebssl-map-svg-wrap svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* -------------------------------------------------------------------------- */
/* Flight & Connection Route Arcs                                             */
/* -------------------------------------------------------------------------- */
.ebssl-flight-arc {
    stroke-dasharray: 5 4;
    stroke-linecap: round;
    animation: ebsslArcPulse 25s linear infinite;
    pointer-events: none;
    transition: stroke 0.3s ease, stroke-width 0.3s ease;
}

.ebssl-flight-arc-secondary {
    stroke-dasharray: 4 6;
    animation: ebsslArcPulse 35s linear infinite reverse;
}

@keyframes ebsslArcPulse {
    from {
        stroke-dashoffset: 200;
    }
    to {
        stroke-dashoffset: 0;
    }
}

/* -------------------------------------------------------------------------- */
/* Location Pins & Radar Beacons                                              */
/* -------------------------------------------------------------------------- */
.ebssl-map-pin {
    position: absolute;
    transform: translate(-50%, -50%);
    z-index: 20;
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), z-index 0.1s;
}

.ebssl-map-pin:hover {
    z-index: 45;
    transform: translate(-50%, -56%) scale(1.08);
}

.ebssl-beacon-core {
    width: 10px;
    height: 10px;
    border-radius: 9999px;
    background: #0084ff;
    border: 2px solid #ffffff;
    box-shadow: 0 0 10px rgba(0, 132, 255, 0.7);
    position: relative;
    z-index: 2;
}

.ebssl-beacon-hq {
    background: #10b981;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.8);
}

.ebssl-beacon-wave {
    position: absolute;
    inset: -6px;
    border-radius: 9999px;
    background: rgba(0, 132, 255, 0.35);
    animation: ebsslPingWave 2.8s cubic-bezier(0, 0, 0.2, 1) infinite;
    pointer-events: none;
    z-index: 1;
}

.ebssl-beacon-wave-2 {
    animation-delay: 1.4s;
}

.ebssl-beacon-hq-wave {
    background: rgba(16, 185, 129, 0.4);
}

@keyframes ebsslPingWave {
    0% {
        transform: scale(0.8);
        opacity: 0.9;
    }
    75%, 100% {
        transform: scale(2.8);
        opacity: 0;
    }
}

/* -------------------------------------------------------------------------- */
/* Floating Country Flag Badge Pills                                          */
/* -------------------------------------------------------------------------- */
.ebssl-pin-badge {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.2rem 0.5rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(203, 213, 225, 0.9);
    box-shadow: 0 4px 14px -2px rgba(15, 23, 42, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    white-space: nowrap;
    pointer-events: auto;
    transition: all 0.25s ease;
}

.ebssl-map-pin:hover .ebssl-pin-badge {
    background: #ffffff;
    border-color: #0084ff;
    box-shadow: 0 8px 20px -3px rgba(0, 132, 255, 0.25);
}

.ebssl-flag-img {
    width: 17px;
    height: 12px;
    border-radius: 2px;
    object-fit: cover;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.ebssl-pin-badge-text {
    font-size: 11px;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: -0.01em;
    line-height: 1;
}

.ebssl-pin-badge-hq {
    border-color: rgba(16, 185, 129, 0.6);
    background: rgba(255, 255, 255, 0.98);
}

.ebssl-pin-badge-hq .ebssl-pin-badge-text {
    color: #065f46;
}

/* -------------------------------------------------------------------------- */
/* Interactive Tooltip Card                                                   */
/* -------------------------------------------------------------------------- */
.ebssl-pin-popover {
    position: absolute;
    bottom: calc(100% + 14px);
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    width: 190px;
    padding: 0.75rem;
    border-radius: 0.875rem;
    background: #0b1a30;
    color: #ffffff;
    box-shadow: 0 15px 35px -5px rgba(11, 26, 48, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.1);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 50;
}

.ebssl-pin-popover::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: #0b1a30 transparent transparent transparent;
}

.ebssl-map-pin:hover .ebssl-pin-popover {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* -------------------------------------------------------------------------- */
/* Floating Micro-Motion Keyframes                                            */
/* -------------------------------------------------------------------------- */
.ebssl-float-1 { animation: ebsslFloatMotion 6s ease-in-out infinite; }
.ebssl-float-2 { animation: ebsslFloatMotion 6.5s ease-in-out 1.2s infinite; }
.ebssl-float-3 { animation: ebsslFloatMotion 7s ease-in-out 2.4s infinite; }
.ebssl-float-4 { animation: ebsslFloatMotion 6.2s ease-in-out 3.6s infinite; }

@keyframes ebsslFloatMotion {
    0%, 100% {
        transform: translate(-50%, -50%);
    }
    50% {
        transform: translate(-50%, -54%);
    }
}

.ebssl-map-pin:hover.ebssl-float-1,
.ebssl-map-pin:hover.ebssl-float-2,
.ebssl-map-pin:hover.ebssl-float-3,
.ebssl-map-pin:hover.ebssl-float-4 {
    animation-play-state: paused;
}

/* -------------------------------------------------------------------------- */
/* Statistic Cards                                                            */
/* -------------------------------------------------------------------------- */
.ebssl-stat-box {
    position: relative;
    border-radius: 1.25rem;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    padding: 1.25rem 1.25rem;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 15px -3px rgba(0, 0, 0, 0.03), 0 1px 2px rgba(0, 0, 0, 0.02);
}

.ebssl-stat-box:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 132, 255, 0.4);
    box-shadow: 0 14px 28px -6px rgba(0, 132, 255, 0.12), 0 2px 4px rgba(0, 0, 0, 0.04);
}

.ebssl-stat-number {
    font-size: 2rem;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: #0b1a30;
}

@media (min-width: 1024px) {
    .ebssl-stat-number {
        font-size: 2.25rem;
    }
}

/* -------------------------------------------------------------------------- */
/* Pill Checklist & Compliance Tags                                           */
/* -------------------------------------------------------------------------- */
.ebssl-global-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.85rem;
    border-radius: 9999px;
    background: rgba(241, 245, 249, 0.8);
    border: 1px solid rgba(226, 232, 240, 0.8);
    font-size: 0.75rem;
    font-weight: 600;
    color: #334155;
    transition: all 0.2s ease;
}

.ebssl-global-pill:hover {
    background: #ffffff;
    border-color: #0084ff;
    color: #0084ff;
    box-shadow: 0 4px 12px -2px rgba(0, 132, 255, 0.15);
}

/* -------------------------------------------------------------------------- */
/* Reduced Motion Accessibility                                               */
/* -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .ebssl-flight-arc,
    .ebssl-beacon-wave,
    .ebssl-float-1,
    .ebssl-float-2,
    .ebssl-float-3,
    .ebssl-float-4 {
        animation: none !important;
    }
}
