.steve-leaflet-map {
    width: 100%;
    margin: 20px 0;
    z-index: 1;
}

.steve-map-controls {
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
    margin-top: 10px;

    /* Ensure controls are clickable above map panes */
    position: relative;
    z-index: 1000;

    /* "Card" panel look */
    padding: 12px;
    border: 1px solid rgba(0, 0, 0, 0.14);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.02);

    /* Layout */
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;

    /* Low-risk reordering hooks (CSS-only):
       Override these per-site to reorder controls without changing markup.
       Example:
       .steve-map-controls { --steve-order-toggle: 1; --steve-order-recenter: 2; --steve-order-proximity: 3; --steve-order-sort: 4; --steve-order-type: 5; --steve-order-filter: 6; --steve-order-list: 7; }
    */
    --steve-order-proximity: 10;
    --steve-order-toggle: 20;
    --steve-order-recenter: 30;
    --steve-order-sort: 40;
    --steve-order-type: 50;
    --steve-order-filter: 60;
    --steve-order-list: 70;
}

/* Dark-mode friendliness */
@media (prefers-color-scheme: dark) {
    .steve-map-controls {
        border-color: rgba(255, 255, 255, 0.18);
        background: rgba(255, 255, 255, 0.04);
    }
}

/* Section labels without markup changes.
   We "anchor" labels to existing elements and rely on ordering to keep them sensible. */
.steve-map-controls .steve-map-toggle::before {

    display: block;
    width: 100%;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    opacity: 0.75;
    margin-bottom: 6px;
}

.steve-map-controls .steve-map-sort::before {

    display: block;
    width: 100%;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    opacity: 0.75;
    margin-bottom: 6px;
}

/* If sort isn't present, put the Filters label above the search filter.
   Note: :has() is widely supported in modern browsers; if unavailable, it will simply omit the label. */
.steve-map-controls:not(:has(.steve-map-sort)) .steve-map-list-filter::before {
    content: "Filters";
    display: block;
    width: 100%;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    opacity: 0.75;
    margin-bottom: 6px;
}

.steve-map-controls .steve-map-proximity { order: var(--steve-order-proximity); }
.steve-map-controls .steve-map-toggle { order: var(--steve-order-toggle); }
.steve-map-controls .steve-map-recenter { order: var(--steve-order-recenter); }
.steve-map-controls .steve-map-sort { order: var(--steve-order-sort); }
.steve-map-controls .steve-map-type-filter { order: var(--steve-order-type); }
.steve-map-controls .steve-map-list-filter { order: var(--steve-order-filter); }
.steve-map-controls .steve-map-list { order: var(--steve-order-list); flex-basis: 100%; }

/* AirNow controls (AQI status + refresh) */
.steve-map-controls .steve-map-airnow {
    order: 5;
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.steve-map-legend {
    order: 15;
    flex: 1 1 240px;
    min-width: 220px;
    padding: 8px 10px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.45);
}

@media (prefers-color-scheme: dark) {
    .steve-map-legend {
        border-color: rgba(255, 255, 255, 0.18);
        background: rgba(0, 0, 0, 0.16);
    }
}

.steve-map-legend__title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    opacity: 0.8;
    margin-bottom: 6px;
}

.steve-map-legend__items {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 6px;
}

.steve-map-legend__badge {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: rgba(0, 0, 0, 0.03);
    font-size: 12px;
    line-height: 1.2;
}

@media (prefers-color-scheme: dark) {
    .steve-map-legend__badge {
        border-color: rgba(255, 255, 255, 0.18);
        background: rgba(255, 255, 255, 0.06);
    }
}

.steve-map-legend__note {
    font-size: 12px;
    opacity: 0.85;
    line-height: 1.35;
}

/* Debug: when ?steve_map_debug=1, make the AirNow refresh button unmissable */
body:has([data-steve-map-debug="1"]) .steve-map-controls .steve-map-airnow-refresh {
    outline: 3px dashed rgba(255, 0, 0, 0.85);
    outline-offset: 2px;
}

