/* Website (Code)/public/assets/css/rental-v4.css
   v1  ·  2026-10-28 MYT

   /rental-v4: on top of v2.css and rental-v3.css (the hero, heads, proof, steps, close and "more ways" are v3's):
   the six trip cards, the finder (class chips, date / brand / sort fields, the live result cards), and the phone
   bar that keeps "Find your car" in reach. Every class here starts r4-. */

/* The hero picture settles in slowly (off under reduced motion). */
@media (prefers-reduced-motion: no-preference) {
    .r4 .r3-hero__img { animation: r4-settle 2.4s var(--ease-out) both; }
    @keyframes r4-settle { from { transform: scale(1.06); opacity: 0; } 30% { opacity: 1; } to { transform: none; opacity: 1; } }
}

/* The live price inside the hero's trust line is not one of its "·" separators. */
.r3-hero__trust [data-from] { margin-inline: 0; }

/* Buttons and links that set their own display still hide when told to. */
.r4 [hidden] { display: none !important; }

.r4-btn--ghost { background: none; color: var(--link); box-shadow: inset 0 0 0 1px var(--link); }
.r4-btn--ghost:hover { background: var(--link); color: var(--white); }

/* ── 2 · Where are you headed?: six square trip cards (a 3 × 2 grid; a swipe row on phones) ── */

.r4-occs {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap);
    width: var(--w); margin-inline: auto;
}
.r4-occ a {
    position: relative; display: block; overflow: hidden;
    aspect-ratio: 1; border-radius: 28px; background: var(--ink); color: var(--white);
}
.r4-occ img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease-out); }
.r4-occ a:hover img { transform: scale(1.04); }
.r4-occ a::after {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, .7) 100%);
}
.r4-occ__copy { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; display: flex; flex-direction: column; padding: 28px 30px; }
.r4-occ__title { font-size: 28px; line-height: 1.14286; font-weight: 600; letter-spacing: .007em; }
.r4-occ__cta { display: inline-flex; align-items: center; gap: .3em; margin-top: 8px; font-size: 17px; font-weight: 600; color: rgba(255, 255, 255, .92); }
.r4-occ a:hover .r4-occ__cta { text-decoration: underline; text-underline-offset: .15em; }

/* ── 3 · The finder ── */

.r4-controls { display: grid; gap: 28px; }
.r4-finder .r3-head { scroll-margin-top: calc(var(--ln-h) + 24px); }   /* where a trip card lands you */
.r4-chips { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 12px; }
.r4-chip {
    display: flex; flex-direction: column; align-items: center; justify-content: flex-end; width: 100%; height: 100%;
    padding: 16px 8px 14px; border: 0; border-radius: 18px;
    background: var(--bg); color: var(--ink); font: inherit; cursor: pointer;
    box-shadow: inset 0 0 0 1px transparent;
    transition: box-shadow .2s var(--ease-hover), transform .2s var(--ease-hover);
}
.r4-chip:hover { box-shadow: inset 0 0 0 1px var(--hair); }
.r4-chip[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--focus); }
.r4-chip img { width: 100%; max-width: 120px; height: auto; margin-bottom: 8px; }
.r4-chip__glyph { display: grid; place-items: center; width: 53px; height: 53px; margin-bottom: 8px; border-radius: 50%; background: var(--bg-alt); }
.r4-chip__glyph svg { width: 26px; height: 26px; stroke-width: 1.5; }
.r4-chip__name { font-size: 14px; line-height: 1.28577; font-weight: 600; letter-spacing: -0.016em; }
.r4-chip__price { margin-top: 2px; color: var(--gold-ink); font-size: 12px; line-height: 1.33337; letter-spacing: -0.01em; }

.r4-fields { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; }
.r4-field { display: flex; flex-direction: column; gap: 6px; min-width: 180px; flex: 1 1 180px; }
.r4-field__label { color: var(--ink-2); font-size: 12px; line-height: 1.33337; font-weight: 600; letter-spacing: -0.01em; }
.r4-field__input {
    width: 100%; height: 48px; padding: 0 14px;
    border: 1px solid var(--hair); border-radius: 12px; background: var(--bg);
    color: var(--ink); font: inherit; font-size: 17px; letter-spacing: -0.022em;
    appearance: none; -webkit-appearance: none;
}
select.r4-field__input {
    padding-right: 36px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%236e6e73' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center; background-size: 12px 8px;
}
.r4-field__input:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.r4-field.has-error .r4-field__input { border-color: var(--error); }
.r4-clear { flex: none; height: 48px; }
.r4-message { color: var(--error); font-size: 14px; line-height: 1.42859; }

.r4-status { margin-top: 36px; color: var(--ink-2); font-size: 17px; line-height: 1.41; }
.r4-status strong { color: var(--ink); font-weight: 600; }

