/* Explore page — horizontal filter bar. Active on body.xp-explore (desktop only). */

/* A11y: the reset-filters link inherits the accent color at 0.7 alpha
   (rgba(1,71,131,0.7)), failing WCAG AA contrast on white. Force a solid,
   full-opacity color globally (not all explore pages carry the xp-explore
   body class). High specificity + !important to beat theme/customizer CSS. */
a.reset-results-27,
a.reset-results-27.full-width,
a.reset-results-27:hover,
a.reset-results-27:focus {
    color: #014783 !important;
    opacity: 1 !important;
}
a.reset-results-27 i {
    color: #014783 !important;
}

/* Force the search button text/icon white on all viewports (map page) */
body.page-slug-explore-craftperson-map a.buttons.button-2.full-width.c27-explore-search-button,
body.page-slug-explore-craftperson-map a.buttons.button-2.full-width.c27-explore-search-button i {
    color: #fff !important;
}

/* A11y: the search button text inherits a light blue (#026dc9) on the dark blue
   accent background (#014783), failing WCAG AA contrast. Force white text/icon
   globally (not all explore pages carry the map-page body class). */
a.c27-explore-search-button,
a.c27-explore-search-button i,
a.c27-explore-search-button:hover,
a.c27-explore-search-button:focus {
    color: #fff !important;
    opacity: 1 !important;
}

/* Map page initial loading cover — hides the first-type → all-types swap.
   Matches MyListing's own v-cloak loader (animated white background). */
#xp-map-loading-cover {
    position: absolute;
    inset: 0;
    z-index: 600;
    background: #fff;
    animation: vcloak-background-animation .8s infinite;
}

/* Hide mobile nav on all explore/map pages */
body.xp-explore .explore-mobile-nav,
body.xp-explore .mobile-explore-nav,
#c27-explore-listings .explore-mobile-nav {
    display: none !important;
}