/* Explore Nearby (tourist-friendly proximity panel) */
.steve-map-nearby {
    order: var(--steve-order-proximity);
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.steve-map-nearby__toggle {
    white-space: nowrap;
}

.steve-map-nearby__panel {
    width: 100%;
    flex-basis: 100%;
    padding: 10px;
    border: 1px solid rgba(0, 0, 0, 0.14);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.02);
}

@media (prefers-color-scheme: dark) {
    .steve-map-nearby__panel {
        border-color: rgba(255, 255, 255, 0.18);
        background: rgba(255, 255, 255, 0.04);
    }
}

.steve-map-nearby__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.steve-map-nearby__row + .steve-map-nearby__row {
    margin-top: 8px;
}

.steve-map-nearby__label {
    font-size: 12px;
    font-weight: 600;
    opacity: 0.85;
    margin-right: 4px;
}

.steve-map-nearby__follow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    opacity: 0.9;
}

.steve-map-nearby__distance-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.steve-map-nearby__preset {
    font-size: 13px;
    padding: 6px 10px;
}

.steve-map-nearby .steve-map-distance-input {
    width: 120px;
}

.steve-map-controls .steve-map-airnow-status {
    font-size: 12px;
    opacity: 0.85;
}

.steve-map-controls .steve-map-airnow-worst {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid rgba(0, 0, 0, 0.18);
    background: rgba(255, 255, 255, 0.45);
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    line-height: 1.1;
    cursor: pointer;
    white-space: nowrap;
}

.steve-map-controls .steve-map-airnow-worst:hover {
    background: rgba(0, 0, 0, 0.04);
}

@media (prefers-color-scheme: dark) {
    .steve-map-controls .steve-map-airnow-worst {
        border-color: rgba(255, 255, 255, 0.2);
        background: rgba(0, 0, 0, 0.18);
    }

    .steve-map-controls .steve-map-airnow-worst:hover {
        background: rgba(255, 255, 255, 0.06);
    }
}

/* AirNow aq/data legend (Leaflet control) */
.steve-airnow-legend {
    font: 12px/1.2 Arial, sans-serif;
    color: #111;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(0, 0, 0, 0.18);
    border-radius: 10px;
    padding: 8px 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    user-select: none;
}

@media (prefers-color-scheme: dark) {
    .steve-airnow-legend {
        color: rgba(255, 255, 255, 0.92);
        background: rgba(0, 0, 0, 0.6);
        border-color: rgba(255, 255, 255, 0.18);
    }
}

.steve-airnow-legend__title {
    font-weight: 700;
    margin-bottom: 6px;
}

.steve-airnow-legend__row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 2px 0;
    white-space: nowrap;
}

.steve-airnow-legend__row .swatch {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 3px;
    border: 1px solid rgba(0, 0, 0, 0.25);
}

/* Keep plugin UI theme-friendly: use minimal styling and rely on inheritable colors. */
.steve-map-controls button {
    margin: 0; /* gap handles spacing */
    padding: 6px 10px;
    cursor: pointer;
    font: inherit;
    line-height: 1.2;

    border: 1px solid rgba(0, 0, 0, 0.18);
    border-radius: 10px;
    background: transparent;
}

.steve-map-controls button:hover {
    background: rgba(0, 0, 0, 0.04);
}

@media (prefers-color-scheme: dark) {
    .steve-map-controls button {
        border-color: rgba(255, 255, 255, 0.2);
    }

    .steve-map-controls button:hover {
        background: rgba(255, 255, 255, 0.06);
    }
}

.steve-map-controls button,
.steve-map-controls input,
.steve-map-controls select,
.steve-map-controls a {
    position: relative;
    z-index: 1001;
    pointer-events: auto;
    color: inherit;
}

/* Remove older spacing rules (gap handles spacing). */
.steve-map-controls .steve-map-toggle,
.steve-map-controls .steve-map-recenter {
    margin-right: 0;
}

.steve-map-list-filter {
    margin: 0;
    flex: 1 1 320px;
    min-width: 240px;
}

