/* ============================================================
   UFC Coverage — Front-end Styles (v5.1)
   Routes faint by default; click list item OR route to highlight.
   ============================================================ */

.ufc-cov,
.ufc-cov *,
.ufc-cov *::before,
.ufc-cov *::after { box-sizing: border-box; }

.ufc-cov {
    --ufc-navy-700: #1B3A5C;
    --ufc-navy-800: #142E4A;
    --ufc-navy-050: #F1F4F8;
    --ufc-orange:   #D4922A;
    --ufc-orange-dark: #BC811F;
    --ufc-ink-900:  #1E1E2E;
    --ufc-ink-500:  #6B7280;
    --ufc-line:     #E5E7EB;
    --ufc-bg-alt:   #F7F8FA;
    --ufc-font-sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
    --ufc-font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    background: #fff;
    padding: 96px 0;
    font-family: var(--ufc-font-sans);
    color: var(--ufc-ink-900);
    line-height: 1.5;
}

.ufc-cov .ufc-cov-container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

/* ----- HEADER ----- */
.ufc-cov .ufc-cov-eyebrow {
    font-size: 13px; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.12em; color: var(--ufc-orange-dark);
    display: inline-flex; align-items: center; gap: 8px; margin-bottom: 16px;
}
.ufc-cov .ufc-cov-eyebrow::before {
    content: ""; width: 24px; height: 2px; background: var(--ufc-orange);
    display: inline-block;
}
.ufc-cov .ufc-cov-title {
    font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem); line-height: 1.1;
    letter-spacing: -0.02em; font-weight: 800; color: var(--ufc-ink-900);
    margin: 0 0 16px; max-width: 720px;
}
.ufc-cov .ufc-cov-lead {
    font-size: 1.125rem; color: var(--ufc-ink-500); line-height: 1.7;
    margin: 0 0 48px; max-width: 600px;
}

/* ----- GRID ----- */
.ufc-cov .ufc-cov-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 56px;
    align-items: stretch;
}

/* ----- MAP CARD ----- */
.ufc-cov .ufc-cov-map-card {
    position: relative;
    background: var(--ufc-bg-alt);
    border: 1px solid var(--ufc-line);
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 5 / 3;
    min-height: 340px;
    width: 100%;     /* prevent aspect-ratio from forcing wider than column */
    max-width: 100%;
}
.ufc-cov .ufc-cov-schematic-tag {
    position: absolute; left: 18px; top: 18px;
    background: #fff; border: 1px solid var(--ufc-line);
    padding: 6px 12px; border-radius: 999px;
    font-family: var(--ufc-font-mono); font-size: 11px;
    letter-spacing: 0.1em; color: var(--ufc-ink-500); z-index: 2;
}
.ufc-cov .ufc-cov-svg { width: 100%; height: 100%; display: block; }

/* ----- ROUTES: faint by default, bright when active ----- */
.ufc-cov .ufc-cov-route {
    transition: stroke-width 160ms ease, opacity 160ms ease, stroke 160ms ease;
    opacity: 0.18;          /* faint baseline so map looks calm */
    pointer-events: stroke; /* clicks register on the line itself */
}
.ufc-cov .ufc-cov-route:hover { opacity: 0.55; stroke-width: 3; }

/* When a route is active, dim all others further; brighten only the active one */
.ufc-cov.has-active-route .ufc-cov-route { opacity: 0.08; stroke-width: 1.5; }
.ufc-cov.has-active-route .ufc-cov-route.is-active {
    opacity: 1;
    stroke-width: 3.5;
    stroke-dasharray: 0;
}

/* ----- CITY PINS: fade non-endpoint pins when a route is active ----- */
.ufc-cov .ufc-cov-city { transition: opacity 160ms ease; cursor: default; }
.ufc-cov .ufc-cov-city .ufc-cov-city-dot  { transition: r 160ms ease; }
.ufc-cov .ufc-cov-city .ufc-cov-city-halo { transition: r 160ms ease, opacity 160ms ease; }

.ufc-cov.has-active-route .ufc-cov-city.is-dim { opacity: 0.18; }
.ufc-cov.has-active-route .ufc-cov-city.is-active .ufc-cov-city-halo {
    r: 18; opacity: 0.35;
}
.ufc-cov.has-active-route .ufc-cov-city.is-active .ufc-cov-city-dot { r: 8; }

/* ============================================================
   ROUTES LIST (right card)
   ============================================================ */
.ufc-cov .ufc-cov-routes-card {
    background: var(--ufc-bg-alt);
    border: 1px solid var(--ufc-line);
    border-radius: 20px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    min-height: 340px;
}

.ufc-cov .ufc-cov-routes-tag {
    font-family: var(--ufc-font-mono);
    font-size: 12px;
    letter-spacing: 0.12em;
    color: var(--ufc-ink-500);
    margin-bottom: 14px;
    font-weight: 600;
}