@media only screen and (min-width: 1025px) {

    /* Hide the original filter source (template) */
    body.xp-explore .xp-filters-source,
    body.xp-explore .xp-flhead-source {
        display: none !important;
    }

    /* Show filters in shortcode target */
    body.xp-explore .xp-filters-target .finder-container.fc-type-2,
    body.xp-explore .xp-filters-target > .finder-search {
        display: block !important;
    }

    /* Force sidebar into inline flow */
    body.xp-explore .finder-container.fc-type-2,
    body.xp-explore .xp-filters-target {
        position: relative !important;
        height: auto !important;
        opacity: 1 !important;
        visibility: visible !important;
        top: 0 !important;
        z-index: 50 !important;
    }

    body.xp-explore .fc-type-2 .finder-search,
    body.xp-explore .xp-filters-target > .finder-search {
        position: relative !important;
        left: 0 !important;
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        float: none !important;
        display: block !important;
        background: transparent !important;
        padding: 0 !important;
        box-shadow: none !important;
    }

    body.xp-explore .fc-type-2 .finder-overlay,
    body.xp-explore .no-map-tmpl .mobile-explore-head-top,
    body.xp-explore .finder-tabs .sidebar-tabs,
    body.xp-explore .form-group.fc-search {
        display: none !important;
    }

    /* Center wrapper */
    body.xp-explore #finderSearch .finder-tabs-wrapper {
        max-width: 1400px;
        margin: 0 auto !important;
        padding: 24px 15px 0;
    }

    body.xp-explore .finder-tabs.without-listing-types,
    body.xp-explore .finder-tabs {
        padding: 0 !important;
    }

    /* Force tab content and search tab visible (single-type pages only).
       On multi-type pages (explore-all, explore-craftperson-map) let Vue's
       v-show handle visibility so only the active listing type's filters show. */
    body.xp-explore:not(.page-slug-explore-all):not(.page-slug-explore-craftperson-map) .finder-tabs .tab-content {
        display: block !important;
        margin-top: 0 !important;
    }
    body.page-slug-explore-all .finder-tabs .tab-content,
    body.page-slug-explore-craftperson-map .finder-tabs .tab-content {
        margin-top: 0 !important;
    }

    body.xp-explore:not(.page-slug-explore-all):not(.page-slug-explore-craftperson-map) .finder-tabs .search-tab {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    /* Map page: force the search form visible inside whichever tab-content
       Vue shows (v-show controls the tab-content display). */
    body.page-slug-explore-craftperson-map .finder-tabs .search-tab {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    /* Filter wrapper */
    body.xp-explore .search-filters .filter-wrapper {
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        position: relative !important;
        padding: 0 !important;
        margin: 0 !important;
        background: none !important;
        border: none !important;
        overflow: visible !important;
    }

    body.xp-explore .search-filters .filter-wrapper > .form-group {
        margin-bottom: 0 !important;
    }

    /* Label reset: overrides MyListing .md-group specificity */
    body.xp-explore .search-filters .md-group label,
    body.xp-explore .search-filters .md-group select:required:valid ~ label,
    body.xp-explore .search-filters .md-group select[multiple] ~ label,
    body.xp-explore .search-filters .md-group select[multiple] ~ .select2-container ~ label,
    body.xp-explore .search-filters .md-group select[multiple] ~ .select2-container--focus ~ label,
    body.xp-explore .search-filters .md-group input:required:valid ~ label {
        position: static !important;
        top: auto !important;
        left: auto !important;
        transform: none !important;
        animation: none !important;
        background: none !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
        pointer-events: none !important;
    }

    /* Search bar */
    body.xp-explore .finder-search .filter-wrapper > .form-group.wp-search-filter {
        flex: 1 1 0% !important;
        min-width: 200px !important;
        width: auto !important;
        order: 1 !important;
        position: relative !important;
        display: flex !important;
        align-items: center !important;
        height: 48px !important;
        padding: 0 20px 0 48px !important;
        margin: 0 0 12px 0 !important;
        background: #f0f1f3 !important;
        border: 1px solid var(--listing-color-border-input) !important;
        border-radius: var(--listing-radius) !important;
    }

    body.xp-explore .filter-wrapper > .wp-search-filter::before {
        content: "search";
        font-family: "Material Icons";
        font-feature-settings: "liga";
        font-size: 22px;
        color: var(--listing-color-primary);
        position: absolute;
        left: 16px;
        top: 50%;
        transform: translateY(-50%);
    }

    body.xp-explore .filter-wrapper > .wp-search-filter input {
        width: 100% !important;
        height: 100% !important;
        border: none !important;
        background: transparent !important;
        box-shadow: none !important;
        font-size: 15px !important;
        color: #012545 !important;
        padding: 0 !important;
    }

    body.xp-explore .filter-wrapper > .wp-search-filter.md-group label {
        position: absolute !important;
        left: 48px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        font-size: 15px !important;
        font-weight: 400 !important;
        color: #012545 !important;
    }

    body.xp-explore .wp-search-filter.md-group input:required:valid ~ label {
        display: none !important;
    }

    /* Taxonomy dropdown pills (pushed right) */
    body.xp-explore .finder-search .filter-wrapper > .form-group.dropdown-filter {
        flex: 0 0 auto !important;
        width: auto !important;
        max-width: none !important;
        float: none !important;
        order: 2 !important;
        display: inline-flex !important;
        align-items: center !important;
        padding: 0 !important;
        margin: 0 0 12px 12px !important;
        background: none !important;
        border: none !important;
    }

    body.xp-explore .finder-search .form-group.dropdown-filter .main-term {
        position: relative !important;
        display: inline-flex !important;
        align-items: center !important;
        margin: 0 !important;
        width: auto !important;
    }

    body.xp-explore .finder-search .form-group.dropdown-filter .main-term > select {
        position: absolute !important;
        width: 1px !important;
        height: 1px !important;
        opacity: 0 !important;
        overflow: hidden !important;
    }

    body.xp-explore .search-filters .filter-wrapper > .dropdown-filter.form-group.md-group label {
        position: relative !important;
        display: inline-block !important;
        height: 48px !important;
        line-height: 46px !important;
        padding: 0 36px 0 16px !important;
        font-size: 14px !important;
        font-weight: 500 !important;
        color: #012545 !important;
        white-space: nowrap !important;
        background: #fff !important;
        border: 1.5px solid var(--listing-color-border-input) !important;
        border-radius: var(--listing-radius) !important;
        pointer-events: none !important;
        cursor: pointer !important;
        z-index: 1 !important;
    }

    body.xp-explore .search-filters .filter-wrapper > .dropdown-filter.form-group.md-group label::after {
        content: "expand_more";
        font-family: "Material Icons";
        font-feature-settings: "liga";
        font-size: 20px;
        color: #012545;
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
    }

    body.xp-explore .search-filters .filter-wrapper > .dropdown-filter.form-group:hover label {
        border-color: var(--listing-color-primary) !important;
        box-shadow: 0 0 0 1px var(--listing-color-primary) !important;
    }

    /* Select2: transparent overlay for easy clicking */
    body.xp-explore .finder-search .form-group.dropdown-filter .select2-container {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100% !important;
        opacity: 0 !important;
        z-index: 2 !important;
        cursor: pointer !important;
    }

    body.xp-explore .finder-search .form-group.dropdown-filter .select2-container .selection,
    body.xp-explore .finder-search .form-group.dropdown-filter .select2-container .selection .select2-selection {
        width: 100% !important;
        height: 100% !important;
        min-height: 100% !important;
        cursor: pointer !important;
    }

    body.xp-explore .finder-search .form-group.dropdown-filter .select2-selection__rendered {
        visibility: hidden !important;
        height: 0 !important;
    }

    body.xp-explore .select2-container--open .select2-dropdown {
        min-width: 220px !important;
    }

    /* Orderby: hidden from filter bar (moved to results row via JS) */
    body.xp-explore .finder-search .filter-wrapper > .form-group.orderby-filter {
        order: 3 !important;
        flex: 0 0 auto !important;
        width: auto !important;
        float: none !important;
        display: none !important;
        padding: 0 !important;
        margin: 0 !important;
        background: none !important;
        border: none !important;
    }

    /* Results row: count | active chips | orderby */
    body.xp-explore .i-section.explore-type-2 {
        padding-top: 0 !important;
    }

    body.xp-explore .explore-type-2 .container > .fl-head,
    body.xp-explore .finder-listings > .fl-head,
    body.xp-explore .xp-flhead-target > .fl-head {
        display: flex !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
        margin-top: 0 !important;
        margin-bottom: 12px !important;
        gap: 12px !important;
        max-width: 1400px;
        margin-left: auto !important;
        margin-right: auto !important;
        padding: 0 15px !important;
    }

    body.xp-explore .explore-type-2 .fl-head .explore-desktop-head,
    body.xp-explore .xp-flhead-target .fl-head .explore-desktop-head {
        flex: 0 0 auto !important;
        display: flex !important;
        align-items: center !important;
        color: #012545 !important;
        order: 1 !important;
    }

    /* Active filter chips */
    body.xp-explore .xp-active-filters {
        flex: 1 1 auto !important;
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        gap: 8px !important;
        min-width: 0 !important;
        order: 2 !important;
    }

    body.xp-explore .fl-results-no .rslt-nr {
        font-size: 14px !important;
        font-weight: 500 !important;
        color: #012545 !important;
        white-space: nowrap !important;
    }

    body.xp-explore .explore-type-2 .fl-head .load-batch-icon,
    body.xp-explore .xp-flhead-target .fl-head .load-batch-icon {
        display: none !important;
    }

    body.xp-explore .xp-chip {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        height: 32px;
        padding: 0 10px;
        font-size: 13px;
        font-weight: 500;
        color: #fff;
        background: #014783;
        border-radius: 4px;
        white-space: nowrap;
    }

    body.xp-explore .xp-chip-remove {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 18px;
        height: 18px;
        padding: 0;
        border: none;
        background: rgba(1, 37, 69, .15);
        border-radius: 50%;
        font-size: 14px;
        line-height: 1;
        color: #fff;
        cursor: pointer;
        transition: background .15s;
    }

    body.xp-explore .xp-chip-remove:hover {
        background: rgba(1, 37, 69, .3);
    }

    /* Orderby moved into results row via JS */
    body.xp-explore .xp-orderby-inline {
        flex: 0 0 auto !important;
        display: inline-flex !important;
        align-items: center !important;
        gap: 6px !important;
        margin-left: auto !important;
        margin-bottom: 0 !important;
        padding: 0 !important;
        background: none !important;
        border: none !important;
        white-space: nowrap !important;
        width: auto !important;
        position: static !important;
        order: 3 !important;
    }

    body.xp-explore .xp-orderby-inline.md-group label {
        order: -1 !important;
        display: inline !important;
        font-size: 14px !important;
        font-weight: 500 !important;
        color: #012545 !important;
        position: static !important;
        transform: none !important;
        animation: none !important;
        background: none !important;
        border: none !important;
        padding: 0 !important;
        pointer-events: none !important;
    }

    body.xp-explore .xp-orderby-inline select {
        border: none !important;
        background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1.41.59L6 5.17 10.59.59 12 2l-6 6-6-6z' fill='%23012545'/%3E%3C/svg%3E") no-repeat right center / 10px !important;
        font-size: 14px !important;
        font-weight: 500 !important;
        color: #012545 !important;
        padding: 0 20px 0 0 !important;
        height: auto !important;
        cursor: pointer !important;
        -webkit-appearance: none !important;
        appearance: none !important;
    }

    body.xp-explore .xp-orderby-inline .select2-container {
        width: auto !important;
        min-width: 112px !important;
        position: static !important;
        opacity: 1 !important;
    }

    body.xp-explore .xp-orderby-inline .select2-selection__clear {
        display: none !important;
    }

    /* Date filter in filter row */
    body.xp-explore .xp-date-filter {
        display: inline-flex !important;
        flex: 0 0 auto !important;
        align-items: center !important;
        order: 2 !important;
        margin: 0 0 12px 12px !important;
        position: relative !important;
        overflow: visible !important;
    }

    /* Ensure parents don't clip the date dropdown */
    body.xp-explore .finder-search,
    body.xp-explore .fc-type-2,
    body.xp-explore .finder-container,
    body.xp-explore .xp-filters-target,
    body.xp-explore .search-filters,
    body.xp-explore .finder-tabs-wrapper,
    body.xp-explore .finder-tabs,
    body.xp-explore .tab-content,
    body.xp-explore .search-tab {
        overflow: visible !important;
    }

}

/* Text color */
body.xp-explore .search-filters .filter-wrapper .md-group label,
body.xp-explore .search-filters .filter-wrapper .md-group input,
body.xp-explore .search-filters .filter-wrapper .md-group select,
body.xp-explore .search-filters .filter-wrapper .md-group .select2-selection__rendered,
body.xp-explore .explore-desktop-head,
body.xp-explore .fl-results-no .rslt-nr,
body.xp-explore .select2-container .select2-results__option,
body.xp-explore a.reset-results-27 {
    color: #012545 !important;
}

/* A11y: parent theme applies opacity:.7 to the reset link, which drops the
   #012545 text contrast below WCAG AA. Force full opacity. */
body.xp-explore a.reset-results-27,
body.xp-explore a.reset-results-27:hover {
    opacity: 1 !important;
}

/* A11y: the native <select> behind each Select2 filter is hidden via opacity:0
   (in the min-width:1025px block below) AND clipped by Select2. Contrast audits
   fold that opacity into the text-color alpha (#012545 -> rgba(1,37,69,0)) and
   flag a failure on an invisible control. Restore solid color + full opacity on
   the Select2-clipped select (still invisible via clip-path), so it passes.
   Higher specificity than the opacity:0 rule, outside any media query. */
body.xp-explore .finder-search .form-group.dropdown-filter .main-term > select.select2-hidden-accessible,
body.xp-explore .form-group.dropdown-filter .main-term > select.select2-hidden-accessible {
    color: #012545 !important;
    opacity: 1 !important;
}

/* Mobile: show filters in their original source position for mobile tab toggle */
@media only screen and (max-width: 1400px) {
    body.xp-explore .xp-filters-source,
    body.xp-explore .xp-flhead-source {
        display: contents !important;
    }
    body.xp-explore .xp-filters-target,
    body.xp-explore .xp-flhead-target {
        display: none !important;
    }
}

/* Explore results container: override parent theme's default widths to 1400px */
@media (min-width: 1200px) {
    body.xp-explore .i-section.explore-type-2 > .container,
    body.xp-explore .explore-type-4 > .container,
    #c27-explore-listings .i-section.explore-type-2 > .container {
        width: 1400px !important;
        max-width: 1400px !important;
    }

    body.xp-explore .no-map-tmpl .mobile-explore-head-top {
        max-width: 1400px !important;
    }
}