.steve-map-filter-input {
    width: 100%;
    max-width: 560px;
    padding: 8px 10px;
    border: 1px solid rgba(0, 0, 0, 0.18);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.5);
}

@media (prefers-color-scheme: dark) {
    .steve-map-filter-input {
        border-color: rgba(255, 255, 255, 0.2);
        background: rgba(0, 0, 0, 0.18);
    }
}

.steve-map-filter-input:focus {
    outline: 2px solid rgba(30, 136, 229, 0.35);
    outline-offset: 2px;
}

.steve-map-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.steve-map-list li {
    cursor: pointer;
    margin-bottom: 10px;
    padding: 8px;
    border: 1px solid transparent;
    transition: background-color 0.2s, border-color 0.2s;
}

.steve-map-list li:hover,
.steve-map-list li:focus {
    background-color: rgba(0, 0, 0, 0.035);
    border-color: rgba(0, 0, 0, 0.12);
    outline: none;
}

.steve-map-list li.is-active {
    background-color: rgba(30, 136, 229, 0.10);
    border-color: rgba(30, 136, 229, 0.35);
}

.steve-map-list li strong {
    display: block;
}

.steve-map-list li a {
    text-decoration: none;
    color: inherit;
}

.steve-map-list li a:hover {
    text-decoration: underline;
}

.steve-map-list__desc {
    margin-top: 4px;
    font-size: 0.95em;
    opacity: 0.9;
}

.steve-map-list__terms {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
margin-left: auto;
  order: 2;
}

.steve-map-term-chip {
    display: inline-block;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: rgba(0, 0, 0, 0.03);
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 12px;
    text-decoration: none;
}

.steve-map-term-chip:hover {
    background: rgba(0, 0, 0, 0.06);
    text-decoration: none;
}

.steve-map-list__actions {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

/* Mobile friendliness */
@media (max-width: 600px) {
    .steve-map-controls {
        margin-top: 8px;
        padding: 10px;
        gap: 10px;
    }

    .steve-map-sort-select,
    .steve-map-type-select {
        min-height: 44px;
        font-size: 16px; /* prevents iOS zoom-on-focus */
    }

    .steve-map-distance {
        font-size: 13px;
    }

    .steve-map-controls .steve-map-toggle,
    .steve-map-controls .steve-map-recenter {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-right: 0;
        margin-bottom: 0;
        padding: 10px 12px;
        min-height: 44px; /* recommended touch target */
    }

    .steve-map-filter-input {
        max-width: 100%;
        min-height: 44px;
        font-size: 16px; /* prevents iOS zoom-on-focus */
    }

    .steve-map-proximity {
        gap: 10px;
    }

    .steve-map-distance-input,
    .steve-map-distance-unit,
    .steve-map-proximity button {
        min-height: 44px;
        font-size: 16px; /* prevents iOS zoom-on-focus */
    }

    .steve-map-distance-input {
        width: 110px;
    }

    .steve-map-list li {
        padding: 10px;
    }

    .steve-map-list__main {
        grid-template-columns: 48px 1fr;
        column-gap: 10px;
    }

    .steve-map-list__thumb {
        width: 48px;
        height: 48px;
    }

    .steve-map-list__actions {
        gap: 10px;
    }

    .steve-map-list__actions button,
    .steve-map-list__actions a {
        padding: 10px 12px;
        min-height: 44px;
    }
}

.steve-map-list__actions button,
.steve-map-list__actions a {
    font-size: 12px;
    line-height: 1;
    padding: 6px 8px;
    border-radius: 4px;
    margin: 0;
}

.steve-map-list__actions button {
    border: 1px solid rgba(0, 0, 0, 0.18);
    background: transparent;
}

/* "Remove from saved" action (destructive but still subtle) */
.steve-map-list__actions .steve-map-item-unsave {
    border-color: rgba(176, 0, 32, 0.35);
    background: rgba(176, 0, 32, 0.04);
}

.steve-map-list__actions .steve-map-item-unsave:hover {
    background: rgba(176, 0, 32, 0.08);
}

@media (prefers-color-scheme: dark) {
    .steve-map-list__actions .steve-map-item-unsave {
        border-color: rgba(255, 99, 132, 0.45);
        background: rgba(255, 99, 132, 0.12);
    }

    .steve-map-list__actions .steve-map-item-unsave:hover {
        background: rgba(255, 99, 132, 0.18);
    }
}

.steve-map-list__actions a {
    border: 1px solid rgba(0, 0, 0, 0.18);
    text-decoration: none;
    color: inherit;
    background: transparent;
}

.steve-map-list__actions a:hover {
    text-decoration: underline;
}

.steve-map-list__actions button:focus,
.steve-map-list__actions a:focus {
    outline: 2px solid rgba(30, 136, 229, 0.35);
    outline-offset: 2px;
}

/* Trip Planner (Like & Save integration) */
.steve-map-planner {
    width: 100%;
    flex-basis: 100%;
    padding-top: 4px;
}

/* Trip Plans (Like & Save Plans) "white box" should span full width */
.steve-map-planner,
.steve-map-planner__recommend,
.steve-map-planner__controls,
.steve-map-planner__hint {

    max-width: 100%
}

/* On larger screens, use 2 columns inside the planner: (plan + actions) and (recommendations) */
@media (min-width: 900px) {
    .steve-map-planner {
       
        gap: 12px;
        align-items: start;
    }

    .steve-map-planner__hint {
        grid-column: 1;
    }

    .steve-map-planner__recommend {
        grid-column: 2;
        margin-top: 0;
    }
}

.steve-map-planner__header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}

