/* Network Directory Map Block Styles */

.network-directory .network-directory-header {
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 15px;
    text-align: center;
}

.network-directory .network-directory-header h1 {
    font-size: 1.75rem;
    margin-bottom: 30px;
}

.network-directory .network-directory-header p {
    margin: 0 auto;
    width: 75%;
}

.network-directory select#country-dropdown {
    width: 100%;
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    height: 45px;
    color: #374151;
    font-weight: 700;
}

.network-directory #network-directory-map {
    display: grid;
    grid-template-columns: 100%;
    gap: 24px;
    margin-bottom: 80px;
    background: white;
    padding: 0px;
    border-radius: 15px;
    overflow: hidden;
}

/* Sidebar: Providers / Regions tabs + row list. Padded shell so the tab toggle
   and results card sit inset from the sidebar's own edges (matches the 8px
   margin in the Figma "Filters" frame around its children). */
.network-directory #network-directory-map .network-sidebar {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
    box-sizing: border-box;
}

.network-directory #network-directory-map .network-sidebar-tabs {
    display: flex;
    gap: 4px;
    background: #ffffff;
    border: 1px solid #eceff4;
    border-radius: 12px;
    padding: 4px;
}

.network-directory #network-directory-map .network-sidebar-tab {
    flex: 1 1 0;
    background: none;
    border: none;
    border-radius: 8px;
    padding: 16px;
    font-weight: 500;
    font-size: 16px;
    color: #415080;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
}

.network-directory #network-directory-map .network-sidebar-tab.is-active {
    background: #4568f3;
    color: #ffffff;
}

.network-directory #network-directory-map .network-results-panel {
    background: #ffffff;
    border: 1px solid #eceff4;
    border-radius: 12px;
    /* Mobile fallback cap; on desktop this is overridden to flex/fill the
       sidebar shell so it always reaches the map's actual bottom edge
       (see the flex:1 override below the 996px breakpoint). */
    max-height: 500px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #eceff4 transparent;
}

.network-directory #network-directory-map .network-results-panel::-webkit-scrollbar {
    width: 4px;
}

.network-directory #network-directory-map .network-results-panel::-webkit-scrollbar-thumb {
    background: #eceff4;
    border-radius: 20px;
}

.network-directory #network-directory-map .network-row-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 4px;
}

.network-directory #network-directory-map .network-row-list[hidden] {
    display: none;
}

.network-directory #network-directory-map .network-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    border-radius: 12px;
    transition: background-color 0.2s ease-in-out;
}

.network-directory #network-directory-map .network-row:hover {
    background-color: #f7f8fc;
}

.network-directory #network-directory-map .network-row__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: 100%;
}

.network-directory #network-directory-map .network-row__identity {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.network-directory #network-directory-map .network-row__title {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    color: #212647;
}

.network-directory #network-directory-map .network-row__arrow {
    flex-shrink: 0;
    transition: transform 0.2s ease-in-out;
}

.network-directory #network-directory-map .network-row__identity:hover .network-row__arrow {
    transform: translateX(2px);
}

.network-directory #network-directory-map .network-row__desc {
    margin: 0;
    font-size: 14px;
    line-height: 1.35;
    color: #415080;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.network-directory #network-directory-map .network-row__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid #eceff4;
    overflow: hidden;
}

/* Scoped to the Providers tab's row list only - .network-row__logo is
 * reused unpadded for the smaller 20px flag variant (.network-row__flag)
 * in the Regions tab's country drilldown, which shouldn't shrink further. */
.network-directory #network-directory-map .network-row-list .network-row__logo {
    padding: 6px;
}

.network-directory #network-directory-map .network-row__logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.network-directory #network-directory-map .network-row__logo.network-row__flag {
    width: 20px;
    height: 20px;
    border: none;
    background: transparent;
    border-radius: 50%;
}

.network-directory #network-directory-map .network-row__flag img {
    object-fit: cover;
    border-radius: 50%;
}

.network-directory #network-directory-map .network-row__logo-fallback {
    font-size: 16px;
    font-weight: 600;
    color: #415080;
    text-transform: uppercase;
}

.network-directory #network-directory-map .network-row__name {
    font-size: 16px;
    font-weight: 600;
    color: #212647;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.network-directory #network-directory-map .network-country-option .network-row__name {
    font-weight: 400;
}

.network-directory #network-directory-map .network-row__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    font-size: 14px;
    font-weight: 600;
    color: #415080;
    background: transparent;
    border: 1px solid #eceff4;
    border-radius: 20px;
    margin-left: auto;
    box-sizing: border-box;
}