/* ---- explore-craftperson-map: 25% filters | 25% list | 50% map ---- */
@media only screen and (min-width: 1200px) {

    /* Make the outer container a flex row baseline */
    body.page-slug-explore-craftperson-map .finder-container.fc-type-1 {
        display: flex !important;
        flex-direction: row !important;
        position: relative !important;
        height: 75vh !important;
        width: 100% !important;
        overflow: hidden !important;
    }

    /* fc-default holds search + listings — give it 50% */
    body.page-slug-explore-craftperson-map .finder-container.fc-type-1 .fc-default {
        position: relative !important;
        width: 50% !important;
        flex: 0 0 50% !important;
        display: flex !important;
        flex-direction: row !important;
        height: 100% !important;
        overflow: hidden !important;
    }

    /* finderSearch (filters) = 25% of total = 50% of fc-default */
    body.page-slug-explore-craftperson-map #finderSearch {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        width: 50% !important;
        flex: 0 0 50% !important;
        height: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
    }

    /* Search button text color fix for dev */
    body.page-slug-explore-craftperson-map #finderSearch .c27-explore-search-button {
        color: #fff !important;
    }

    body.page-slug-explore-craftperson-map #finderSearch .reset-results-27 {
        color: #014783 !important;
    }

    /* finderListings (cards) = 25% of total = 50% of fc-default */
    body.page-slug-explore-craftperson-map #finderListings {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        width: 50% !important;
        flex: 0 0 50% !important;
        height: 100% !important;
        min-width: 0 !important;
        overflow-y: auto !important;
    }

    /* finderMap = 50% of total */
    body.page-slug-explore-craftperson-map #finderMap {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        width: 50% !important;
        flex: 0 0 50% !important;
        height: 100% !important;
        min-height: 0 !important;
    }

    body.page-slug-explore-craftperson-map #finderMap .c27-map {
        width: 100% !important;
        height: 100% !important;
    }

    /* Compact map-card items — remove min-height imposed by parent theme */
    body.page-slug-explore-craftperson-map .lf-item-container.listing-preview {
        height: auto !important;
        min-height: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    body.page-slug-explore-craftperson-map .lf-item-container.listing-preview .lf-item.lf-item-map-card {
        height: auto !important;
        min-height: 0 !important;
    }

    /* Let isotope grid re-pack — reset the grid container overflow */
    body.page-slug-explore-craftperson-map .results-view.grid {
        overflow: visible !important;
    }
}