/* ----- SEARCH INPUT ----- */
.ufc-cov .ufc-cov-search {
    position: relative;
    margin-bottom: 12px;
}
.ufc-cov .ufc-cov-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ufc-ink-500);
    pointer-events: none;
}
.ufc-cov .ufc-cov-search-input,
.ufc-cov input.ufc-cov-search-input {
    appearance: none !important;
    -webkit-appearance: none !important;
    width: 100% !important;
    background: #fff !important;
    background-color: #fff !important;
    border: 1px solid var(--ufc-line) !important;
    border-radius: 999px !important;
    padding: 10px 36px 10px 34px !important;
    margin: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    font-family: var(--ufc-font-sans) !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: var(--ufc-navy-700) !important;
    line-height: 1.3 !important;
    box-shadow: none !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    transition: border-color 140ms ease, box-shadow 140ms ease !important;
}
.ufc-cov .ufc-cov-search-input:focus,
.ufc-cov input.ufc-cov-search-input:focus {
    outline: 0 !important;
    border-color: var(--ufc-orange) !important;
    box-shadow: 0 0 0 3px rgba(212, 146, 42, 0.18) !important;
}
.ufc-cov .ufc-cov-search-input::placeholder {
    color: #9aa5b1;
    opacity: 1;
}
/* hide native browser X (Edge/IE) */
.ufc-cov .ufc-cov-search-input::-ms-clear,
.ufc-cov .ufc-cov-search-input::-webkit-search-cancel-button { display: none; }

.ufc-cov .ufc-cov-search-clear,
.ufc-cov button.ufc-cov-search-clear {
    appearance: none !important;
    -webkit-appearance: none !important;
    position: absolute !important;
    right: 8px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 22px !important;
    height: 22px !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
    border: 0 !important;
    border-radius: 999px !important;
    color: var(--ufc-ink-500) !important;
    font-size: 18px !important;
    line-height: 1 !important;
    cursor: pointer !important;
    box-shadow: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}
.ufc-cov .ufc-cov-search-clear:hover {
    background: rgba(27,58,92,0.08) !important;
    color: var(--ufc-navy-700) !important;
}

.ufc-cov .ufc-cov-search-empty {
    color: var(--ufc-ink-500);
    font-size: 13px;
    font-style: italic;
    text-align: center;
    padding: 16px 0;
    margin: 0;
}