/* Status chip shown instead of the map-visibility toggle for providers that
 * aren't live yet (e.g. "Coming soon") - see network-row__identity's static
 * (non-link) variant in render.php. */
.network-directory #network-directory-map .network-row__status-chip {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    padding: 8px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    color: #415080;
    background: #eceff4;
    border-radius: 12px;
    white-space: nowrap;
}

/* Regions tab: region accordion */
.network-directory #network-directory-map .network-regions-panel[hidden] {
    display: none;
}

.network-directory #network-directory-map .network-region-accordion {
    list-style: none;
    margin: 0;
    padding: 4px;
}

.network-directory #network-directory-map .network-region-group {
    border-bottom: 1px solid #eceff4;
}

.network-directory #network-directory-map .network-region-group:last-child {
    border-bottom: none;
}

.network-directory #network-directory-map .network-region-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    padding: 8px 12px;
    background: none;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    text-align: left;
    transition: padding 0.2s ease-in-out;
}

.network-directory #network-directory-map .network-region-header[aria-expanded="true"] {
    padding: 12px 12px 16px;
}

.network-directory #network-directory-map .network-region-header__content {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.network-directory #network-directory-map .network-region-header__name {
    font-size: 16px;
    font-weight: 600;
    color: #415080;
}

.network-directory #network-directory-map .network-region-header[aria-expanded="true"] .network-region-header__name {
    color: #212647;
}

.network-directory #network-directory-map .network-region-chevron {
    flex-shrink: 0;
    color: #415080;
    transition: transform 0.15s ease-in-out;
}

.network-directory #network-directory-map .network-region-header[aria-expanded="true"] .network-region-chevron {
    transform: rotate(180deg);
    color: #212647;
}

.network-directory #network-directory-map .network-country-options-collapse {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.25s ease-in-out;
}

.network-directory #network-directory-map .network-country-options-collapse.is-open {
    grid-template-rows: 1fr;
}

.network-directory #network-directory-map .network-country-options {
    list-style: none;
    margin: 0;
    padding: 0 0 4px;
    overflow: hidden;
    min-height: 0;
}

.network-directory #network-directory-map .network-country-option {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 12px;
    background: none;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.15s ease-in-out;
}

.network-directory #network-directory-map .network-country-option:hover {
    background-color: #eceff4;
}

/* Regions tab: country drill-down */
.network-directory #network-directory-map .network-country-drilldown[hidden] {
    display: none;
}

.network-directory #network-directory-map .network-country-drilldown__header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    border-bottom: 1px solid #eceff4;
}

.network-directory #network-directory-map .network-country-drilldown__back {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    padding: 0;
    background: none;
    border: none;
    color: #415080;
    cursor: pointer;
}

.network-directory #network-directory-map .network-country-drilldown__name {
    flex: 1 1 auto;
    font-size: 16px;
    font-weight: 600;
    color: #212647;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.network-directory #network-directory-map .network-country-drilldown__providers {
    list-style: none;
    margin: 0;
    padding: 4px;
}

.network-directory #network-directory-map .network-country-drilldown__provider {
    display: block;
    width: 100%;
    padding: 12px;
    background: none;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    text-align: left;
}

.network-directory #network-directory-map .network-country-drilldown__provider:hover {
    background-color: #eceff4;
}

.network-directory #network-directory-map .network-country-drilldown__provider-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.network-directory #network-directory-map .network-country-drilldown__provider-title {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1 1 auto;
    font-size: 16px;
    color: #212647;
    min-width: 0;
}

.network-directory #network-directory-map .network-country-drilldown__provider-title span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.network-directory #network-directory-map .network-country-drilldown__provider-desc {
    margin: 8px 0 0;
    padding-left: 56px;
    font-size: 14px;
    line-height: 1.35;
    color: #415080;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Toggle switch */
.network-directory .toggle-switch {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
    width: 36px;
    height: 20px;
    cursor: pointer;
}

.network-directory .toggle-switch__input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.network-directory .toggle-switch__track {
    position: absolute;
    inset: 0;
    background: #eceff4;
    border-radius: 20px;
    transition: background 0.15s ease-in-out;
}

.network-directory .toggle-switch__thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 1px 2px rgba(33, 38, 71, 0.2);
    transition: transform 0.15s ease-in-out;
}

.network-directory .toggle-switch__input:checked + .toggle-switch__track {
    background: #4568f3;
}

.network-directory .toggle-switch__input:checked + .toggle-switch__track .toggle-switch__thumb {
    transform: translateX(16px);
}

