/* ── Wrapper ─────────────────────────────────────────────────────────────── */

.lbi-fm-wrap {
    max-width: 780px;
    margin: 0 auto;
    color: #303942;
    font-size: 20px;
    line-height: 1.625;
    letter-spacing: 0.4px;
}

/* ── Filters ─────────────────────────────────────────────────────────────── */

.lbi-fm-filters {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 40px;
    padding: 16px 20px;
    background: #f3f3f3;
    border-radius: 6px;
}

/* Day toggles row */
.lbi-fm-filter-days {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

/* Dropdowns row */
.lbi-fm-filter-selects {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

/* Sort row */
.lbi-fm-filter-sort {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

/* Filter labels */
.lbi-fm-filter-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #666;
    white-space: nowrap;
    margin-right: 2px;
}

/* Multi-select hint always on its own line below the day buttons */
.lbi-fm-multi-hint {
    font-size: 12px;
    color: #999;
    font-style: italic;
    margin-left: 0;
    flex-basis: 100%;
}

/* Sort hint always on its own line below the dropdown */
.lbi-fm-sort-hint {
    font-size: 12px;
    color: #999;
    font-style: italic;
    margin: 0;
    flex-basis: 100%;
}

/* Select label wrapper */
.lbi-fm-select-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: default;
}

/* Reset button */
.lbi-fm-reset-btn {
    padding: 6px 14px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    font-weight: 400;
    color: #28c3ea;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.1s ease-in-out;
    margin-left: 4px;
    letter-spacing: 0;
    text-transform: none;
}

.lbi-fm-reset-btn:hover {
    color: #333;
}

/* Day toggle buttons */
.lbi-fm-day-btn {
    padding: 6px 14px;
    border: 1px solid #303942;
    border-radius: 9999px;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #303942;
    line-height: 1.4;
    transition: background 0.1s ease-in-out, border-color 0.1s ease-in-out, color 0.1s ease-in-out;
}

.lbi-fm-day-btn:hover {
    background: #e8e8e8;
    border-color: #aaa;
    color: #303942;
}

.lbi-fm-day-btn.active {
    background: #01cb68;
    border-color: #01cb68;
    color: #fff;
}

.lbi-fm-day-btn.active:hover {
    background: #019a52;
    border-color: #019a52;
    color: #fff;
}

/* Type + location dropdowns */
.lbi-fm-type-select {
    min-width: 160px;
}

.lbi-fm-type-select,
.lbi-fm-location-select {
    padding: 7px 32px 7px 14px;
    border: 1px solid #303942;
    border-radius: 9999px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23303942'/%3E%3C/svg%3E") no-repeat right 14px center;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #303942;
    line-height: 1.4;
    transition: border-color 0.1s ease-in-out;
}

.lbi-fm-type-select:focus,
.lbi-fm-location-select:focus {
    outline: none;
    border-color: #01cb68;
}

.lbi-fm-location-select {
    min-width: 220px;
}

.lbi-fm-location-select:disabled {
    opacity: 0.6;
    cursor: default;
}

/* ── Map ─────────────────────────────────────────────────────────────────── */

/* Suppress Pierce theme gradient underline + link color on all map links */
.lbi-fm-map a,
.lbi-fm-map a:visited {
    background-image: none;
    border-bottom: none;
    color: inherit;
}

/* Leaflet zoom/control buttons */
.lbi-fm-map .leaflet-control a,
.lbi-fm-map .leaflet-control a:visited {
    color: #303942;
    background-image: none;
    border-bottom: none;
    text-decoration: none;
}

.lbi-fm-map {
    height: 400px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    margin-bottom: 40px;
    background: #f0f0f0;
}

.lbi-fm-map-legend {
    background: rgba(255, 255, 255, 0.92);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    color: #303942;
    line-height: 1.8;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

/* User location marker pulse */
.lbi-fm-user-location-marker {
    animation: lbi-fm-pulse 2s ease-in-out infinite;
}

@keyframes lbi-fm-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.55; }
}

.lbi-fm-legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.2);
    margin-right: 6px;
    vertical-align: middle;
}