.steve-map-planner__status {
    font-size: 12px;
    opacity: 0.85;
}

.steve-map-planner__controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

/* Ensure the select + buttons can wrap under each other instead of squishing */
.steve-map-planner__controls > * {
    flex: 0 1 auto;
}

.steve-map-planner__plan-select {
    min-width: 220px;
    max-width: 100%;
    width: 100%;
    padding: 6px 10px;
    border: 1px solid rgba(0, 0, 0, 0.18);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.5);
    color: inherit;
    font: inherit;
}

@media (prefers-color-scheme: dark) {
    .steve-map-planner__plan-select {
        border-color: rgba(255, 255, 255, 0.2);
        background: rgba(0, 0, 0, 0.18);
    }
}

.steve-map-planner__hint {
    margin-top: 8px;
    font-size: 12px;
    opacity: 0.85;
}

.steve-map-item-add-to-plan {
    border-color: rgba(46, 125, 50, 0.35);
    background: rgba(46, 125, 50, 0.05);
}

.steve-map-item-add-to-plan:hover {
    background: rgba(46, 125, 50, 0.10);
}

/* "Added" state for planner buttons (list + recommendations) */
.steve-map-item-add-to-plan.is-added,
.steve-map-planner__recommend-add.is-added {
    border-color: rgba(30, 136, 229, 0.45);
    background: rgba(30, 136, 229, 0.08);
}

.steve-map-item-add-to-plan.is-added:hover,
.steve-map-planner__recommend-add.is-added:hover {
    background: rgba(30, 136, 229, 0.12);
}

@media (prefers-color-scheme: dark) {
    .steve-map-item-add-to-plan {
        border-color: rgba(105, 240, 174, 0.35);
        background: rgba(105, 240, 174, 0.10);
    }

    .steve-map-item-add-to-plan:hover {
        background: rgba(105, 240, 174, 0.16);
    }
}

.steve-map-planner__recommend {
    margin-top: 10px;
    padding: 10px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.015);
}

@media (prefers-color-scheme: dark) {
    .steve-map-planner__recommend {
        border-color: rgba(255, 255, 255, 0.18);
        background: rgba(255, 255, 255, 0.03);
    }
}

.steve-map-planner__recommend-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.steve-map-planner__recommend-list {
    margin: 10px 0 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 8px;
}

.steve-map-planner__recommend-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid rgba(0, 0, 0, 0.10);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.01);
}