.network-directory .network-no-results {
    padding: 24px;
    text-align: center;
    color: #8F95A1;
    font-size: 14px;
    list-style: none;
}

.network-directory #network-directory-map #network-map {
    width: 100%;
    height: auto;
    margin: 0 auto;
    overflow: visible;
    /* Visible at every width now — the mobile block below and the desktop
       block further down both use the same overlay-on-map pattern (just with
       different sizing/positioning), so there's no width left where the map
       should be hidden. */
    opacity: 1;
    visibility: visible;
    position: relative !important;
}

/* Direct-child selector: this must only style the D3 map's own top-level
   <svg> (an immediate child of #network-map). A descendant selector here
   also matches the small 20x20 icon <svg>s nested inside the zoom buttons
   several levels down, stretching them to fill the 48px button and painting
   them with the map's background color — hiding the button's own white
   background almost entirely (only the rounded corners the icon's square
   box doesn't reach still show it). */
.network-directory #network-directory-map #network-map > svg {
    width: 100%;
    height: auto;
    display: block;
    background-color: #E8EBFF;
}

.network-directory #network-directory-map #network-map .network-map-pin-ring {
    filter: drop-shadow(0 2px 4px rgba(33, 38, 71, 0.15));
}

/* Loading overlay: brief reassurance feedback while a filter/toggle change
   recomputes which pins are active — shown in view.js for the duration of the
   pin enter/exit animations, not tied to any real async delay (filtering is
   instant; there's no network request to actually wait on). Appearing has no
   transition (picked up by the .is-visible override below) so it registers the
   instant a filter/toggle is hit rather than fading in unnoticed; disappearing
   still fades out smoothly since that base transition applies once .is-visible
   is removed. */
.network-directory #network-directory-map #network-map .network-map-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease-in-out;
    z-index: 20;
}

.network-directory #network-directory-map #network-map .network-map-loading.is-visible {
    opacity: 1;
    transition: none;
}

.network-directory #network-directory-map #network-map .network-map-loading-spinner {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 3px solid #C4CCFE;
    border-top-color: #4568f3;
    animation: network-map-spin 0.7s linear infinite;
}

@keyframes network-map-spin {
    to { transform: rotate(360deg); }
}

/* Zoom control cluster: top-right on desktop (below), bottom-right stacked
   above the search bar on mobile (see the max-width:768px block). Positioning
   lives here rather than in JS inline styles so each breakpoint's layout is
   defined in one place instead of split across CSS and JS. */
.network-directory #network-directory-map #network-map .network-map-zoom-controls {
    position: absolute;
    display: grid;
    gap: 4px;
    z-index: 10;
    top: 8px;
    right: 8px;
}

.network-directory #network-directory-map #network-map .zoom-btn {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    box-sizing: border-box;
    background: #ffffff;
    color: #585C75;
    border-radius: 12px;
    transition: background-color 0.15s ease-in-out, transform 0.1s ease-in-out;
    border: 1px solid #eceff4;
    box-shadow: 0px 4px 12px 0px rgba(33, 38, 71, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    font: inherit;
    line-height: 1;
    cursor: pointer;
}

.network-directory #network-directory-map #network-map .zoom-btn svg {
    flex-shrink: 0;
    pointer-events: none;
}

.network-directory #network-directory-map #network-map .zoom-btn:hover {
    background-color: #eceff4;
}

.network-directory #network-directory-map #network-map .zoom-btn:active {
    transform: scale(0.94);
}

.network-directory h2:not(.network-col-heading) {
    font-size: 1.5rem !important;
    max-width: unset !important;
}

.network-directory h2:not(.network-col-heading) + p {
    margin-bottom: 4rem;
    max-width: unset !important;
}

.network-directory h2:not(.network-col-heading) + p.has-text-align-center {
    text-align: center;
}

.network-directory .fireblocks-faq-block {
    max-width: unset !important;
}

.network-directory .network-whats-possible-cards {
    margin-top: 2rem;
    margin-bottom: 4rem;
}

.network-directory .network-whats-possible-cards .network-whats-possible-card {
    border-radius: 15px;
    position: relative;
    background: white;
    box-shadow: 0 10px 40px 0 rgba(16, 27, 48, 0.20);
}

.network-directory .network-whats-possible-cards .network-whats-possible-card .wp-block-image {
    margin-top: 0;
    margin-bottom: 20px;
}

.network-directory .network-whats-possible-cards .network-whats-possible-card .wp-block-image img {
    border-radius: 15px 15px 0px 0px;
    margin-bottom: 0;
}

