/* ============================================================
   Fleamapket Trip Planner — Stylesheet
   Scoped under .fmp-planner to avoid theme conflicts
   ============================================================ */

/* ── Custom properties ────────────────────────────────────── */
.fmp-planner {
    --fmp-cream:       #F5F0E8;
    --fmp-rust:        #C4521A;
    --fmp-rust-light:  #E8734A;
    --fmp-forest:      #2C3E2D;
    --fmp-forest-mid:  #3D5240;
    --fmp-gold:        #D4A847;
    --fmp-amber:       #edae49;
    --fmp-charcoal:    #202125;
    --fmp-warm-grey:   #6b7280;
    --fmp-sand:        #e5e7eb;
    --fmp-white:       #ffffff;
    --fmp-bg-field:    #f9fafb;

    --fmp-radius-sm:   8px;
    --fmp-radius-md:   10px;
    --fmp-radius-lg:   16px;

    --fmp-shadow:      0 2px 16px rgba(0,0,0,.07), 0 1px 4px rgba(0,0,0,.04);
    --fmp-font-body:   'DM Sans', 'Helvetica Neue', sans-serif;
    --fmp-font-serif:  'Playfair Display', Georgia, serif;

    font-family: var(--fmp-font-body);
    color: var(--fmp-charcoal);
    max-width: 860px;
    margin: 0 auto;
}

/* ── Form card ────────────────────────────────────────────── */
.fmp-form {
    background: var(--fmp-white);
    border-radius: var(--fmp-radius-lg);
    box-shadow: var(--fmp-shadow);
    border: 1px solid #f0f0f0;
    overflow: hidden;
}

/* ── Form header — blanc + ligne amber en bas ─────────────── */
.fmp-form__header {
    background: var(--fmp-white);
    padding: 32px 36px 22px;
    border-bottom: 3px solid var(--fmp-amber);
}

.fmp-form__tag {
    display: inline-block;
    font-size: .65rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 10px;
    background: transparent;
    border: 1.5px solid var(--fmp-sand);
    color: var(--fmp-warm-grey);
}

.fmp-form__title {
    font-family: var(--fmp-font-serif);
    color: var(--fmp-charcoal);
    font-size: clamp(1.3rem, 3vw, 1.75rem);
    line-height: 1.25;
    margin: 0;
    font-weight: 400;
}

.fmp-form__title em {
    color: var(--fmp-amber);
    font-style: italic;
}

.fmp-form__section {
    padding: 20px 36px 0;
}

.fmp-form__section:last-of-type {
    padding-bottom: 0;
}

/* Section label — lighter, smaller, less intrusive */
.fmp-form__label {
    font-size: .65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #9ca3af;
    margin-bottom: 8px;
}

/* ── Grid rows ────────────────────────────────────────────── */
.fmp-row {
    display: grid;
    gap: 12px;
}
.fmp-row--2 { grid-template-columns: 1fr 1fr; }
.fmp-row--3 { grid-template-columns: 1fr 1fr 1fr; }

/* ── Fields & inputs ──────────────────────────────────────── */
.fmp-field {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Hide the <label> tags — placeholders carry the hint text */
.fmp-field label {
    display: none;
}

.fmp-field input,
.fmp-field select {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--fmp-sand);
    border-radius: var(--fmp-radius-sm);
    font-family: var(--fmp-font-body);
    font-size: .88rem;
    color: var(--fmp-charcoal);
    background: var(--fmp-bg-field);
    transition: border-color .15s, box-shadow .15s;
    outline: none;
    box-sizing: border-box;
}

.fmp-field input:focus {
    border-color: var(--fmp-charcoal);
    box-shadow: 0 0 0 3px rgba(32,33,37,.08);
    background: var(--fmp-white);
}

.fmp-field input::placeholder { color: #adb5bd; }

/* Date inputs — keep native calendar icon, just style the field */
.fmp-field input[type="date"] {
    padding-left: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 13px center;
    background-size: 15px;
}

.fmp-input-icon {
    position: relative;
}

.fmp-input-icon .fmp-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-style: normal;
    pointer-events: none;
    font-size: .9rem;
}

.fmp-input-icon input {
    padding-left: 38px;
}

/* ── Transport + Pace toggles ─────────────────────────────── */
.fmp-transport,
.fmp-pace {
    display: flex;
    gap: 8px;
}

