/* ============================================================================
   RENTAL BOOKING (9 Nov 2026) - shared by every storefront page.
   - .pa-stepper   the -/+ number control (cart, product page, offer dialog)
   - .pa-book      a rental product's booking panel (product/_rental-panel)
   - .pa-offer     "free from ..." dialog when a rental is not free for the
                   cart's period (assets/js/rental-booking.js)
   Theme tokens only (theme.css), so light and dark both work.
   ========================================================================== */

/* Steppers: days and quantities */
.pa-stepper { display: inline-flex; align-items: stretch; height: 44px; border: 1px solid var(--site-border); border-radius: 10px; overflow: hidden; background: var(--site-surface); }
.pa-stepper__btn { flex: 0 0 40px; width: 40px; padding: 0; border: 0; background: var(--site-bg-sunken); color: var(--site-ink-strong); font-size: 1.15rem; line-height: 1; cursor: pointer; }
.pa-stepper__btn:hover:not(:disabled) { background: var(--site-brand-soft); color: var(--site-brand); }
.pa-stepper__btn:disabled { color: var(--site-faint); cursor: not-allowed; }
.pa-stepper__input, .pa-stepper__value { flex: 0 0 54px; width: 54px; min-width: 0; height: auto; margin: 0; padding: 0; border: 0; border-inline: 1px solid var(--site-border-soft); border-radius: 0; background: transparent; color: var(--site-ink-strong); text-align: center; font: inherit; font-weight: 700; display: grid; place-items: center; box-shadow: none; -moz-appearance: textfield; }
.pa-stepper__input::-webkit-outer-spin-button, .pa-stepper__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pa-stepper__input:focus { outline: 2px solid var(--site-brand); outline-offset: -2px; }

/* Booking panel */
.pa-book { margin: 14px 0 6px; padding: 16px 18px; border: 1px solid var(--site-border-soft); border-radius: 14px; background: var(--site-surface); color: var(--site-ink); }
.pa-book__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 14px; margin-bottom: 12px; }
.pa-book__price { font-size: 1.35rem; font-weight: 700; color: var(--site-ink-strong); }
.pa-book__price small { font-size: .9rem; font-weight: 400; color: var(--site-muted); }
.pa-book__note { font-size: .82rem; color: var(--site-muted); }
.pa-book__cart-note { display: flex; gap: 8px; margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; background: var(--site-brand-soft); color: var(--site-ink); font-size: .85rem; line-height: 1.5; }
.pa-book__cart-note i { color: var(--site-brand); margin-top: 3px; }
.pa-book__fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pa-book__field { display: grid; gap: 6px; margin: 0; min-width: 0; }
.pa-book__field > span { font-size: .8rem; font-weight: 600; color: var(--site-muted); }
.pa-book__field .pa-stepper { justify-self: start; }
.pa-book__input { width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--site-border); border-radius: 10px; background: var(--site-surface); color: var(--site-ink); font: inherit; }
.pa-book__input:focus { outline: 2px solid var(--site-brand); outline-offset: 1px; border-color: var(--site-brand); }
.pa-book__total { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--site-border-soft); }
.pa-book__sum { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.pa-book__sum span { color: var(--site-muted); font-size: .9rem; }
.pa-book__sum strong { font-size: 1.3rem; color: var(--site-brand); }
.pa-book__total small { display: block; margin-top: 4px; color: var(--site-muted); font-size: .82rem; }

/* "Free from ..." dialog */
.pa-offer { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; padding: 16px; background: var(--site-overlay); }
.pa-offer[hidden] { display: none; }
.pa-offer__box { width: min(460px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; padding: 22px; border-radius: 16px; background: var(--site-surface); color: var(--site-ink); box-shadow: var(--site-shadow-lg); }
.pa-offer__icon { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--site-brand-soft); color: var(--site-brand); font-size: 1.2rem; margin-bottom: 10px; }
.pa-offer__reason { margin: 0 0 8px; color: var(--site-muted); font-size: .9rem; line-height: 1.5; }
.pa-offer__title { margin: 0 0 6px; font-size: 1.2rem; font-weight: 700; color: var(--site-ink-strong); text-transform: none; letter-spacing: 0; line-height: 1.35; }
.pa-offer__text { margin: 0 0 16px; color: var(--site-ink); font-size: .92rem; line-height: 1.55; }
.pa-offer__fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.pa-offer__fields[hidden] { display: none; }
.pa-offer__fields .pa-book__field:last-child { grid-column: 1 / -1; }
.pa-offer__actions { display: grid; gap: 8px; }
.pa-offer__btn { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--site-brand); background: transparent; color: var(--site-brand); font: inherit; font-weight: 600; cursor: pointer; text-transform: none; }
.pa-offer__btn--primary { background: var(--site-brand); color: var(--site-brand-contrast); }
.pa-offer__btn--primary:hover { background: var(--site-brand-strong); }
.pa-offer__btn--plain { border-color: transparent; color: var(--site-muted); }
.pa-offer__btn[disabled] { opacity: .6; cursor: wait; }
.pa-offer__error { margin: 0 0 10px; color: var(--site-danger); font-size: .88rem; }
.pa-offer__error:empty { display: none; }

/* Product page buttons: one clear "add to cart", the rest beside it. */
.product-right .product-buttons { display: flex; flex-wrap: wrap; align-items: stretch; gap: 10px; margin-top: 14px; }
.product-right .product-buttons > .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; margin: 0; padding: 0 18px; border-radius: 10px; font-size: .95rem; font-weight: 600; text-transform: none; letter-spacing: 0; line-height: 1.2; white-space: nowrap; }
.product-right .product-buttons > .add-to-cart { flex: 1 1 220px; }
.product-right .product-buttons > .product-btn { flex: 0 1 auto; }
.pa-product-noimage { aspect-ratio: 1 / 1; object-fit: contain; background: var(--site-bg-sunken); border-radius: 14px; }

/* Product cards: "Add to cart" on one line beside the quantity. */
.rental-add-row .rental-add-btn { min-width: 0; white-space: nowrap; text-transform: none; letter-spacing: 0; }
.rental-add-row .rental-add-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 575.98px) {
    .pa-book { padding: 14px; }
    .product-right .product-buttons > .btn { flex: 1 1 100%; }
}