/* Hide prev/next page arrows from the results header on the map page */
body.page-slug-explore-craftperson-map .explore-desktop-head .load-batch-icon,
body.page-slug-explore-craftperson-map .explore-desktop-head .load-previews-batch,
body.page-slug-explore-craftperson-map .explore-desktop-head .load-next-batch {
    display: none !important;
}

/* Hide type tabs and mobile head — use dropdown instead */
body.page-slug-explore-craftperson-map .explore-head,
body.page-slug-explore-craftperson-map .mobile-explore-head-top,
body.page-slug-explore-all .explore-head,
body.page-slug-explore-all .mobile-explore-head-top {
    display: none !important;
}

/* explore-all: hide duplicate orderby from second type */
body.page-slug-explore-all .xp-flhead-target .orderby-filter ~ .orderby-filter {
    display: none !important;
}

/* explore-all: show only one primary filter bar (Vue handles v-if) */
body.page-slug-explore-all .no-map-tmpl .mobile-explore-head-top ~ .mobile-explore-head-top {
    display: none !important;
}

.finder-container {
    z-index: 1 !important;
}

/* Map popup — compact map-card style */
.leaflet-popup.tpl-map-card,
.infoBox.tpl-map-card {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    margin-bottom: 10px !important;
    pointer-events: none !important;
}