.ufc-cov .ufc-cov-routes-list {
    list-style: none !important;
    margin: 0 0 14px 0 !important;
    padding: 0 !important;
    max-height: 420px;
    overflow-y: auto;
    /* subtle scroll fade */
    mask-image: linear-gradient(to bottom, #000 0, #000 calc(100% - 24px), transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 calc(100% - 24px), transparent 100%);
}
.ufc-cov .ufc-cov-routes-list li {
    list-style: none !important;
    margin: 0 0 6px 0 !important;
    padding: 0 !important;
}

/* Route item — armored button (defeats theme button:not(.btn) override) */
.ufc-cov .ufc-cov-route-item,
.ufc-cov button.ufc-cov-route-item {
    appearance: none !important; -webkit-appearance: none !important;
    width: 100% !important;
    text-align: left !important;
    background: #fff !important;
    background-image: none !important;
    background-color: #fff !important;
    border: 1px solid var(--ufc-line) !important;
    border-radius: 10px !important;
    padding: 11px 14px !important;
    margin: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    line-height: 1.35 !important;
    font-family: var(--ufc-font-sans) !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    color: var(--ufc-navy-700) !important;
    cursor: pointer !important;
    box-shadow: none !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease, transform 140ms ease !important;
}
.ufc-cov .ufc-cov-route-item:hover,
.ufc-cov button.ufc-cov-route-item:hover {
    border-color: var(--ufc-orange) !important;
    color: var(--ufc-orange-dark) !important;
    background: #fff !important;
    transform: translateY(-1px) !important;
}
.ufc-cov .ufc-cov-route-item.is-active,
.ufc-cov button.ufc-cov-route-item.is-active {
    background: var(--ufc-orange) !important;
    background-color: var(--ufc-orange) !important;
    border-color: var(--ufc-orange) !important;
    color: #fff !important;
    transform: none !important;
}
.ufc-cov .ufc-cov-route-item .ufc-cov-route-from,
.ufc-cov .ufc-cov-route-item .ufc-cov-route-to {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ufc-cov .ufc-cov-route-item .ufc-cov-route-arrow {
    flex: none;
    opacity: 0.6;
    transition: transform 140ms ease, opacity 140ms ease;
}
.ufc-cov .ufc-cov-route-item:hover .ufc-cov-route-arrow {
    opacity: 1;
    transform: translateX(2px);
}
.ufc-cov .ufc-cov-route-item.is-active .ufc-cov-route-arrow {
    opacity: 1;
}

.ufc-cov .ufc-cov-routes-empty {
    color: var(--ufc-ink-500);
    font-style: italic;
    padding: 20px 0;
    text-align: center;
}

.ufc-cov .ufc-cov-routes-hint {
    margin-top: auto;
    padding: 12px 14px;
    background: var(--ufc-navy-050);
    border-radius: 10px;
    font-size: 12.5px;
    color: var(--ufc-ink-500);
    line-height: 1.5;
}
.ufc-cov .ufc-cov-routes-hint strong {
    color: var(--ufc-navy-700);
    font-weight: 700;
}

/* Scrollbar styling */
.ufc-cov .ufc-cov-routes-list::-webkit-scrollbar { width: 6px; }
.ufc-cov .ufc-cov-routes-list::-webkit-scrollbar-track { background: transparent; }
.ufc-cov .ufc-cov-routes-list::-webkit-scrollbar-thumb {
    background: rgba(27,58,92,0.18);
    border-radius: 3px;
}
.ufc-cov .ufc-cov-routes-list::-webkit-scrollbar-thumb:hover {
    background: rgba(27,58,92,0.32);
}

/* ============================================================
   ACTIVE STATES — collapse/expand below map
   ============================================================ */
.ufc-cov .ufc-cov-states-details {
    margin-top: 28px;
    background: var(--ufc-bg-alt);
    border: 1px solid var(--ufc-line);
    border-radius: 14px;
    overflow: hidden;
}
.ufc-cov .ufc-cov-states-summary {
    appearance: none;
    -webkit-appearance: none;
    list-style: none;
    cursor: pointer;
    padding: 16px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-family: var(--ufc-font-mono);
    font-size: 12px;
    letter-spacing: 0.12em;
    color: var(--ufc-ink-500);
    font-weight: 600;
    user-select: none;
}
.ufc-cov .ufc-cov-states-summary::-webkit-details-marker { display: none; }
.ufc-cov .ufc-cov-states-summary::marker { content: ""; }
.ufc-cov .ufc-cov-states-summary:hover { background: rgba(27,58,92,0.04); }
.ufc-cov .ufc-cov-states-chevron {
    transition: transform 200ms ease;
    color: var(--ufc-ink-500);
}
.ufc-cov .ufc-cov-states-details[open] .ufc-cov-states-chevron {
    transform: rotate(180deg);
}
.ufc-cov .ufc-cov-states-body {
    padding: 0 22px 22px;
}
.ufc-cov .ufc-cov-states-grid {
    display: flex; flex-wrap: wrap; gap: 6px;
}
.ufc-cov .ufc-cov-state-chip {
    font-family: var(--ufc-font-mono) !important;
    font-size: 12px !important; font-weight: 600 !important;
    background: #fff !important; border: 1px solid var(--ufc-line) !important;
    padding: 6px 10px !important; border-radius: 6px !important;
    color: var(--ufc-navy-700) !important; letter-spacing: 0.02em;
    line-height: 1.2 !important; display: inline-block;
}

/* ----- RESPONSIVE ----- */
@media (max-width: 960px) {
    .ufc-cov { padding: 64px 0; }
    .ufc-cov .ufc-cov-grid { grid-template-columns: 1fr; gap: 24px; }
    .ufc-cov .ufc-cov-map-card {
        aspect-ratio: 4 / 3;
        min-height: 0;     /* don't force width via min-height conflict */
    }
    .ufc-cov .ufc-cov-routes-card { min-height: 0; }
    .ufc-cov .ufc-cov-routes-list { max-height: 320px; }
}
@media (max-width: 640px) {
    .ufc-cov { padding: 48px 0; }
    /* Match typical site/Elementor mobile padding (20px sides) */
    .ufc-cov .ufc-cov-container { padding: 0 20px; }
    .ufc-cov .ufc-cov-lead { margin-bottom: 24px; }
    .ufc-cov .ufc-cov-routes-card { padding: 18px; }
    .ufc-cov .ufc-cov-route-item,
    .ufc-cov button.ufc-cov-route-item {
        font-size: 12.5px !important;
        padding: 10px 12px !important;
    }
    .ufc-cov .ufc-cov-state-chip { font-size: 11px !important; padding: 5px 8px !important; }

    /* Mobile map: 4/3 aspect, NO min-height (so card never forces wider than viewport) */
    .ufc-cov .ufc-cov-map-card {
        aspect-ratio: 4 / 3;
        min-height: 0;
        width: 100%;
        max-width: 100%;
    }

    .ufc-cov .ufc-cov-states-summary { padding: 14px 18px; }
    .ufc-cov .ufc-cov-states-body { padding: 0 18px 18px; }
}