.network-directory .network-whats-possible-cards .network-whats-possible-card .card-content {
    padding: 0 20px;
    position: relative;
    transform: translate3d(0, 0, 0);
    transition: transform 0.25s ease;
    z-index: 1;
    background: white;
    min-height: 125px;
    border-radius: 0 0 16px 16px;
}

.network-directory .network-whats-possible-cards .network-whats-possible-card .card-content p {
    color: #878E9B;
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
    line-height: 160%;
    letter-spacing: 0.96px;
    text-transform: uppercase;
}

.network-directory .network-whats-possible-cards .network-whats-possible-card .card-content h4 {
    overflow: hidden;
    color: #4C77E2;
    font-size: 16px;
    font-style: normal;
    font-weight: 600;
    line-height: 160%;
    margin-top: 17px;
}

.network-directory .network-whats-possible-cards .network-whats-possible-card .card-content h4 + figure {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    transition: all 0.2s ease-in-out;
    margin-bottom: 0;
}

.network-directory .network-whats-possible-cards .network-whats-possible-card .card-content h4 + figure img {
    box-shadow: none;
    object-fit: contain;
    width: 32px;
    height: auto;
    border-radius: 0;
}

.network-directory .network-whats-possible-cards .network-whats-possible-card .card-wrapper-link:hover .card-content {
    transform: translate3d(0, -72px, 0);
    padding-top: 20px;
    margin-bottom: -52px;
}

.network-directory .network-whats-possible-cards .network-whats-possible-card .card-wrapper-link:hover .card-content h4 + figure {
    opacity: 1;
    visibility: visible;
    position: static;
    transition: all 0.2s ease-in-out;
}

/* Filter Bar */
.network-directory .network-filters-bar {
    background: transparent;
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.network-directory .network-filter-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    /* flex-basis is direction-relative: 160px is meant as a *width* for when
       .network-filters-bar switches to flex-direction:row at desktop (below).
       Left as the base/stacked value, flex-direction:column reinterprets it
       as a height instead, ballooning each field to 160px tall regardless of
       its real ~76px content height. */
    flex: 1 1 auto;
}

.network-directory .network-filter-field label:not(.screen-reader-text) {
    font-size: 14px;
    font-weight: 600;
    color: #212647;
}

.network-directory .network-filter-select {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 48px;
    background: #fff;
    border: 1px solid #eceff4;
    border-radius: 12px;
    box-sizing: border-box;
    transition: border-color 0.15s ease-in-out;
}

.network-directory .network-filter-select:hover {
    border-color: #c7ccdb;
}

.network-directory .network-filter-select select {
    width: 100%;
    height: 48px;
    padding: 8px 40px 8px 16px;
    background: transparent;
    border: none;
    color: rgba(65, 80, 128, 0.78);
    font-size: 16px;
    font-weight: 500;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
}

.network-directory .network-filter-select select:focus-visible {
    outline: none;
}

.network-directory .network-filter-select:focus-within {
    border-color: #4568f3;
    box-shadow: 0 0 0 3px rgba(69, 104, 243, 0.12);
}

.network-directory .network-filter-select__chevron {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #415080;
    pointer-events: none;
}

/* Floating search: normal flow on mobile, overlays the map on desktop (see media query) */
.network-directory #network-directory-map .network-search-float {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 4px;
}

.network-directory #network-directory-map .network-search-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    max-width: 410px;
    padding: 16px 12px;
    background: #ffffff;
    border: 1px solid #eceff4;
    border-radius: 12px;
    box-shadow: 0px 4px 24px 0px rgba(33, 38, 71, 0.05);
    box-sizing: border-box;
    transition: box-shadow 0.15s ease-in-out, border-color 0.15s ease-in-out;
}

.network-directory #network-directory-map .network-search-card:focus-within {
    border-color: #4568f3;
    box-shadow: 0 0 0 3px rgba(69, 104, 243, 0.12);
}

.network-directory #network-directory-map .network-search-input {
    flex: 1 1 auto;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    font-size: 16px;
    color: #212647;
}

.network-directory #network-directory-map .network-search-input::placeholder {
    color: #7281aa;
}

.network-directory #network-directory-map .network-search-icon {
    flex-shrink: 0;
    color: #7281aa;
}