.leaflet-popup.tpl-map-card .leaflet-popup-content-wrapper {
    background: #fff !important;
    border-radius: 4px !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15) !important;
    padding: 0 !important;
}

.leaflet-popup.tpl-map-card .leaflet-popup-content {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.leaflet-popup.tpl-map-card .lf-item-container {
    position: relative !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
    border-radius: 0 !important;
}

/* Override parent-theme .lf-type-2 .lf-item height when inside our compact card */
.leaflet-popup.tpl-map-card .lf-item {
    height: auto !important;
    min-height: 0 !important;
}

/* Close button — scoped to its own class so it works regardless of popup wrapper classes */
.xp-map-card__close {
    position: absolute !important;
    top: 2px !important;
    right: 2px !important;
    z-index: 10 !important;
    width: 20px !important;
    height: 20px !important;
    padding: 0 !important;
    border: none !important;
    background: rgba(0, 0, 0, 0.05) !important;
    border-radius: 50% !important;
    font-size: 14px !important;
    line-height: 20px !important;
    text-align: center !important;
    color: #888 !important;
    cursor: pointer !important;
    transition: background 0.15s, color 0.15s !important;
}

.xp-map-card__close:hover {
    background: rgba(0, 0, 0, 0.12) !important;
    color: #333 !important;
}

.leaflet-popup.tpl-map-card .lf-item-map-card > a {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: max-content;
    min-width: 100px;
    max-width: 180px;
    padding: 10px 14px !important;
    gap: 8px !important;
    color: inherit !important;
    text-decoration: none !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    pointer-events: auto !important;
}

.leaflet-popup.tpl-map-card.cts-popup-visible.show .leaflet-popup-content,
.leaflet-popup.tpl-map-card.cts-popup-visible.show .lf-item-map-card,
.leaflet-popup.tpl-map-card.cts-popup-visible.show .lf-item-map-card > a,
.leaflet-popup.tpl-map-card.cts-popup-visible.show .xp-map-card__close {
    pointer-events: auto !important;
}

/* Override parent theme rule that hides popups in finder-map at < 1200px */
.finder-map .leaflet-popup.tpl-map-card.infoBox.c27-listing-preview.cts-popup-visible.show {
    display: block !important;
}

.leaflet-popup.tpl-map-card.cts-popup-hidden,
.leaflet-popup.tpl-map-card.cts-popup-hidden * {
    pointer-events: none !important;
}

.leaflet-popup.tpl-map-card .xp-map-card__avatar {
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
    background: #e9eef5 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 2px solid #e0e5ee !important;
}

.leaflet-popup.tpl-map-card .xp-map-card__avatar img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

.leaflet-popup.tpl-map-card .xp-map-card__avatar-placeholder {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #012545 !important;
    line-height: 1 !important;
    text-transform: uppercase !important;
}

.leaflet-popup.tpl-map-card .xp-map-card__name {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #012545 !important;
    white-space: normal;
    text-align: center;
    line-height: 1.3 !important;
}

.leaflet-popup.tpl-map-card .leaflet-popup-tip {
    background: #fff !important;
}

.marker-img {
    width: 20px !important;
    height: 20px !important;
    object-fit: cover !important;
    border-radius: 50% !important;
    border: 1px solid #fff !important;
    box-shadow: 0 0 0 1px rgba(1, 37, 69, .25) !important;
}

.leaflet-marker-pane .leaflet-marker-icon,
.leaflet-marker-pane .marker-container,
.leaflet-marker-pane .marker-icon,
.leaflet-marker-pane .marker-img {
    pointer-events: auto !important;
    touch-action: manipulation !important;
}

/* ── Explore pagination — match profile pagination style ─────── */
.c27-explore-pagination nav.job-manager-pagination ul {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 0;
    margin: 0;
    list-style: none;
    flex-wrap: wrap;
}

.c27-explore-pagination nav.job-manager-pagination ul li {
    margin: 0;
    display: inline-flex;
}

.c27-explore-pagination .xp-pagination__btn {
    margin: 2px;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 40px !important;
    height: 40px !important;
    padding: 0 8px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    font-family: inherit !important;
    border-radius: 6px !important;
    border: none !important;
    background: #DEE0E3 !important;
    color: #555 !important;
    cursor: pointer !important;
    transition: background 0.15s, color 0.15s !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    box-sizing: border-box !important;
    line-height: 1 !important;
    flex: none !important;
    box-shadow: none !important;
    text-decoration: none !important;
}

.c27-explore-pagination .xp-pagination__btn:hover:not([disabled]):not(.xp-pagination__btn--active) {
    background: #edf2fb !important;
    color: #014783 !important;
}

.c27-explore-pagination .xp-pagination__btn--active {
    background: #014783 !important;
    color: #fff !important;
    font-weight: 600 !important;
    cursor: default !important;
}

.c27-explore-pagination .xp-pagination__btn--nav {
    border: none !important;
    background: #DEE0E3 !important;
    color: #014783 !important;
}

.c27-explore-pagination .xp-pagination__btn--nav:hover:not([disabled]) {
    background: #edf2fb !important;
}

.c27-explore-pagination .xp-pagination__btn--nav[disabled],
.c27-explore-pagination span.xp-pagination__btn--nav {
    cursor: not-allowed !important;
    background: #DEE0E3 !important;
    color: #595959 !important;
    pointer-events: none;
}

.c27-explore-pagination .xp-pagination__ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    font-size: 14px;
    color: #999;
    background: #DEE0E3;
    border-radius: 6px;
    -webkit-user-select: none;
    user-select: none;
    pointer-events: none;
}