@media (prefers-color-scheme: dark) {
    .steve-map-planner__recommend-item {
        border-color: rgba(255, 255, 255, 0.14);
        background: rgba(255, 255, 255, 0.02);
    }
}

.steve-map-planner__recommend-name {
    font-weight: 600;
}

.steve-map-planner__recommend-meta {
    font-size: 12px;
    opacity: 0.85;
    white-space: nowrap;
}

.steve-map-planner__recommend-add {
    white-space: nowrap;
}

/* Proximity controls (Locate + distance filter) */
.steve-map-proximity {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 0;
}

.steve-map-proximity button {
    margin: 0;
}

.steve-map-distance-input {
    width: 120px;
    padding: 6px 8px;
    border: 1px solid rgba(0, 0, 0, 0.18);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.5);
}

.steve-map-distance-unit {
    padding: 6px 10px;
    border: 1px solid rgba(0, 0, 0, 0.18);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.5);
}

@media (prefers-color-scheme: dark) {
    .steve-map-distance-input,
    .steve-map-distance-unit {
        border-color: rgba(255, 255, 255, 0.2);
        background: rgba(0, 0, 0, 0.18);
    }
}

.steve-map-proximity-status {
    font-size: 12px;
    opacity: 0.9;
}

/* Saved items that are not mappable (non-location likes or geocode failures) */
.steve-map-unmappable {
    width: 100%;
    flex-basis: 100%;
    margin-top: 12px;
    padding: 10px 12px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.015);
}

/* Non-location saved items: render inline with the list, but appear disabled (no actions). */
.steve-map-list__item--unmappable {
    opacity: 0.75;
}

.steve-map-list__item--unmappable,
.steve-map-list__item--unmappable * {
    cursor: default !important;
}

.steve-map-list__item--unmappable a {
    text-decoration: underline;
}

@media (prefers-color-scheme: dark) {
    .steve-map-unmappable {
        border-color: rgba(255, 255, 255, 0.16);
        background: rgba(255, 255, 255, 0.03);
    }
}

.steve-map-unmappable p {
    margin: 0 0 8px 0;
    font-size: 13px;
    opacity: 0.9;
}

.steve-map-unmappable__list {
    list-style: disc;
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 6px;
}

.steve-map-unmappable__item a {
    text-decoration: none;
}

.steve-map-unmappable__item a:hover {
    text-decoration: underline;
}

.steve-map-unmappable__note {
    margin-top: 2px;
    font-size: 12px;
    opacity: 0.85;
}

/* Explore Nearby panel microcopy */
.steve-map-nearby__help {
    margin: 10px 0;
    padding: 10px 12px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.03);
}

.steve-map-nearby__help-title {
    margin: 0 0 4px 0;
    font-size: 13px;
}

.steve-map-nearby__help-text {
    font-size: 12px;
    line-height: 1.35;
}

/* Distance + sorting UI */
.steve-map-sort {
    margin: 0;
}

/* Type filter (taxonomy/type dropdown) */
.steve-map-type-filter {
    margin: 0;
}

.steve-map-type-select {
    padding: 6px 10px;
    border: 1px solid rgba(0, 0, 0, 0.18);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.5);
    color: inherit;
    font: inherit;
}

.steve-map-sort-select {
    padding: 6px 10px;
    border: 1px solid rgba(0, 0, 0, 0.18);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.5);
    color: inherit;
    font: inherit;
}

@media (prefers-color-scheme: dark) {
    .steve-map-type-select,
    .steve-map-sort-select {
        border-color: rgba(255, 255, 255, 0.2);
        background: rgba(0, 0, 0, 0.18);
    }
}

.steve-map-distance {
    margin-top: 6px;
    font-size: 12px;
    opacity: 0.9;
}

/* Rich list items (thumbnail + meta rows) */
.steve-map-list__main {
    display: flex;
    flex-wrap:wrap;
    column-gap: 10px;
    row-gap: 4px;
  
}

.steve-map-list__thumb {
    grid-row: 1 / span 4;
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.10);
    background: rgba(0, 0, 0, 0.03);
}

.steve-map-list__meta {
    margin-top: 6px;
    font-size: 12px;
    opacity: 0.9;
}

