/*
 * Page-editor content blocks (fleet-page-editor#30): accordion, map, post list,
 * fleet carousel. Colours only through the tenant's --fleet-* tokens, with
 * neutral fallbacks. Tenant pages carry no theme armour, so every interactive
 * state (resting, hover, focus-visible) is declared here, never inherited.
 */

/* ---------------- accordion ---------------- */
.ff-accordion {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ff-accordion__item {
    border: 1px solid var(--fleet-border-color, #dcdcde);
    border-radius: 8px;
    background: var(--fleet-card-background, #fff);
    color: var(--fleet-card-text, var(--fleet-text-dark, #1d2327));
    overflow: hidden;
}
.ff-accordion__title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    cursor: pointer;
    list-style: none;
    background: transparent;
    color: inherit;
}
.ff-accordion__title::-webkit-details-marker { display: none; }
.ff-accordion__title:hover { background: color-mix(in srgb, var(--fleet-primary-color, #2271b1) 8%, transparent); }
.ff-accordion__title:focus-visible {
    outline: 2px solid var(--fleet-primary-color, #2271b1);
    outline-offset: -2px;
}
.ff-accordion__heading {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.3;
    color: inherit;
}
.ff-accordion__icon {
    flex: 0 0 auto;
    width: 10px;
    height: 10px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform .2s ease;
}
.ff-accordion__item[open] > .ff-accordion__title .ff-accordion__icon { transform: rotate(-135deg); }
.ff-accordion__content {
    padding: 0 18px 16px;
}
.ff-accordion__content > :last-child { margin-bottom: 0; }
/* The page's own wpautop runs before shortcodes, so an accordion written inline
   (`<div>[ff_accordion]…[/ff_accordion]</div>`) is followed by an orphan </p>,
   which the browser turns into an empty paragraph. It is never content. (#40) */
.ff-accordion + p:empty { display: none; }
/* icon="plusminus" (#40): Elementor nested-accordion's default fa-plus / fa-minus.
   Size and colour are tokens so a page sets them without re-drawing the icon. */
.ff-accordion__icon--plusminus {
    display: inline-flex;
    align-items: center;
    width: auto;
    height: auto;
    border: 0;
    transform: none;
    transition: none;
    font-size: var(--ff-accordion-icon-size, 15px);
    color: var(--ff-accordion-icon-color, currentColor);
}
.ff-accordion__item[open] > .ff-accordion__title .ff-accordion__icon--plusminus { transform: none; }
.ff-accordion__icon--plusminus svg {
    display: block;
    width: .875em;
    height: 1em;
    fill: currentColor;
}
.ff-accordion__icon--plusminus .ff-accordion__minus,
.ff-accordion__item[open] > .ff-accordion__title .ff-accordion__plus { display: none; }
.ff-accordion__item[open] > .ff-accordion__title .ff-accordion__minus { display: block; }
/* animation="…" (#40): content.js sets the height; the transition is its duration. */
.ff-accordion__item.is-animating > .ff-accordion__content { overflow: hidden; }

/* ---------------- map ---------------- */
.ff-map {
    width: 100%;
    height: var(--ff-map-height, 378px);
    border-radius: 8px;
    overflow: hidden;
    background: var(--fleet-card-background, #f0f0f1);
}
.ff-map__gate {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    height: 100%;
    padding: 20px;
    box-sizing: border-box;
    text-align: center;
    color: var(--fleet-card-text, var(--fleet-text-dark, #1d2327));
}
.ff-map__note {
    max-width: 420px;
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
}
/* A bare <button> on a tenant page: every state declared, and the --ff-btn-*
   tokens set at the same values, so a theme's button:hover cannot repaint it. */
.ff-map .ff-map__load,
.ff-map .ff-map__load:hover,
.ff-map .ff-map__load:focus,
.ff-map .ff-map__load:active {
    padding: 10px 22px;
    border: 0;
    border-radius: 20px;
    background: var(--fleet-primary-color, #2271b1);
    color: var(--fleet-button-text-color, #fff);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    box-shadow: none;
    --ff-btn-bg: var(--fleet-primary-color, #2271b1);
    --ff-btn-bg-hover: var(--fleet-primary-color, #2271b1);
    --ff-btn-fg: var(--fleet-button-text-color, #fff);
    --ff-btn-fg-hover: var(--fleet-button-text-color, #fff);
    --ff-btn-border-width: 0;
}
.ff-map .ff-map__load:focus-visible {
    outline: 2px solid var(--fleet-primary-color, #2271b1);
    outline-offset: 3px;
}
.ff-map__open {
    font-size: 14px;
    color: inherit;
    text-decoration: underline;
}
.ff-map__frame {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ---------------- post list ----------------
 * Card styling attributes arrive as --ff-post-* properties on .ff-post-list;
 * every fallback below is the look a list has without them. */
.ff-post-list__grid {
    display: grid;
    grid-template-columns: repeat(var(--ff-post-cols, 2), minmax(0, 1fr));
    gap: var(--ff-post-row-gap, 30px) var(--ff-post-gap, 30px);
}
@media (max-width: 767px) {
    .ff-post-list__grid { grid-template-columns: minmax(0, 1fr); }
}
.ff-post-card {
    display: flex;
    flex-direction: column;
    gap: var(--ff-post-image-spacing, 12px);
    min-width: 0;
}
.ff-post-card__media { display: block; }
.ff-post-card__img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 10px;
}
.ff-post-card__title {
    margin: 0 0 var(--ff-post-title-spacing, 0);
    font-size: var(--ff-post-title-size, 1.2rem);
    line-height: 1.3;
}
.ff-post-card__title a {
    color: var(--ff-post-title-color, var(--fleet-text-dark, #1d2327));
    text-decoration: none;
}
.ff-post-card__more {
    color: var(--fleet-text-dark, #1d2327);
    text-decoration: none;
}
.ff-post-card__title a:hover,
.ff-post-card__title a:focus-visible,
.ff-post-card__more:hover,
.ff-post-card__more:focus-visible {
    color: var(--fleet-primary-color, #2271b1);
    text-decoration: underline;
}
.ff-post-card__meta {
    margin: 0;
    font-size: var(--ff-post-meta-size, .85rem);
    color: var(--ff-post-meta-color, var(--fleet-text-light, #646970));
}
/* Weight and family have no neutral fallback (the theme's own value is today's look),
 * so they apply only when the attribute set the property. */
.ff-post-list[style*="--ff-post-title-weight"] .ff-post-card__title { font-weight: var(--ff-post-title-weight); }
.ff-post-list[style*="--ff-post-meta-font"] .ff-post-card__meta { font-family: var(--ff-post-meta-font); }
/* image_ratio: every image cropped to one height ÷ width, as Elementor's Posts widget does. */
.ff-post-list--cropped .ff-post-card__img {
    aspect-ratio: 1 / var(--ff-post-ratio);
    object-fit: cover;
}
@media (max-width: 767px) {
    .ff-post-list--cropped .ff-post-card__img { aspect-ratio: 1 / var(--ff-post-ratio-mobile, var(--ff-post-ratio)); }
}
.ff-post-card__excerpt { margin: 0; }
.ff-post-list__pager {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 30px;
}
.ff-post-list__prev,
.ff-post-list__next {
    color: var(--fleet-primary-color, #2271b1);
    text-decoration: none;
    font-weight: 600;
}
.ff-post-list__next { margin-left: auto; }
.ff-post-list__prev:hover, .ff-post-list__prev:focus-visible,
.ff-post-list__next:hover, .ff-post-list__next:focus-visible { text-decoration: underline; }

/* ---------------- fleet carousel ---------------- */
.ff-fleet-carousel { position: relative; }
.ff-fleet-carousel__track {
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0 0 4px;
    list-style: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
}
.ff-fleet-carousel__track::-webkit-scrollbar { display: none; }
.ff-fleet-carousel__track:focus-visible {
    outline: 2px solid var(--fleet-primary-color, #2271b1);
    outline-offset: 4px;
}
.ff-fleet-carousel__slide {
    flex: 0 0 calc((100% - 40px) / 3);
    scroll-snap-align: start;
    margin: 0;
}
@media (max-width: 1024px) { .ff-fleet-carousel__slide { flex-basis: calc((100% - 20px) / 2); } }
@media (max-width: 767px)  { .ff-fleet-carousel__slide { flex-basis: 85%; } }
.ff-fleet-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    color: var(--fleet-text-dark, #1d2327);
    text-decoration: none;
}
.ff-fleet-card:hover .ff-fleet-card__title,
.ff-fleet-card:focus-visible .ff-fleet-card__title { color: var(--fleet-primary-color, #2271b1); }
.ff-fleet-card:focus-visible { outline: 2px solid var(--fleet-primary-color, #2271b1); outline-offset: 4px; }
.ff-fleet-card__img {
    display: block;
    width: 100%;
    /* WordPress prints width/height attributes on the <img>; without this the
       height attribute wins and aspect-ratio never applies (measured: a portrait
       card at 375px). */
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 10px;
    background: var(--fleet-card-background, #f0f0f1);
}
.ff-fleet-card__title {
    font-weight: 600;
    font-size: 1.05rem;
    line-height: 1.3;
}

/* Dots and arrows are buttons on a tenant page: every state declared. */
.ff-fleet-carousel__dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}
.ff-fleet-carousel__dot,
.ff-fleet-carousel__dot:hover,
.ff-fleet-carousel__dot:focus,
.ff-fleet-carousel__dot:active {
    width: 10px;
    height: 10px;
    min-width: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--fleet-border-color, #c3c4c7);
    box-shadow: none;
    cursor: pointer;
}
.ff-fleet-carousel__dot[aria-current="true"] { background: var(--fleet-primary-color, #2271b1); }
.ff-fleet-carousel__dot:focus-visible { outline: 2px solid var(--fleet-primary-color, #2271b1); outline-offset: 2px; }
.ff-fleet-carousel__arrow,
.ff-fleet-carousel__arrow:hover,
.ff-fleet-carousel__arrow:focus,
.ff-fleet-carousel__arrow:active {
    position: absolute;
    top: 38%;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--fleet-border-color, #dcdcde);
    border-radius: 50%;
    background: var(--fleet-card-background, #fff);
    color: var(--fleet-text-dark, #1d2327);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    box-shadow: none;
}
.ff-fleet-carousel__arrow:hover { border-color: var(--fleet-primary-color, #2271b1); color: var(--fleet-primary-color, #2271b1); }
.ff-fleet-carousel__arrow:focus-visible { outline: 2px solid var(--fleet-primary-color, #2271b1); outline-offset: 2px; }
.ff-fleet-carousel__arrow--prev { left: -12px; }
.ff-fleet-carousel__arrow--next { right: -12px; }

/* ---------------- fleet listing (grid) ---------------- */
.ff-fleet-listing__grid {
    display: grid;
    grid-template-columns: repeat(var(--ff-fleet-cols, 3), minmax(0, 1fr));
    gap: 30px;
}
@media (max-width: 1024px) { .ff-fleet-listing__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px)  { .ff-fleet-listing__grid { grid-template-columns: minmax(0, 1fr); } }
.ff-fleet-listing__card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}
.ff-fleet-card__features {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.ff-fleet-card__features li {
    padding: 3px 8px;
    border: 1px solid var(--fleet-border-color, #dcdcde);
    border-radius: 999px;
    font-size: .8rem;
    color: var(--fleet-text-light, #646970);
}
.ff-fleet-card__details-toggle {
    cursor: pointer;
    color: var(--fleet-primary-color, #2271b1);
    font-weight: 600;
    list-style: none;
}
.ff-fleet-card__details-toggle::-webkit-details-marker { display: none; }
.ff-fleet-card__details-toggle:hover { text-decoration: underline; }
.ff-fleet-card__details-toggle:focus-visible { outline: 2px solid var(--fleet-primary-color, #2271b1); outline-offset: 2px; }
.ff-fleet-card__details-body { padding-top: 8px; }
.ff-fleet-card__details-body > :last-child { margin-bottom: 0; }

/*
 * The offer and details buttons: links styled as buttons, every state declared.
 *
 * TOKENS, NOT PER-STATE PAINT (fleet-page-editor#38, the theme-armour contract).
 * Each colour reads an `--ff-btn-*` token first and falls back to the value #30
 * shipped, so with no token set nothing changes. A page restyles a button by
 * setting tokens — `--ff-btn-bg`, `--ff-btn-bg-image`, `--ff-btn-fg`,
 * `--ff-btn-border` and their `-hover` twins — never by re-declaring
 * `background` per state, which is how a forgotten state gets repainted by the
 * tenant theme (hello-elementor paints `a:hover` at 0-1-1; these rules are
 * 0-2-0 and above).
 *
 * THE HOVER IS THE TENANT'S PRIMARY-BUTTON HOVER (fleet-page-editor#41, Ethan
 * 2026-09-26: "the same as the primary buttons in the FleetForm dashboard"). With
 * no -hover token set, both buttons hover exactly as fleetform-core's admin theme
 * paints `.button-primary:hover`: linear-gradient(to right, --button-gradient-start,
 * --primary-color), --button-text-color, a --primary-color border. Those aliases
 * are read first so the result is identical wherever the admin theme is loaded;
 * the --fleet-* tenant variables and the theme's own defaults stand in where it
 * is not.
 */
.ff-fleet-card__offer,
.ff-fleet-card__offer:visited {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    min-height: 44px;
    padding: 10px 22px;
    white-space: nowrap;
    box-sizing: border-box;   /* min-height is the whole 44px target, not 44px + padding */
    border: 1px solid var(--ff-btn-border, var(--fleet-primary-color, #2271b1));
    border-radius: 6px;
    background-color: var(--ff-btn-bg, var(--fleet-primary-color, #2271b1));
    background-image: var(--ff-btn-bg-image, none);
    color: var(--ff-btn-fg, var(--fleet-on-primary, #fff));
    font-weight: 600;
    text-decoration: none;
}
.ff-fleet-card__offer:hover {
    background-color: var(--ff-btn-bg-hover, var(--primary-color, var(--fleet-primary-color, #e0a241)));
    background-image: var(--ff-btn-bg-image-hover, linear-gradient(to right, var(--button-gradient-start, var(--fleet-button-gradient-start, #e0a241)), var(--primary-color, var(--fleet-primary-color, #e0a241))));
    border-color: var(--ff-btn-border-hover, var(--primary-color, var(--fleet-primary-color, #e0a241)));
    color: var(--ff-btn-fg-hover, var(--button-text-color, var(--fleet-button-text-color, #000000)));
    text-decoration: none;
}
.ff-fleet-card__offer:focus-visible {
    outline: 2px solid var(--fleet-primary-color, #2271b1);
    outline-offset: 2px;
    color: var(--ff-btn-fg, var(--fleet-on-primary, #fff));
}

/* details="modal": the opener. A secondary button — outline at rest, filled on hover. */
.ff-fleet-card__details-open,
.ff-fleet-card__details-open:visited {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    min-height: 44px;
    padding: 10px 22px;
    box-sizing: border-box;
    border: 1px solid var(--ff-btn-border, var(--fleet-primary-color, #2271b1));
    border-radius: 6px;
    background-color: var(--ff-btn-bg, transparent);
    background-image: var(--ff-btn-bg-image, none);
    color: var(--ff-btn-fg, var(--fleet-primary-color, #2271b1));
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}
.ff-fleet-card__details-open:hover,
.ff-fleet-card__details-open:focus-visible {
    background-color: var(--ff-btn-bg-hover, var(--primary-color, var(--fleet-primary-color, #e0a241)));
    background-image: var(--ff-btn-bg-image-hover, linear-gradient(to right, var(--button-gradient-start, var(--fleet-button-gradient-start, #e0a241)), var(--primary-color, var(--fleet-primary-color, #e0a241))));
    border-color: var(--ff-btn-border-hover, var(--primary-color, var(--fleet-primary-color, #e0a241)));
    color: var(--ff-btn-fg-hover, var(--button-text-color, var(--fleet-button-text-color, #000000)));
    text-decoration: none;
}
.ff-fleet-card__details-open:focus-visible { outline: 2px solid var(--fleet-primary-color, #2271b1); outline-offset: 2px; }

/* Signed-in staff see the site under fleet-form's admin theme, which paints EVERY
   link's colour — `body.admin-theme-enabled a` at 0-1-2 and its :hover at 0-2-2 —
   and both beat the one-class rules above: measured on /buy-vehicles/ signed in,
   the labels turned the tenant's gold on a gold pill (#41). The label colours are
   restated one class heavier (0-2-0 at rest, 0-3-0 on hover), same values. */
.ff-fleet-listing .ff-fleet-card__offer,
.ff-fleet-listing .ff-fleet-card__offer:visited { color: var(--ff-btn-fg, var(--fleet-on-primary, #fff)); }
.ff-fleet-listing .ff-fleet-card__details-open,
.ff-fleet-listing .ff-fleet-card__details-open:visited { color: var(--ff-btn-fg, var(--fleet-primary-color, #2271b1)); }
.ff-fleet-listing .ff-fleet-card__offer:hover,
.ff-fleet-listing .ff-fleet-card__details-open:is(:hover, :focus-visible) { color: var(--ff-btn-fg-hover, var(--button-text-color, var(--fleet-button-text-color, #000000))); }

/* features="icons": fleet-form's own list, inside our wrapper. Its inline styles
   set layout and colour; this only undoes the name-pill look above. */
.ff-fleet-card__features--icons { display: block; }
.ff-fleet-card__features--icons li { padding: 0; border: 0; border-radius: 0; font-size: inherit; }

/* details="modal": the dialog. Shown by content.js ([data-open]) or, with no
   script, by :target — its opener is a link to its id. */
.ff-fleet-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100000;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}
.ff-fleet-modal[data-open],
.ff-fleet-modal:target { display: flex; }
.ff-fleet-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .6);
}
.ff-fleet-modal__panel {
    position: relative;
    width: 100%;
    max-width: 720px;
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    padding: 28px 24px 24px;
    box-sizing: border-box;
    border-radius: 12px;
    background: var(--fleet-card-background, #fff);
    color: var(--fleet-card-text, var(--fleet-text-dark, #1d2327));
}
/* content.js focuses the panel itself on open (tabindex="-1"): it is a landing
   spot, not a control, so it draws no focus ring in any browser. */
.ff-fleet-modal .ff-fleet-modal__panel:focus,
.ff-fleet-modal .ff-fleet-modal__panel:focus-visible { outline: none; }
.ff-fleet-modal__title { margin: 0 40px 16px 0; font-size: 1.6rem; line-height: 1.25; }
.ff-fleet-modal__img { display: block; width: 100%; height: auto; border-radius: 8px; }
.ff-fleet-modal__facts { display: flex; flex-direction: column; gap: 6px; margin: 16px 0 0; padding: 0; list-style: none; }
.ff-fleet-modal__fact { display: flex; align-items: center; gap: 10px; font-size: 1.05rem; }
.ff-fleet-modal__fact i { width: 1.2em; text-align: center; color: var(--fleet-primary-color, #2271b1); }
.ff-fleet-modal__heading { margin: 20px 0 10px; font-size: 1.2rem; }
.ff-fleet-modal__description { margin: 0; }
.ff-fleet-modal__description p { margin: 0 0 0.8em; }
.ff-fleet-modal__description p:last-child { margin-bottom: 0; }
.ff-fleet-modal__actions { display: flex; justify-content: flex-end; margin-top: 20px; }
.ff-fleet-modal__actions .ff-fleet-card__offer { align-self: auto; }
/* The close control IS a <button>: the theme's `[type=button]:hover` is 0-2-0 and
   loads after us, so a tie goes to the theme. These are 0-3-0, every state.
   It has TOKENS OF ITS OWN (--ff-close-*, #41): it is not one of the listing's
   buttons, and reading --ff-btn-* let a page's primary-button paint reach it. */
.ff-fleet-modal .ff-fleet-modal__panel .ff-fleet-modal__close,
.ff-fleet-modal .ff-fleet-modal__panel .ff-fleet-modal__close:hover,
.ff-fleet-modal .ff-fleet-modal__panel .ff-fleet-modal__close:focus,
.ff-fleet-modal .ff-fleet-modal__panel .ff-fleet-modal__close:active {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    min-width: 0;
    padding: 0;
    border: 0;
    border-radius: var(--ff-close-radius, 8px);
    background-color: var(--ff-close-bg, transparent);
    background-image: none;
    color: var(--ff-close-fg, currentColor);
    font-size: 28px;
    line-height: 1;
    box-shadow: none;
    cursor: pointer;
    transition: var(--ff-close-transition, none);
}
.ff-fleet-modal .ff-fleet-modal__panel .ff-fleet-modal__close:hover,
.ff-fleet-modal .ff-fleet-modal__panel .ff-fleet-modal__close:focus-visible {
    background-color: var(--ff-close-bg-hover, rgba(0, 0, 0, .08));
    color: var(--ff-close-fg-hover, var(--ff-close-fg, currentColor));
}
/* The ring can sit INSIDE the control (a negative --ff-close-ring-offset): a
   close button tucked into the panel's corner would otherwise have its ring cut
   off by the panel edge. */
.ff-fleet-modal .ff-fleet-modal__panel .ff-fleet-modal__close:focus-visible { outline: 2px solid var(--ff-close-ring, var(--fleet-primary-color, #2271b1)); outline-offset: var(--ff-close-ring-offset, 2px); }
html.ff-dialog-open { overflow: hidden; }

/*
 * ---------------- listing motion (fleet-page-editor#41) ----------------
 * Every rule below is scoped to a class [ff_fleet_listing] prints ONLY when its
 * motion option is set, so a listing without them renders exactly as before.
 * Durations and curves are tokens: a page retunes them without a new rule.
 */

/* card_hover="lift" — the /fleet/ grid card's hover, value for value
   (fleet-form assets/css/fleet-grid.css, .fleetform-vehicle-card): rise 4px,
   a 0 8px 20px glow in the primary colour at 30% (#D5A040 there, hard-coded;
   the tenant's --fleet-primary-color here), the image zooms 5%, all .3s ease. */
.ff-fleet-listing--card-lift .ff-fleet-listing__card {
    transition:
        transform var(--ff-card-hover-duration, .3s) var(--ff-card-hover-easing, ease),
        box-shadow var(--ff-card-hover-duration, .3s) var(--ff-card-hover-easing, ease);
}
.ff-fleet-listing--card-lift .ff-fleet-listing__card:hover {
    transform: var(--ff-card-hover-transform, translateY(-4px));
    box-shadow: var(--ff-card-hover-shadow, 0 8px 20px color-mix(in srgb, var(--fleet-primary-color, #D5A040) 30%, transparent));
}
.ff-fleet-listing--card-lift .ff-fleet-card__img {
    transition: transform var(--ff-card-hover-duration, .3s) var(--ff-card-hover-easing, ease);
}
.ff-fleet-listing--card-lift .ff-fleet-listing__card:hover .ff-fleet-card__img {
    transform: var(--ff-card-hover-img-transform, scale(1.05));
}
/* A transformed card would become the containing block of its own position:fixed
   dialog (the dialog lives inside the card), so while the dialog is up the card
   drops its transform AT ONCE — a transition would leave the dialog pinned to
   the card for .3s. */
.ff-fleet-listing--card-lift .ff-fleet-listing__card:has(.ff-fleet-modal:is([data-open], [data-closing], :target)) {
    transform: none;
    transition: none;
}

/* button_hover="ease" — the buttons move as the dashboard's primary buttons do
   (fleetform-core admin theme, .button-primary: transform/box-shadow .2s
   ease-in-out, 2px up on hover). A background IMAGE (the gradient pill) cannot be
   transitioned, so the hover paint is a layer (::before) that fades in over the
   resting paint, which stays put underneath; the label sits above both. The
   layer paints the same tenant hover as the rules above. */
.ff-fleet-listing--btn-ease .ff-fleet-card__details-open,
.ff-fleet-listing--btn-ease .ff-fleet-card__offer {
    position: relative;
    isolation: isolate;
    transition:
        transform var(--ff-btn-duration, .2s) var(--ff-btn-easing, ease-in-out),
        color var(--ff-btn-duration, .2s) var(--ff-btn-easing, ease-in-out),
        border-color var(--ff-btn-duration, .2s) var(--ff-btn-easing, ease-in-out),
        box-shadow var(--ff-btn-duration, .2s) var(--ff-btn-easing, ease-in-out);
}
.ff-fleet-listing--btn-ease .ff-fleet-card__details-open::before,
.ff-fleet-listing--btn-ease .ff-fleet-card__offer::before {
    content: "";
    position: absolute;
    inset: -1px;              /* over the 1px border too, as the resting paint is */
    z-index: -1;
    border-radius: inherit;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--ff-btn-duration, .2s) var(--ff-btn-easing, ease-in-out);
}
.ff-fleet-listing--btn-ease .ff-fleet-card__details-open::before,
.ff-fleet-listing--btn-ease .ff-fleet-card__offer::before {
    background-color: var(--ff-btn-bg-hover, var(--primary-color, var(--fleet-primary-color, #e0a241)));
    background-image: var(--ff-btn-bg-image-hover, linear-gradient(to right, var(--button-gradient-start, var(--fleet-button-gradient-start, #e0a241)), var(--primary-color, var(--fleet-primary-color, #e0a241))));
}
.ff-fleet-listing--btn-ease .ff-fleet-card__details-open:is(:hover, :focus-visible)::before,
.ff-fleet-listing--btn-ease .ff-fleet-card__offer:is(:hover, :focus-visible)::before { opacity: 1; }
/* The resting paint stays under the layer while it fades in. */
.ff-fleet-listing--btn-ease .ff-fleet-card__details-open:is(:hover, :focus-visible) {
    background-color: var(--ff-btn-bg, transparent);
    background-image: var(--ff-btn-bg-image, none);
    transform: translateY(var(--ff-btn-hover-lift, -2px));
}
.ff-fleet-listing--btn-ease .ff-fleet-card__offer:is(:hover, :focus-visible) {
    background-color: var(--ff-btn-bg, var(--fleet-primary-color, #2271b1));
    background-image: var(--ff-btn-bg-image, none);
    transform: translateY(var(--ff-btn-hover-lift, -2px));
}

/* details_motion="up|down|left|right" — Elementor's off-canvas entrance (production:
   fadeInUp on a full-viewport layer, 1.5s, the keyframes' default `ease`), played
   backwards on close exactly as Elementor does (`animated reverse`). The overlay
   does not animate: it is there at once and stays until the panel has gone.
   content.js holds [data-closing] until the close animation ends. */
.ff-fleet-listing--details-up    { --ff-modal-from: translate3d(0, 100vh, 0); }
.ff-fleet-listing--details-down  { --ff-modal-from: translate3d(0, -100vh, 0); }
.ff-fleet-listing--details-left  { --ff-modal-from: translate3d(-100vw, 0, 0); }
.ff-fleet-listing--details-right { --ff-modal-from: translate3d(100vw, 0, 0); }
@keyframes ff-modal-in  { from { opacity: 0; transform: var(--ff-modal-from); } to { opacity: 1; transform: none; } }
/* The same keyframes under a second name: re-using one name would not restart it. */
@keyframes ff-modal-out { from { opacity: 0; transform: var(--ff-modal-from); } to { opacity: 1; transform: none; } }
.ff-fleet-modal[data-closing] { display: flex; }
.ff-fleet-listing:is(.ff-fleet-listing--details-up, .ff-fleet-listing--details-down, .ff-fleet-listing--details-left, .ff-fleet-listing--details-right) .ff-fleet-modal:is([data-open], :target) .ff-fleet-modal__panel {
    animation: ff-modal-in var(--ff-modal-speed, 1.5s) var(--ff-modal-easing, ease) both;
}
.ff-fleet-listing:is(.ff-fleet-listing--details-up, .ff-fleet-listing--details-down, .ff-fleet-listing--details-left, .ff-fleet-listing--details-right) .ff-fleet-modal[data-closing] .ff-fleet-modal__panel {
    animation: ff-modal-out var(--ff-modal-speed, 1.5s) var(--ff-modal-easing, ease) reverse both;
}

@media (prefers-reduced-motion: reduce) {
    .ff-fleet-listing--card-lift .ff-fleet-listing__card,
    .ff-fleet-listing--card-lift .ff-fleet-card__img,
    .ff-fleet-listing--btn-ease .ff-fleet-card__details-open,
    .ff-fleet-listing--btn-ease .ff-fleet-card__offer,
    .ff-fleet-listing--btn-ease .ff-fleet-card__details-open::before,
    .ff-fleet-listing--btn-ease .ff-fleet-card__offer::before { transition: none; }
    .ff-fleet-listing--card-lift .ff-fleet-listing__card:hover,
    .ff-fleet-listing--card-lift .ff-fleet-listing__card:hover .ff-fleet-card__img,
    .ff-fleet-listing--btn-ease .ff-fleet-card__details-open:is(:hover, :focus-visible),
    .ff-fleet-listing--btn-ease .ff-fleet-card__offer:is(:hover, :focus-visible) { transform: none; }
    /* Same selectors as the animation rules, so the override matches them in weight. */
    .ff-fleet-listing:is(.ff-fleet-listing--details-up, .ff-fleet-listing--details-down, .ff-fleet-listing--details-left, .ff-fleet-listing--details-right) .ff-fleet-modal:is([data-open], :target) .ff-fleet-modal__panel,
    .ff-fleet-listing:is(.ff-fleet-listing--details-up, .ff-fleet-listing--details-down, .ff-fleet-listing--details-left, .ff-fleet-listing--details-right) .ff-fleet-modal[data-closing] .ff-fleet-modal__panel { animation: none; }
}
.ff-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