/* Hide original (unrebuilt) pagination items to prevent flash */
.c27-explore-pagination nav.job-manager-pagination ul li a:not(.xp-pagination__btn),
.c27-explore-pagination nav.job-manager-pagination ul li span:not(.xp-pagination__btn):not(.xp-pagination__btn--active):not(.xp-pagination__ellipsis) {
    visibility: hidden;
    height: 0;
    min-width: 0;
    width: 0;
    padding: 0;
    margin: 0;
    overflow: hidden;
    font-size: 0;
    line-height: 0;
}

/* ─── Activity Card — date badge & sector ───────────────────── */

.xp-activity-date {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 5;
    background: #457D4B;
    color: #fff;
    border-radius: 2px;
    padding: 12px 0px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 48px;
}

.xp-activity-date--range {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0 4px;
}

.xp-activity-date__day {
    display: block;
    color: #fff;
    font-size: 36px;
    font-weight: 400;
    line-height: 0.95;
    letter-spacing: 0;
    font-family: 'Source Serif 4', 'Source Serif Pro', serif !important;
}

.xp-activity-date__sep {
    display: block;
    color: #fff;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: 0;
    align-self: center;
}

.xp-activity-date__month {
    display: block;
    color: #fff;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: 0;
    text-transform: uppercase;
    width: 100%;
    margin-top: 5px;
}