.r4-results { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); margin-top: 20px; }
.r4-results:empty { display: none; }
.r4-car {
    display: flex; flex-direction: column; overflow: hidden;
    border-radius: 24px; background: var(--bg);
    animation: r4-in .45s var(--ease-out) both;
}
@keyframes r4-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.r4-car__media { display: block; aspect-ratio: 4 / 3; background: var(--bg-alt); overflow: hidden; }
.r4-car__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease-out); }
.r4-car:hover .r4-car__media img { transform: scale(1.03); }
.r4-car__body { padding: 20px 24px 0; }
.r4-car__badge { color: var(--deal); font-size: 12px; line-height: 1.33337; font-weight: 600; }
.r4-car__badge:empty, .r4-car__free:empty { display: none; }
.r4-car__name { margin-top: 2px; font-size: 21px; line-height: 1.19048; font-weight: 600; letter-spacing: .011em; }
.r4-car__class { margin-top: 2px; color: var(--ink-2); font-size: 14px; line-height: 1.42859; }
.r4-car__price { margin-top: 12px; font-size: 17px; line-height: 1.23536; font-weight: 600; }
.r4-car__free { margin-top: 4px; color: var(--success); font-size: 14px; line-height: 1.42859; }
.r4-car__link { align-self: flex-start; min-height: 36px; margin: 16px 24px 24px; padding: 8px 20px; font-size: 14px; }

.r4-after { display: flex; flex-direction: column; align-items: center; gap: 28px; margin-top: 40px; text-align: center; }
.r4-review { max-width: 640px; font-size: 21px; line-height: 1.38105; font-weight: 600; letter-spacing: .011em; }
.r4-review span { display: block; margin-top: 8px; color: var(--ink-2); font-size: 14px; line-height: 1.42859; font-weight: 400; letter-spacing: -0.016em; }
.r4-after .r3-ask { margin-top: 0; }

/* ── Phones: the "Find your car" bar ── */

.r4-bar { display: none; }

/* ── Tablet ── */

@media (max-width: 1068px) {
    .r4-chips { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .r4-results { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .r4-occ__title { font-size: 24px; line-height: 1.16667; }
    .r4-occ__copy { padding: 22px 24px; }
}

/* ── Phone ── */

@media (max-width: 734px) {
    /* Trips and classes become swipe rows, which keeps the finder's results near the top. */
    .r4-occs {
        display: flex; gap: 12px; width: auto;
        overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
        padding-inline: calc((100vw - var(--w)) / 2); scroll-padding-inline: calc((100vw - var(--w)) / 2);
    }
    .r4-occs::-webkit-scrollbar { display: none; }
    .r4-occ { flex: none; width: 72vw; scroll-snap-align: start; }
    .r4-occ a { border-radius: 20px; }
    .r4-occ__copy { padding: 20px 22px; }
    .r4-occ__title { font-size: 21px; line-height: 1.19048; }
    .r4-occ__cta { font-size: 15px; }

    .r4-controls { width: auto; gap: 20px; }
    .r4-controls > :not(.r4-chips) { width: var(--w); margin-inline: auto; }
    .r4-chips {
        display: flex; gap: 10px;
        overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none;
        padding-inline: calc((100vw - var(--w)) / 2); scroll-padding-inline: calc((100vw - var(--w)) / 2);
    }
    .r4-chips::-webkit-scrollbar { display: none; }
    .r4-chips li { flex: none; width: 112px; scroll-snap-align: start; }
    .r4-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
    .r4-field { min-width: 0; }
    .r4-clear { grid-column: 1 / -1; justify-self: start; height: auto; }
    .r4-status { margin-top: 28px; }
    .r4-results { grid-template-columns: 1fr; gap: 12px; }
    .r4-car { flex-direction: row; align-items: stretch; border-radius: 18px; }
    .r4-car__media { flex: none; width: 38%; aspect-ratio: auto; }
    .r4-car__body { flex: 1; padding: 14px 14px 0; }
    .r4-car__name { font-size: 17px; line-height: 1.23536; letter-spacing: -0.022em; }
    .r4-car__class, .r4-car__free { font-size: 12px; line-height: 1.33337; }
    .r4-car__price { margin-top: 6px; font-size: 15px; }
    .r4-car { position: relative; }
    .r4-car__link { position: absolute; right: 12px; bottom: 12px; margin: 0; min-height: 30px; padding: 5px 14px; font-size: 12px; }
    .r4-car__body { padding-bottom: 52px; }
    .r4-review { font-size: 19px; line-height: 1.4211; }

    .r4-bar {
        position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 40;
        display: flex; align-items: center; justify-content: space-between; gap: 12px;
        padding: 10px 10px 10px 18px; border-radius: 22px;
        background: rgba(29, 29, 31, .86); color: var(--on-dark);
        -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
        box-shadow: 0 8px 28px rgba(0, 0, 0, .22);
        transform: translateY(calc(100% + 24px)); opacity: 0; visibility: hidden;
        transition: transform .35s var(--ease-out), opacity .35s var(--ease-out), visibility 0s linear .35s;
    }
    .r4-bar[hidden] { display: none; }
    .r4-bar.is-shown { transform: none; opacity: 1; visibility: visible; transition-delay: 0s; }
    .r4-bar__text { display: flex; flex-direction: column; font-size: 12px; line-height: 1.33337; color: rgba(245, 245, 247, .72); }
    .r4-bar__text strong { color: var(--on-dark); font-size: 15px; line-height: 1.33337; font-weight: 600; }
    .r4-bar__cta { min-height: 40px; padding: 9px 18px; font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
    .r4-occ img, .r4-car__media img, .r4-chip, .r4-bar { transition: none; }
    .r4-occ a:hover img, .r4-car:hover .r4-car__media img { transform: none; }
    .r4-car { animation: none; }
}