.steve-map-list__meta-row {
    line-height: 1.3;
}

.steve-map-list__meta-k {
    font-weight: 600;
}

/* Rich popup */
.steve-map-popup__thumb img {
    display: block;
    width: 100%;
    max-width: 240px;
    height: auto;
    border-radius: 8px;
    margin-bottom: 6px;
}

.steve-map-popup__title {
    font-weight: 700;
    margin-bottom: 4px;
}

.steve-map-popup__title a {
    text-decoration: none;
}

.steve-map-popup__title a:hover {
    text-decoration: underline;
}

.steve-map-popup__excerpt {
    font-size: 13px;
    line-height: 1.35;
    margin-bottom: 6px;
}

.steve-map-popup__meta {
    font-size: 12px;
    opacity: 0.9;
    border-top: 1px solid #eee;
    padding-top: 6px;
}

.steve-map-popup__meta-row + .steve-map-popup__meta-row {
    margin-top: 2px;
}

.steve-map-popup__meta-k {
    font-weight: 600;
}

/* ------------------------------------------------------------
   Leaflet Layers Control: checkbox hardening
   Some themes (or optimization plugins) globally restyle checkboxes, e.g.
     input[type="checkbox"] { appearance:none; }
   which can make Leaflet overlay checkboxes "disappear" while labels remain.
   Scope the fix to Leaflet's layers control inside our map container.
   ------------------------------------------------------------ */

.steve-leaflet-map .leaflet-control-layers input.leaflet-control-layers-selector[type="checkbox"] {
    -webkit-appearance: checkbox !important;
    appearance: checkbox !important;
    display: inline-block !important;
    width: auto !important;
    height: auto !important;
    opacity: 1 !important;
    position: relative !important;
    left: auto !important;
    top: auto !important;
    margin: 2px 4px 0 0 !important; /* keep a little space before label text */
    clip: auto !important;
    clip-path: none !important;
    transform: none !important;
}

.steve-leaflet-map .leaflet-control-layers input.leaflet-control-layers-selector[type="checkbox"]::before,
.steve-leaflet-map .leaflet-control-layers input.leaflet-control-layers-selector[type="checkbox"]::after {
    content: none !important;
}

/* ------------------------------------------------------------
   Custom marker shapes (CSS markers via Leaflet DivIcon)
   Usage: set point.marker_class = "marker-pin" (or any class you create)
   The JS adds:
     <div class="steve-map-marker marker-pin">
       <div class="steve-map-marker__pin" style="--steve-marker-color:#e53935"></div>
     </div>
   ------------------------------------------------------------ */

/* Base container: DivIcon wrapper */
.steve-map-marker {
    /* Leaflet adds its own background/box styles; neutralize */
    background: transparent !important;
    border: 0 !important;
}

/* Leaflet divIcon wrapper reset (needed for custom HTML markers).
   Leaflet's default `.leaflet-div-icon` adds a background + border which can hide our marker HTML,
   especially in wp-admin previews. */
.steve-marker-div-icon.leaflet-div-icon {
    background: transparent !important;
    border: 0 !important;
}

/* Default pin element (can be overridden by specific classes) */
.steve-map-marker__pin {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: var(--steve-marker-color, #1e88e5);
    border: 2px solid rgba(0, 0, 0, 0.25);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

/* Example: a map "pin" / teardrop */
.steve-map-marker.marker-pin .steve-map-marker__pin {
    width: 18px;
    height: 18px;
    border-radius: 18px 18px 18px 0;
    transform: rotate(-45deg);
    transform-origin: 50% 50%;
    background: var(--steve-marker-color, orange);
    border: 2px solid rgba(0, 0, 0, 0.25);
}

/* Inner dot so the pin looks nicer */
.steve-map-marker.marker-pin .steve-map-marker__pin::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 6px;
    height: 6px;
    border-radius: 999px;
    transform: translate(-50%, -50%) rotate(45deg); /* cancel parent rotation */
    background: rgba(255, 255, 255, 0.95);
}