.xp-activity-card__sector {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--global-color-primary, #1a3b5c);
    letter-spacing: 0.3px;
    margin-bottom: 4px;
    min-height: 18px;
}

/* ── xp-date-filter – dropdown for explore pages ── */
.xp-date-filter {
    position: relative;
    display: none; /* shown by JS after teleport */
}
.xp-date-filter .xp-loop-toggle {
    all: unset;
    box-sizing: border-box;
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 48px;
    min-width: 128px;
    padding: 0 38px 0 16px;
    background: #fff;
    border: 1.5px solid #d7dce3;
    border-radius: 8px;
    color: #012545!important;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
}
.xp-date-filter .xp-loop-toggle::after {
    content: "expand_more";
    font-family: "Material Icons";
    font-feature-settings: "liga";
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: #012545;
    transition: transform .2s;
}
.xp-date-filter.open .xp-loop-toggle::after {
    transform: translateY(-50%) rotate(180deg);
}
.xp-date-filter .xp-loop-toggle:hover,
.xp-date-filter.open .xp-loop-toggle {
    border-color: #014783;
    box-shadow: 0 0 0 1px #014783;
}
.xp-date-filter .xp-loop-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 260px;
    background: #fff;
    border: 1px solid #dfe5ec;
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .08);
    padding: 8px 20px;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity .2s ease, visibility .2s ease, transform .2s ease;
}
.xp-date-filter.open .xp-loop-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.xp-date-filter .xp-loop-menu label {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 0 32px 0 0;
    margin: 0;
    border-bottom: 1px solid #edf1f5;
    cursor: pointer;
    color: #012545;
    font-size: 14px;
    font-weight: 400;
    background: #fff;
    transition: background-color .18s ease, font-weight .18s ease;
}
.xp-date-filter .xp-loop-menu label:last-of-type {
    border-bottom: 0;
}
.xp-date-filter .xp-loop-menu label:hover {
    background: #f8fafc;
}
/* Hide radio inputs */
.xp-date-filter .xp-loop-menu input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
/* Selected circle indicator */
.xp-date-filter .xp-loop-menu label::after {
    content: "";
    position: absolute;
    right: 0;
    top: 50%;
    width: 16px;
    height: 16px;
    transform: translateY(-50%) scale(.9);
    border: 1.5px solid #014783;
    border-radius: 50%;
    opacity: 0;
    transition: opacity .18s ease, transform .18s ease;
}
/* Selected checkmark */
.xp-date-filter .xp-loop-menu label::before {
    content: "done";
    font-family: "Material Icons";
    font-feature-settings: "liga";
    position: absolute;
    right: 2px;
    top: 50%;
    transform: translateY(-50%) scale(.8);
    font-size: 12px;
    line-height: 1;
    color: #014783;
    z-index: 2;
    opacity: 0;
    transition: opacity .18s ease, transform .18s ease;
}
.xp-date-filter .xp-loop-menu label:has(input:checked) {
    font-weight: 600;
}
.xp-date-filter .xp-loop-menu label:has(input:checked)::before,
.xp-date-filter .xp-loop-menu label:has(input:checked)::after {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}
/* Date input */
.xp-date-filter .xp-event-date-input {
    display: none;
    width: calc(100% - 24px);
    height: 42px;
    min-height: 42px;
    margin: 10px 12px 12px;
    padding: 0 12px;
    background: #fff;
    border: 1px solid #d8dee8;
    border-radius: 8px;
    color: #012545;
    font-size: 14px;
    line-height: 42px;
    appearance: auto;
    -webkit-appearance: auto;
}
.xp-date-filter .xp-event-date-input::-webkit-calendar-picker-indicator {
    display: block;
    opacity: 1;
    cursor: pointer;
}