/* Card highlight flash when navigated to from map */
.lbi-fm-card-highlight {
    outline: 3px solid #01cb68;
    outline-offset: 2px;
    transition: outline-color 1.2s ease-out;
}

/* ── Group ───────────────────────────────────────────────────────────────── */

.lbi-fm-group {
    margin-bottom: 56px;
}

.lbi-fm-group-title {
    font-size: 24px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    line-height: 1.4;
    color: #303942;
    margin-bottom: 12px;
}

.lbi-fm-group-intro {
    margin-bottom: 28px;
    color: #303942;
    line-height: 1.625;
}

.lbi-fm-group-intro a {
    color: #28c3ea;
    text-decoration: none;
}

.lbi-fm-group-intro a:hover {
    text-decoration: underline;
}

/* ── Card list ───────────────────────────────────────────────────────────── */

.lbi-fm-cards {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ── Card ────────────────────────────────────────────────────────────────── */

.lbi-fm-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

/* Photo always on top — no side-by-side */
.lbi-fm-card-inner {
    display: flex;
    flex-direction: column;
}

.lbi-fm-card-photo img {
    width: 100%;
    height: auto;
    display: block;
}

.lbi-fm-caption {
    font-size: 13px;
    color: #888;
    font-style: italic;
    padding: 6px 24px 0;
    margin: 0;
    line-height: 1.4;
}


.lbi-fm-card-body {
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
}

/* ── Card header ─────────────────────────────────────────────────────────── */

.lbi-fm-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.lbi-fm-card-title {
    font-size: 22px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    line-height: 1.3;
    color: #303942;
    margin: 0;
}

/* ── Type badge ──────────────────────────────────────────────────────────── */

.lbi-fm-type-badge {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 4px 10px;
    border-radius: 12px;
    white-space: nowrap;
    flex-shrink: 0;
    margin-top: 4px;
}

.lbi-fm-type-farmers_market {
    background: #e8f5e9;
    color: #2e7d32;
}

.lbi-fm-type-farm_stand {
    background: #fff8e1;
    color: #e65100;
}

.lbi-fm-type-night_market {
    background: #ede7f6;
    color: #4527a0;
}

/* ── Card meta list ──────────────────────────────────────────────────────── */

.lbi-fm-card-meta {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
    font-size: 17px;
    color: #303942;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.lbi-fm-card-meta strong {
    color: #303942;
}

.lbi-fm-distances {
    font-size: 15px;
    color: #666;
    line-height: 1.5;
}

.lbi-fm-user-dist {
    font-weight: 700;
    color: #28c3ea;
}

/* ── Description ─────────────────────────────────────────────────────────── */

.lbi-fm-card-desc {
    font-size: 18px;
    color: #303942;
    line-height: 1.625;
    margin: 0 0 20px;
}

/* ── Links ───────────────────────────────────────────────────────────────── */

.lbi-fm-card-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 4px;
}

/* ── YouTube embed ───────────────────────────────────────────────────────── */

.lbi-fm-video-label {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #666;
    margin: 0 0 8px;
    padding: 16px 24px 0;
}

.lbi-fm-video {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    border-top: 1px solid #e0e0e0;
}

.lbi-fm-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ── No results ──────────────────────────────────────────────────────────── */

.lbi-fm-no-results {
    padding: 32px;
    text-align: center;
    color: #666;
    font-size: 18px;
    font-style: italic;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 640px) {
    .lbi-fm-card-body {
        padding: 16px;
    }

    .lbi-fm-card-title {
        font-size: 18px;
    }

    .lbi-fm-type-select,
    .lbi-fm-location-select {
        width: 100%;
    }

    /* Stack everything in the sort row vertically */
    .lbi-fm-filter-sort {
        flex-direction: column;
        align-items: stretch;
    }

    /* Stack label above dropdown */
    .lbi-fm-filter-sort .lbi-fm-select-wrap {
        flex-direction: column;
        align-items: stretch;
    }

    .lbi-fm-filter-sort .lbi-fm-location-select {
        width: 100%;
        min-width: 0;
    }
}