.fmp-transport__opt,
.fmp-pace__opt {
    flex: 1;
    border: 1.5px solid var(--fmp-sand);
    border-radius: var(--fmp-radius-sm);
    padding: 10px 6px;
    text-align: center;
    cursor: pointer;
    background: var(--fmp-bg-field);
    font-family: var(--fmp-font-body);
    transition: all .15s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.fmp-transport__opt:hover,
.fmp-pace__opt:hover {
    border-color: #adb5bd;
    background: var(--fmp-white);
}

.fmp-transport__opt.is-active,
.fmp-pace__opt.is-active {
    border-color: var(--fmp-charcoal);
    background: var(--fmp-white);
}

.fmp-transport__label,
.fmp-pace__label {
    font-size: .68rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #9ca3af;
}

.fmp-transport__opt.is-active .fmp-transport__label,
.fmp-pace__opt.is-active .fmp-pace__label {
    color: var(--fmp-charcoal);
}

/* ── Range slider ─────────────────────────────────────────── */
.fmp-range-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
}

/* Fake track container — sits behind the native input */
.fmp-range-track {
    position: absolute;
    left: 0;
    right: 70px; /* leave room for the value label */
    height: 2px;
    background: var(--fmp-sand);
    border-radius: 2px;
    pointer-events: none;
    z-index: 0;
}

/* Fill bar — width set by JS */
.fmp-range-fill {
    height: 100%;
    background: var(--fmp-charcoal);
    border-radius: 2px;
    width: 17%; /* default, overridden by JS */
    transition: width .05s linear;
}

/* Native input — transparent track, sits on top */
.fmp-range-wrap input[type="range"] {
    flex: 1;
    -webkit-appearance: none !important;
    appearance: none !important;
    height: 2px !important;
    background: transparent !important;
    border-radius: 2px !important;
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    position: relative;
    z-index: 1;
}