/* Desktop Styles - 996px and up */
@media only screen and (min-width: 996px) {
    .network-directory .network-directory-header {
        padding: 60px 45px;
    }

    .network-directory .network-directory-header h1 {
        font-size: calc(42rem / 16);
    }

    .network-directory .network-filters-bar {
        flex-direction: row;
        align-items: flex-start;
        padding: 0;
    }

    .network-directory .network-filter-field {
        flex: 1 1 160px;
    }

    .network-directory #network-directory-map {
        position: relative;
        grid-template-columns: 100%;
        gap: 0;
        padding: 0;
    }

    /* The map spans the full width as a background layer; the sidebar floats on
       top of its left edge, matching the Figma layout (Map and Filters are
       overlapping siblings, not side-by-side grid columns). Pinning both top
       and bottom (instead of a fixed height) stretches the sidebar to always
       match the map's actual rendered height, however tall that ends up being. */
    .network-directory #network-directory-map .network-sidebar {
        position: absolute;
        top: 0px;
        bottom: 0px;
        left: 0px;
        z-index: 2;
        width: 318px;
    }

    .network-directory #network-directory-map .network-results-panel {
        flex: 1 1 auto;
        min-height: 0;
        max-height: none;
    }

    /* Search floats centered over the map, between the sidebar's right edge and
       the zoom controls, matching the Figma layout. Offsets are measured from
       #network-directory-map's outer edge (its containing block for absolute
       children), so each one adds back the 45px/60px outer padding that the
       sidebar's own left/top/bottom offsets already account for:
       left = 45 (outer pad) + 318 (sidebar width); right = 45 (outer pad) + 64
       (zoom column width); bottom = 60 (outer pad) + 40 (gap above the map's
       true bottom edge). */
    .network-directory #network-directory-map .network-search-float {
        position: absolute;
        left: 395px;
        right: 109px;
        bottom: 40px;
        /* Reset the mobile-default width:100% — with left+right also set this
           would over-constrain the box and the browser silently ignores
           `right`, letting the flex-centered card drift off to the wrong x. */
        width: auto;
        z-index: 5;
        margin-top: 0;
        pointer-events: none;
    }

    .network-directory #network-directory-map .network-search-card {
        pointer-events: auto;
    }

    .network-directory h2:not(.network-col-heading) {
        font-size: 2rem !important;
    }

    .network-directory .fireblocks-faq-block {
        margin-bottom: 4rem;
    }

    .network-directory h2:not(.network-col-heading),
    .network-directory h2 + p,
    .network-directory .fireblocks-faq-block {
        max-width: 80% !important;
    }
}

/* Mobile/tablet styles - everything below the 996px desktop breakpoint.
   Mirrors the desktop overlay pattern (results card + zoom controls + search
   floating over a visible map) but restacked for a narrow screen: the
   results card spans the full width at a fixed height instead of stretching
   to the map's height (there's no room beside the map to put a tall
   sidebar), the zoom controls move to the bottom-right stacked above the
   search bar, and the search bar spans full width at the bottom instead of
   floating as a centered card between two side columns. This applies all the
   way up to 995px (not just phone widths) so there's no dead zone with the
   map hidden — a phone-tuned layout stretched a bit wide beats no map at all.
   Offsets that are relative to #network-directory-map (sidebar, search-float)
   add its 20px base padding (see the base rule above) to the 8px inset Figma
   uses within the map shell itself, i.e. 20 + 8 = 28px — same reasoning as
   the desktop block's 45/60px outer-padding offsets above. Offsets relative
   to #network-map (zoom controls) don't need that addition, since #network-map
   already starts at the content edge. */
@media (max-width: 995px) {
    .network-directory .network-filters-bar {
        gap: 24px;
    }

    .network-directory #network-directory-map {
        position: relative;
        border-radius: 20px;
        overflow: hidden;
    }

    .network-directory #network-directory-map .network-sidebar {
        position: absolute;
        top: 0px;
        left: 0px;
        right: 0px;
        z-index: 2;
        width: auto;
    }

    .network-directory #network-directory-map .network-results-panel {
        max-height: 360px;
    }

    .network-directory #network-directory-map #network-map .network-map-zoom-controls {
        top: auto;
        right: 8px;
        bottom: 72px;
    }

    .network-directory #network-directory-map .network-search-float {
        position: absolute;
        left: 8px;
        right: 8px;
        bottom: 8px;
        width: auto;
        z-index: 5;
        margin-top: 0;
        pointer-events: none;
    }

    .network-directory #network-directory-map .network-search-card {
        max-width: none;
    }
}

/* Motion: content fade-in used when a panel/list swaps content (tab switch,
   region drill-down open/close) so the new content settles in instead of
   popping in instantly. Toggled via JS by briefly adding/removing the class. */
.network-directory #network-directory-map .is-panel-entering {
    animation: network-panel-fade-in 0.2s ease-out;
}

@keyframes network-panel-fade-in {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .network-directory #network-directory-map * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}