.fmp-range-wrap input[type="range"]::-webkit-slider-runnable-track {
    height: 2px !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.fmp-range-wrap input[type="range"]::-moz-range-track {
    height: 2px !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Firefox native fill — hide it, we use our own */
.fmp-range-wrap input[type="range"]::-moz-range-progress {
    background: transparent !important;
}

.fmp-range-wrap input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none !important;
    appearance: none !important;
    width: 16px !important;
    height: 16px !important;
    border-radius: 50% !important;
    background: var(--fmp-charcoal) !important;
    cursor: pointer !important;
    border: 2.5px solid var(--fmp-white) !important;
    box-shadow: 0 1px 5px rgba(0,0,0,.2) !important;
    margin-top: -7px !important;
    position: relative;
    z-index: 2;
}

.fmp-range-wrap input[type="range"]::-moz-range-thumb {
    width: 16px !important;
    height: 16px !important;
    border-radius: 50% !important;
    background: var(--fmp-charcoal) !important;
    cursor: pointer !important;
    border: 2.5px solid var(--fmp-white) !important;
    box-shadow: 0 1px 5px rgba(0,0,0,.2) !important;
}

.fmp-range-val {
    min-width: 56px;
    text-align: right;
    font-size: .85rem;
    font-weight: 500;
    color: var(--fmp-charcoal);
}

/* ── Pills ────────────────────────────────────────────────── */
.fmp-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.fmp-pill {
    padding: 6px 14px;
    border: 1.5px solid var(--fmp-sand);
    border-radius: 20px;
    font-family: var(--fmp-font-body);
    font-size: .78rem;
    cursor: pointer;
    background: var(--fmp-bg-field);
    color: var(--fmp-warm-grey);
    transition: all .15s;
}

.fmp-pill:hover { border-color: #adb5bd; color: var(--fmp-charcoal); background: var(--fmp-white); }
.fmp-pill.is-active { background: var(--fmp-charcoal); border-color: var(--fmp-charcoal); color: var(--fmp-white); }

/* ── Form actions ─────────────────────────────────────────── */
.fmp-form__actions {
    padding: 24px 36px 32px;
    display: flex;
    gap: 10px;
}

/* ── Buttons ──────────────────────────────────────────────── */
.fmp-btn {
    padding: 13px 24px;
    border-radius: var(--fmp-radius-sm);
    font-family: var(--fmp-font-body);
    font-size: .9rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: background .15s, transform .1s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.fmp-btn--primary {
    background: var(--fmp-charcoal);
    color: var(--fmp-white);
    flex: 1;
    justify-content: center;
}
.fmp-btn--primary:hover { background: #3a3c42; }
.fmp-btn--primary:active { transform: scale(.99); }

.fmp-btn--secondary {
    background: transparent;
    color: var(--fmp-warm-grey);
    border: 1.5px solid var(--fmp-sand);
}
.fmp-btn--secondary:hover { border-color: #adb5bd; color: var(--fmp-charcoal); }

.fmp-btn--small {
    padding: 8px 14px;
    font-size: .78rem;
    background: var(--fmp-white);
    border: 1.5px solid var(--fmp-sand);
    color: var(--fmp-charcoal);
    border-radius: var(--fmp-radius-sm);
}
.fmp-btn--small:hover { border-color: #adb5bd; }

.fmp-link-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--fmp-rust);
    text-decoration: underline;
    font-size: .82rem;
    font-family: var(--fmp-font-body);
    margin-top: 5px;
    display: inline-block;
}

/* ── Loading ──────────────────────────────────────────────── */
.fmp-loading {
    text-align: center;
    padding: 64px 36px;
    background: var(--fmp-white);
    border-radius: var(--fmp-radius-lg);
    box-shadow: var(--fmp-shadow);
}

.fmp-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--fmp-sand);
    border-top-color: var(--fmp-charcoal);
    border-radius: 50%;
    animation: fmp-spin .7s linear infinite;
    margin: 0 auto 16px;
}

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

.fmp-loading__msg {
    font-family: var(--fmp-font-serif);
    font-style: italic;
    color: var(--fmp-charcoal);
    font-size: 1.1rem;
    margin: 0 0 6px;
}

.fmp-loading__sub {
    color: var(--fmp-warm-grey);
    font-size: .82rem;
    margin: 0;
}

/* ── Error ────────────────────────────────────────────────── */
.fmp-error {
    text-align: center;
    padding: 48px 36px;
    background: var(--fmp-white);
    border-radius: var(--fmp-radius-lg);
    box-shadow: var(--fmp-shadow);
}

.fmp-error__icon { font-size: 2rem; display: block; margin-bottom: 12px; }
.fmp-error__msg { color: var(--fmp-charcoal); margin-bottom: 20px; }

/* ── Results ──────────────────────────────────────────────── */
.fmp-results {
    background: var(--fmp-white);
    border-radius: var(--fmp-radius-lg);
    box-shadow: var(--fmp-shadow);
    overflow: hidden;
}

.fmp-results__header {
    padding: 28px 32px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    border-bottom: 1px solid var(--fmp-sand);
}

.fmp-results__title {
    font-family: var(--fmp-font-serif);
    font-size: 1.4rem;
    color: var(--fmp-charcoal);
    margin-bottom: 4px;
}

.fmp-results__meta { font-size: .8rem; color: var(--fmp-warm-grey); }
.fmp-results__actions { display: flex; gap: 8px; flex-shrink: 0; }

/* ── Timing tip ───────────────────────────────────────────── */
.fmp-timing-tip {
    margin: 0 32px;
    padding: 14px 16px;
    background: rgba(237,174,73,.08);
    border: 1px solid rgba(237,174,71,.35);
    border-radius: var(--fmp-radius-sm);
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.fmp-timing-tip__icon { font-size: 1.2rem; flex-shrink: 0; }
.fmp-timing-tip__body { font-size: .85rem; color: #7a5c0a; line-height: 1.5; }
.fmp-timing-tip__body strong { color: #5a4200; }

/* ── Days ─────────────────────────────────────────────────── */
.fmp-days {
    padding: 24px 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.fmp-day {
    border: 1px solid #e5e7eb;
    border-radius: var(--fmp-radius-md);
    overflow: hidden;
    transition: box-shadow .2s;
}
.fmp-day:hover { box-shadow: 0 4px 16px rgba(0,0,0,.06); }

.fmp-day__header {
    padding: 12px 18px;
    background: var(--fmp-charcoal);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.fmp-day__label {
    font-family: var(--fmp-font-serif);
    font-style: italic;
    font-size: .95rem;
    color: var(--fmp-white);
}

.fmp-day__km {
    font-size: .75rem;
    color: rgba(255,255,255,.55);
}

.fmp-day__empty {
    padding: 16px 18px;
    font-size: .85rem;
    color: var(--fmp-warm-grey);
    font-style: italic;
}

/* ── Stops ────────────────────────────────────────────────── */
.fmp-stop {
    padding: 14px 18px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    border-bottom: 1px solid var(--fmp-sand);
}
.fmp-stop:last-child { border-bottom: none; }

.fmp-stop__num {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--fmp-rust);
    color: var(--fmp-white);
    font-size: .72rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.fmp-stop__num--event {
    background: var(--fmp-amber);
    color: var(--fmp-charcoal);
}

.fmp-stop__info { flex: 1; min-width: 0; }

.fmp-stop__name {
    font-weight: 500;
    font-size: .9rem;
    margin: 3px 0;
}

.fmp-stop__name a {
    color: var(--fmp-charcoal);
    text-decoration: none;
}
.fmp-stop__name a:hover { color: var(--fmp-rust); text-decoration: underline; }

.fmp-stop__detail {
    font-size: .78rem;
    color: var(--fmp-warm-grey);
    line-height: 1.4;
}

.fmp-stop__ext {
    font-size: .75rem;
    color: var(--fmp-rust);
    text-decoration: none;
    margin-top: 3px;
    display: inline-block;
}
.fmp-stop__ext:hover { text-decoration: underline; }

.fmp-stop__thumb {
    width: 72px !important;
    height: 72px !important;
    min-width: 72px !important;
    min-height: 72px !important;
    max-width: 72px !important;
    max-height: 72px !important;
    object-fit: cover !important;
    object-position: center !important;
    border-radius: var(--fmp-radius-sm);
    flex-shrink: 0 !important;
    display: block !important;
    overflow: hidden;
}

/* ── Tags ─────────────────────────────────────────────────── */
.fmp-tag {
    display: inline-block;
    font-size: .65rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: 2px 7px;
    border-radius: 10px;
    margin-bottom: 2px;
}

.fmp-tag--market { background: rgba(32,33,37,.08); color: var(--fmp-charcoal); }
.fmp-tag--event  { background: rgba(212,168,71,.2); color: #7A5C0A; }

/* ── Connector ────────────────────────────────────────────── */
.fmp-connector {
    padding: 6px 18px 6px 58px;
    font-size: .75rem;
    color: var(--fmp-warm-grey);
    background: #f9fafb;
}

/* ── Affiliate ────────────────────────────────────────────── */
.fmp-affiliate {
    margin: 0 32px 32px;
    background: var(--fmp-charcoal);
    border-radius: var(--fmp-radius-md);
    padding: 22px;
}

.fmp-affiliate__title {
    font-family: var(--fmp-font-serif);
    color: var(--fmp-white);
    font-size: 1rem;
    margin-bottom: 14px;
}

.fmp-affiliate__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.fmp-affiliate__card {
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: var(--fmp-radius-sm);
    padding: 14px;
    text-align: center;
    text-decoration: none;
    transition: background .18s;
    display: block;
}
.fmp-affiliate__card:hover { background: rgba(255,255,255,.12); }

.fmp-affiliate__icon { font-size: 1.4rem; margin-bottom: 5px; }
.fmp-affiliate__label { font-size: .72rem; color: rgba(255,255,255,.6); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 3px; }
.fmp-affiliate__cta { font-size: .78rem; color: var(--fmp-amber); }

/* ── Responsive ───────────────────────────────────────────── */
@media ( max-width: 640px ) {
    .fmp-form__header,
    .fmp-form__section,
    .fmp-form__actions { padding-left: 20px; padding-right: 20px; }

    .fmp-row--2,
    .fmp-row--3 { grid-template-columns: 1fr; }

    .fmp-results__header { flex-direction: column; }
    .fmp-results__actions { flex-wrap: wrap; }

    .fmp-days { padding: 16px 20px; }

    .fmp-affiliate { margin: 0 20px 24px; }
    .fmp-affiliate__grid { grid-template-columns: 1fr; }

    .fmp-timing-tip { margin: 16px 20px 0; }

    /* ── Mobile form readability ── */

    /* Force 16px base so no iOS font scaling issues */
    #fmp-planner {
        font-size: 16px;
    }

    .fmp-form__title {
        font-size: clamp(1.5rem, 6vw, 2rem);
    }

    .fmp-form__label {
        font-size: .82rem;
        letter-spacing: .06em;
        margin-bottom: 10px;
    }

    .fmp-field input,
    .fmp-field select {
        font-size: 1rem;
        padding: 14px 16px;
    }

    .fmp-field input[type="date"] {
        font-size: 1rem;
        padding: 14px 16px 14px 44px;
    }

    .fmp-input-icon input {
        padding-left: 44px;
    }

    /* Slider label + value */
    .fmp-form__section .fmp-range-wrap {
        margin-top: 4px;
    }

    .fmp-range-val {
        font-size: 1rem;
        min-width: 64px;
    }

    /* Transport/Pace buttons — already good size, just ensure label readable */
    .fmp-transport__label,
    .fmp-pace__label {
        font-size: .72rem;
    }

    /* Results on mobile */
    .fmp-results__title { font-size: 1.1rem; }
    .fmp-results__meta  { font-size: .8rem; }
    .fmp-stop__name     { font-size: .95rem; }
    .fmp-stop__detail   { font-size: .8rem; }
    .fmp-btn.fmp-btn--small { font-size: .82rem; padding: 8px 12px; }
}

/* ── Timezone badge ────────────────────────────────────────── */
.fmp-tz {
    display: inline-block;
    font-size: .65rem;
    font-weight: 600;
    letter-spacing: .04em;
    background: rgba(32,33,37,.07);
    color: var(--fmp-charcoal);
    padding: 1px 5px;
    border-radius: 3px;
    margin-left: 3px;
    vertical-align: middle;
}

/* ── Autocomplete dropdown (Nominatim)  ────────────────────── */
.fmp-autocomplete {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--fmp-white);
    border: 1.5px solid var(--fmp-sand);
    border-top: none;
    border-radius: 0 0 var(--fmp-radius-sm) var(--fmp-radius-sm);
    box-shadow: 0 8px 24px rgba(0,0,0,.10);
    list-style: none;
    margin: 0;
    padding: 4px 0;
    z-index: 9999;
    max-height: 220px;
    overflow-y: auto;
}

.fmp-autocomplete li {
    padding: 9px 14px;
    font-size: .84rem;
    cursor: pointer;
    color: var(--fmp-charcoal);
    border-bottom: 1px solid #e5e7eb;
    transition: background .12s;
    line-height: 1.3;
}

.fmp-autocomplete li:last-child { border-bottom: none; }
.fmp-autocomplete li:hover,
.fmp-autocomplete li.is-active { background: var(--fmp-bg-field); color: var(--fmp-charcoal); }

/* ── MyListing permanent market styles ─────────────────────── */
.fmp-tag--listing {
    background: rgba(32,33,37,.08);
    color: var(--fmp-charcoal);
}

.fmp-stop__num--listing {
    background: var(--fmp-charcoal);
}

.fmp-stop--listing {
    background: rgba(32,33,37,.03);
}

.fmp-stop__tags {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 2px;
}

.fmp-badge--permanent {
    font-size: .65rem;
    color: var(--fmp-warm-grey);
    letter-spacing: .02em;
}

/* ── Source info in results header ─────────────────────────── */
.fmp-source-info {
    font-size: .75rem;
    color: var(--fmp-warm-grey);
    font-style: italic;
}

/* ── Back button in results ─────────────────────────────────── */
.fmp-btn--back {
    background: transparent;
    border: 1.5px solid var(--fmp-sand);
    color: var(--fmp-warm-grey);
}
.fmp-btn--back:hover { border-color: var(--fmp-rust-light); color: var(--fmp-rust); }

/* ── Weather widget  (v1.10) — inline in day header, white outline SVG ── */
.fmp-day__header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.fmp-wx {
    display: flex;
    align-items: center;
    gap: 5px;
    color: rgba(255,255,255,.92);
    white-space: nowrap;
    line-height: 1;
}

/* SVG weather icon — inherits white color from parent */
.fmp-wx-svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: rgba(255,255,255,.9);
    display: inline-block;
    vertical-align: middle;
}

.fmp-wx__temps {
    font-weight: 600;
    font-size: .82rem;
    color: rgba(255,255,255,.95);
    letter-spacing: .01em;
}

/* ── Starting point autocomplete hint ──────────────────────── */
#fmp-start-point::placeholder { font-style: italic; }

/* ── Priority market badge (v1.5) ──────────────────────────── */
.fmp-stop__num--priority {
    background: linear-gradient(135deg, var(--fmp-rust), #c0392b);
    box-shadow: 0 2px 6px rgba(178,71,46,.35);
}

/* ── Popular destinations widget (v1.5) ───────────────────── */
.fmp-popular {
    margin-top: 28px;
    padding: 20px 24px;
    background: var(--fmp-white);
    border: 1.5px solid var(--fmp-sand);
    border-radius: var(--fmp-radius);
}

.fmp-popular__title {
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--fmp-warm-grey);
    margin-bottom: 14px;
}

.fmp-popular__grid {
    display: grid;
    grid-template-columns: repeat( auto-fill, minmax(180px, 1fr) );
    gap: 10px;
}

.fmp-popular__card {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 12px 14px;
    background: var(--fmp-bg-field);
    border: 1.5px solid transparent;
    border-radius: var(--fmp-radius-sm);
    cursor: pointer;
    text-align: left;
    transition: border-color .15s, background .15s, transform .1s;
    font-family: inherit;
}

.fmp-popular__card:hover {
    background: var(--fmp-white);
    border-color: var(--fmp-charcoal);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,.07);
}

.fmp-popular__rank {
    font-size: .65rem;
    font-weight: 700;
    color: var(--fmp-rust);
    letter-spacing: .05em;
}

.fmp-popular__dest {
    font-size: .92rem;
    font-weight: 700;
    color: var(--fmp-charcoal);
    line-height: 1.2;
}

.fmp-popular__meta {
    font-size: .72rem;
    color: var(--fmp-warm-grey);
    margin-top: 2px;
}

.fmp-popular__count {
    font-size: .65rem;
    color: var(--fmp-warm-grey);
    opacity: .7;
    margin-top: 4px;
}

@media (max-width: 480px) {
    .fmp-popular__grid { grid-template-columns: 1fr 1fr; }
}


/* ============================================================
   v1.6b additions
   ============================================================ */

.fmp-btn--gated {
    opacity: .42;
    cursor: not-allowed;
    filter: grayscale(1);
    pointer-events: auto !important;
}
.fmp-btn--saved { background: var(--fmp-bg-field); color: var(--fmp-charcoal); cursor: default; }

.fmp-login-gate {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
    background: var(--fmp-charcoal); color: #fff; padding: 10px 22px;
    border-radius: 30px; font-size: .85rem; z-index: 9999;
    white-space: nowrap; box-shadow: 0 4px 16px rgba(0,0,0,.3);
}
.fmp-login-gate a { color: var(--fmp-amber); text-decoration: underline; }

.fmp-wx { font-size: .78rem; color: #fff; opacity: .92; white-space: nowrap; }
.fmp-wx--na { opacity: .45; font-style: italic; }

.fmp-paywall { margin: 6px 0; border-radius: var(--fmp-radius); background: var(--fmp-bg-field); border: 1.5px solid var(--fmp-sand); }
.fmp-paywall__inner { display: flex; align-items: center; gap: 16px; padding: 20px 24px; flex-wrap: wrap; }
.fmp-paywall__icon { font-size: 1.8rem; flex-shrink: 0; }
.fmp-paywall__text { flex: 1; min-width: 160px; font-size: .9rem; line-height: 1.5; }
.fmp-paywall__actions { display: flex; gap: 10px; flex-wrap: wrap; flex-shrink: 0; }
.fmp-btn--outline { background: none; border: 2px solid var(--fmp-rust); color: var(--fmp-rust); padding: 8px 16px; border-radius: var(--fmp-radius-sm); font-size: .85rem; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-block; transition: background .15s, color .15s; }
.fmp-btn--outline:hover { background: var(--fmp-rust); color: #fff; }

.fmp-day--locked { filter: blur(2.5px); user-select: none; pointer-events: none; opacity: .55; }

.fmp-saved { background: var(--fmp-white); border: 1.5px solid var(--fmp-border); border-radius: var(--fmp-radius); padding: 16px 20px; margin-top: 24px; }
.fmp-saved__title { font-size: .75rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--fmp-warm-grey); margin-bottom: 10px; }
.fmp-saved__list { display: flex; flex-direction: column; gap: 5px; }
.fmp-saved__item { display: flex; align-items: center; gap: 6px; background: var(--fmp-bg-field); border: 1px solid var(--fmp-sand); border-radius: var(--fmp-radius-sm); padding: 2px 6px 2px 12px; }
.fmp-saved__load { flex: 1; display: flex; align-items: baseline; gap: 10px; background: none; border: none; cursor: pointer; padding: 8px 0; text-align: left; font-family: inherit; }
.fmp-saved__name { font-size: .86rem; font-weight: 600; color: var(--fmp-charcoal); transition: color .15s; }
.fmp-saved__load:hover .fmp-saved__name { color: var(--fmp-rust); }
.fmp-saved__meta { font-size: .7rem; color: var(--fmp-warm-grey); white-space: nowrap; }
.fmp-saved__delete { flex-shrink: 0; background: none; border: none; cursor: pointer; color: var(--fmp-warm-grey); font-size: .8rem; padding: 4px 7px; border-radius: 4px; line-height: 1; transition: background .15s, color .15s; }
.fmp-saved__delete:hover { background: #fee2e2; color: #dc2626; }

.fmp-popular__grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; }
@media (max-width: 900px) { .fmp-popular__grid { grid-template-columns: repeat(3,1fr); } }
@media (max-width: 600px) { .fmp-popular__grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 380px) { .fmp-paywall__inner { flex-direction: column; text-align: center; } .fmp-paywall__actions { justify-content: center; } .fmp-saved__meta { display: none; } }


/* ============================================================
   v1.8 — Remove stop button (always visible)
   ============================================================ */

.fmp-stop {
    position: relative;
    padding-right: 110px; /* room for the remove button */
}

.fmp-stop__remove {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    color: #9ca3af;
    font-size: .7rem;
    font-family: inherit;
    font-weight: 500;
    line-height: 1;
    padding: 5px 9px;
    border-radius: 5px;
    white-space: nowrap;
    transition: background .15s, border-color .15s, color .15s;
}

.fmp-stop__remove:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #dc2626;
}

@media (max-width: 520px) {
    .fmp-stop { padding-right: 0; padding-bottom: 36px; }
    .fmp-stop__remove { top: auto; bottom: 10px; right: 10px; transform: none; }
}

/* ============================================================
   v1.8 — Stop remove button (always visible)
   ============================================================ */

.fmp-stop {
    position: relative;
    padding-right: 120px;
}

.fmp-stop__remove {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: none;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    color: #9ca3af;
    font-size: .68rem;
    font-family: inherit;
    font-weight: 500;
    padding: 5px 8px;
    border-radius: 5px;
    white-space: nowrap;
    transition: background .15s, border-color .15s, color .15s;
    line-height: 1;
}

.fmp-stop__remove:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #dc2626;
}

@media (max-width: 520px) {
    .fmp-stop { padding-right: 0; padding-bottom: 38px; }
    .fmp-stop__remove {
        top: auto; bottom: 10px; right: 10px;
        transform: none;
    }
}

/* ============================================================
   v1.9 — Best Season Widget  [fmp_best_season]
   ============================================================ */

.fmp-bs {
    font-family: inherit;
    max-width: 680px;
    margin: 0 auto;
    padding: 28px 24px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
}

.fmp-bs__title {
    margin: 0 0 6px;
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
}

.fmp-bs__subtitle {
    margin: 0 0 18px;
    font-size: .9rem;
    color: #6b7280;
}

.fmp-bs__select-wrap { position: relative; }

.fmp-bs__select {
    width: 100%;
    padding: 10px 14px;
    font-size: .95rem;
    font-family: inherit;
    border: 1.5px solid #d1d5db;
    border-radius: 10px;
    background: #f9fafb;
    color: #111827;
    cursor: pointer;
    appearance: none;
    background-image: 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 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    transition: border-color .2s;
}

.fmp-bs__select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,.12);
}

.fmp-bs__loading {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 24px 0;
    color: #6b7280;
    font-size: .9rem;
}

.fmp-bs__spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid #e5e7eb;
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: fmp-spin .7s linear infinite;
}

/* Best months banner */
.fmp-bs__best {
    margin-top: 24px;
    padding: 18px;
    background: linear-gradient(135deg, #f0f9ff 0%, #fdf4ff 100%);
    border-radius: 12px;
    border: 1px solid #e0e7ff;
}

.fmp-bs__best-label {
    font-size: .85rem;
    color: #6b7280;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
    font-weight: 600;
}

.fmp-bs__best-months {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.fmp-bs__best-month {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #fff;
    border-radius: 10px;
    padding: 12px 16px;
    min-width: 90px;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
    flex: 1;
}

.fmp-bs__medal { font-size: 1.4rem; line-height: 1; margin-bottom: 6px; }
.fmp-bs__month-name { font-weight: 700; font-size: .95rem; color: #111827; }
.fmp-bs__month-count { font-size: .78rem; color: #6b7280; margin-top: 3px; }

/* Bar chart */
.fmp-bs__chart {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 120px;
    margin-top: 24px;
    padding: 0 4px;
    border-bottom: 2px solid #e5e7eb;
}

.fmp-bs__bar-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
    cursor: default;
}

.fmp-bs__bar {
    width: 100%;
    min-height: 4px;
    background: #c7d2fe;
    border-radius: 4px 4px 0 0;
    transition: background .2s;
}

.fmp-bs__bar--best { background: #6366f1; }

.fmp-bs__bar-wrap:hover .fmp-bs__bar { background: #4f46e5; }

.fmp-bs__bar-label {
    font-size: .62rem;
    color: #9ca3af;
    margin-top: 5px;
    text-align: center;
    font-weight: 500;
}

/* Sample events */
.fmp-bs__sample {
    margin-top: 20px;
    padding: 14px 16px;
    background: #f9fafb;
    border-radius: 10px;
    border: 1px solid #f3f4f6;
}

.fmp-bs__sample-label {
    font-size: .8rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 8px;
}

.fmp-bs__sample-list {
    margin: 0;
    padding: 0 0 0 18px;
    font-size: .875rem;
    color: #374151;
    line-height: 1.7;
}

.fmp-bs__error {
    padding: 16px;
    color: #6b7280;
    text-align: center;
    font-size: .9rem;
}

@media (max-width: 480px) {
    .fmp-bs { padding: 20px 16px; }
    .fmp-bs__best-months { gap: 8px; }
    .fmp-bs__best-month { min-width: 70px; padding: 10px 12px; }
    .fmp-bs__chart { gap: 3px; }
    .fmp-bs__bar-label { font-size: .55rem; }
}

/* ============================================================
   v1.10 — Custom PNG icons
   ============================================================ */

/* Transport / Pace selector button icons */
.fmp-opt__icon {
    width: 22px;
    height: 22px;
    display: block;
    margin: 0 auto 4px;
    object-fit: contain;
}

/* Small action button icons (Maps / Share / Save) */
.fmp-btn__icon {
    width: 15px;
    height: 15px;
    vertical-align: middle;
    margin-right: 5px;
    object-fit: contain;
    display: inline-block;
}

/* Affiliate card hotel icon */
.fmp-aff__icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

/* Free day — activities link */
.fmp-day__activities-link {
    display: inline-block;
    margin-left: 6px;
    color: inherit;
    opacity: 0.75;
    font-size: 0.85em;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: opacity 0.15s;
}
.fmp-day__activities-link:hover { opacity: 1; }

/* Rate limit error upgrade link */
.fmp-error__upgrade-link {
    display: inline-block;
    margin-top: 6px;
    font-weight: 600;
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ============================================================
   v1.16.3 — Print styles
   ============================================================ */

/* @media print intentionally removed — printing handled via popup window in JS */

/* ============================================================
   v1.19 — Listing Widget  [fmp_listing_widget] + [fmp_listing_widget_sidebar]
   Light C palette: #f7fbff bg · #1e73be accent · #242429 text
   ============================================================ */

/* ── Shared base ── */
.fmp-lw {
    font-family: var(--fmp-font-body);
    position: relative;
    overflow: hidden;
}

/* ── Full-width banner ── */
.fmp-lw--full {
    background: #f7fbff;
    border-left: 4px solid #1e73be;
    padding: 22px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.fmp-lw__left {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 1;
    min-width: 0;
}

.fmp-lw__icon {
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fmp-lw__icon img {
    width: 42px;
    height: 42px;
    display: block;
}

.fmp-lw__icon--sidebar {
    width: auto;
    height: auto;
    margin-bottom: 10px;
}

.fmp-lw__icon--sidebar img {
    width: 38px;
    height: 38px;
}

.fmp-lw__eyebrow {
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: #1a5f9e;
    margin-bottom: 4px;
}

.fmp-lw__headline {
    font-family: var(--fmp-font-serif);
    font-size: 1.05rem;
    font-weight: 400;
    color: #242429;
    line-height: 1.3;
    margin-bottom: 4px;
}

.fmp-lw__headline em {
    color: #1e73be;
    font-style: italic;
}

.fmp-lw__sub {
    font-size: .85rem;
    color: #6b7280;
    line-height: 1.45;
}

/* ── CTA button ── */
.fmp-lw__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    background: #1e73be;
    color: #fff !important;
    font-family: var(--fmp-font-body);
    /* font-size intentionally unset — inherits theme default (~1rem) */
    font-weight: 500;
    padding: 11px 24px;
    border-radius: 980px;
    text-decoration: none !important;
    letter-spacing: .01em;
    position: relative;
    overflow: hidden;
    transition: background .15s, transform .15s, box-shadow .15s;
    box-shadow: 0 2px 8px rgba(30,115,190,.22);
    white-space: nowrap;
    z-index: 1;
}

/* Shimmer sweep — desktop hover */
.fmp-lw__cta::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 55%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.18), transparent);
    transition: left .4s ease;
    pointer-events: none;
}

.fmp-lw__cta:hover {
    background: #2580cc;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(30,115,190,.35);
}

.fmp-lw__cta:hover::after {
    left: 160%;
}

/* Arrow slide — desktop hover */
.fmp-lw__cta svg {
    transition: transform .22s cubic-bezier(.34, 1.56, .64, 1);
    flex-shrink: 0;
}

.fmp-lw__cta:hover svg {
    transform: translateX(4px);
}

/* Arrow bounce — mobile (no hover) */
@keyframes fmp-arrow-bounce {
    0%, 100% { transform: translateX(0); }
    50%       { transform: translateX(4px); }
}

@media (hover: none) {
    .fmp-lw__cta::after { display: none; }
    .fmp-lw__cta:hover  { transform: none; }
    .fmp-lw__cta svg    { animation: fmp-arrow-bounce 1.5s ease-in-out infinite; }
}

/* ── Sidebar variant ── */
.fmp-lw--sidebar {
    background: #f7fbff;
    border: 1px solid #ddeaf6;
    border-left: 3px solid #1e73be;
    border-radius: 8px;
    overflow: hidden;
}

.fmp-lw__body {
    padding: 18px 18px 14px;
}

.fmp-lw--sidebar .fmp-lw__eyebrow {
    margin-bottom: 10px;
}

.fmp-lw--sidebar .fmp-lw__headline {
    font-size: .97rem;
    margin-bottom: 6px;
}

.fmp-lw--sidebar .fmp-lw__sub {
    font-size: .85rem;
}

.fmp-lw__footer {
    padding: 12px 18px;
    border-top: 1px solid #ddeaf6;
    background: rgba(30,115,190,.03);
}

.fmp-lw--sidebar .fmp-lw__cta {
    width: 100%;
    justify-content: center;
}

/* ── Mobile responsive ── */
@media (max-width: 640px) {
    .fmp-lw--full {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        padding: 18px 20px;
    }

    .fmp-lw--full .fmp-lw__cta {
        width: 100%;
        justify-content: center;
    }

    .fmp-lw__headline { font-size: .97rem; }
}
