/* Rentals pages (btg-rentals.php). Fonts and colours come from the theme;
   the photos are product shots on white, so they sit on a soft tile with
   multiply blending to read as one set. */

.btg-rentals {
    --btg-rentals-line: rgba(15, 15, 15, 0.12);
    --btg-rentals-muted: rgba(15, 15, 15, 0.6);
    --btg-rentals-tile: #f2f2f0;
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 40px 72px;
}

/* Head */

.btg-rentals__head {
    max-width: 680px;
    margin-bottom: 2rem;
}

.btg-rentals__eyebrow {
    margin: 0 0 0.4rem;
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--btg-rentals-muted);
}

.btg-rentals__title {
    margin: 0 0 0.75rem;
    font-size: clamp(2rem, 4vw, 2.8rem);
    line-height: 1.05;
}

.btg-rentals__intro {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
}

/* How hire works */

.btg-rentals__how {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    margin: 0 0 2.5rem;
    padding: 0;
    list-style: none;
    counter-reset: btg-rentals-step;
    border-top: 1px solid var(--btg-rentals-line);
    border-bottom: 1px solid var(--btg-rentals-line);
}

.btg-rentals__how li {
    margin: 0;
    padding: 1.1rem 1.5rem 1.2rem 0;
    counter-increment: btg-rentals-step;
    font-size: 0.85rem;
    line-height: 1.55;
}

.btg-rentals__how li + li {
    padding-left: 1.5rem;
    border-left: 1px solid var(--btg-rentals-line);
}

.btg-rentals__how strong {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}

.btg-rentals__how strong::before {
    content: counter(btg-rentals-step) ". ";
    color: var(--btg-rentals-muted);
    font-weight: 400;
}

.btg-rentals__how span {
    color: var(--btg-rentals-muted);
}

.btg-rentals__how a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

/* Chips and sorting */

.btg-rentals__bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.btg-rentals__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.btg-rentals__chips a {
    display: inline-flex;
    align-items: center;
    gap: 0.45em;
    padding: 0.45rem 0.95rem;
    border: 1px solid var(--btg-rentals-line);
    border-radius: 999px;
    color: inherit;
    font-size: 0.85rem;
    line-height: 1.2;
    text-decoration: none;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.btg-rentals__chips a:hover,
.btg-rentals__chips a:focus-visible {
    border-color: currentColor;
}

.btg-rentals__chips a span {
    font-size: 0.75rem;
    color: var(--btg-rentals-muted);
}

.btg-rentals__chips a[aria-current="page"] {
    border-color: #0f0f0f;
    background: #0f0f0f;
    color: #fff;
}

.btg-rentals__chips a[aria-current="page"] span {
    color: rgba(255, 255, 255, 0.7);
}

.btg-rentals__sort {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    font-size: 0.85rem;
}

.btg-rentals__sort label {
    color: var(--btg-rentals-muted);
}

.btg-rentals__sort select {
    width: auto;
    padding: 0.4rem 2rem 0.4rem 0.75rem;
    border: 1px solid var(--btg-rentals-line);
    border-radius: 6px;
    background-color: #fff;
    font-size: 0.85rem;
}

/* Grid and cards */

.btg-rentals__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem 1.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.btg-rentals__card {
    margin: 0;
}

.btg-rentals__card > a {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.btg-rentals__image {
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 6px;
    background: var(--btg-rentals-tile);
}

.btg-rentals__image img {
    display: block;
    width: 100%;
    height: 100%;
    padding: 8%;
    object-fit: contain;
    mix-blend-mode: multiply;
    transition: transform 0.35s ease;
}

.btg-rentals__card > a:hover .btg-rentals__image img,
.btg-rentals__card > a:focus-visible .btg-rentals__image img {
    transform: scale(1.04);
}

.btg-rentals__card > a:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 4px;
    border-radius: 6px;
}

.btg-rentals__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding-top: 0.9rem;
}

.btg-rentals__label {
    margin-bottom: 0.2rem;
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--btg-rentals-muted);
}

.btg-rentals__name {
    font-size: 1.05rem;
    font-weight: 500;
    line-height: 1.35;
}

.btg-rentals__price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.25rem 0.75rem;
    margin: 0.5rem 0 1rem;
}

.btg-rentals__day {
    font-size: 1.05rem;
    font-weight: 600;
}

.btg-rentals__day small {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--btg-rentals-muted);
}

.btg-rentals__week {
    font-size: 0.85rem;
    color: var(--btg-rentals-muted);
}

.btg-rentals__cta {
    align-self: flex-start;
    margin-top: auto;
    padding: 0.6rem 1.1rem;
    border: 1px solid #0f0f0f;
    border-radius: 6px;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.btg-rentals__card > a:hover .btg-rentals__cta,
.btg-rentals__card > a:focus-visible .btg-rentals__cta {
    background: #0f0f0f;
    color: #fff;
}

.btg-rentals__empty,
.btg-rentals__more {
    margin: 3rem 0 0;
    font-size: 0.9rem;
    color: var(--btg-rentals-muted);
}

.btg-rentals__more {
    padding-top: 1.25rem;
    border-top: 1px solid var(--btg-rentals-line);
}

.btg-rentals__empty a,
.btg-rentals__more a {
    color: #0f0f0f;
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

/* A photo or frame (not a cut-out on white) fills the tile */
.btg-rentals__image--photo img {
    padding: 0;
    object-fit: cover;
    mix-blend-mode: normal;
}

/* Tablet */

@media (max-width: 960px) {
    .btg-rentals__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Phone: the steps stack, chips scroll, cards go side by side */

@media (max-width: 640px) {
    /* Kit first on a phone: how hire works moves below the grid. */
    .btg-rentals {
        display: flex;
        flex-direction: column;
        padding: 28px 20px 48px;
    }

    .btg-rentals__how {
        order: 1;
        margin: 2rem 0 0;
    }

    .btg-rentals__more {
        order: 2;
        margin-top: 1.5rem;
        padding-top: 0;
        border-top: 0;
    }

    .btg-rentals__head {
        margin-bottom: 1.5rem;
    }

    .btg-rentals__how {
        grid-template-columns: 1fr;
    }

    .btg-rentals__how li,
    .btg-rentals__how li + li {
        padding: 0.85rem 0;
        border-left: 0;
    }

    .btg-rentals__how li + li {
        border-top: 1px solid var(--btg-rentals-line);
    }

    .btg-rentals__bar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .btg-rentals__chips {
        flex-wrap: nowrap;
        margin: 0 -20px;
        padding: 0 20px 2px;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .btg-rentals__chips::-webkit-scrollbar {
        display: none;
    }

    .btg-rentals__chips a {
        flex: none;
    }

    .btg-rentals__grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .btg-rentals__card + .btg-rentals__card {
        border-top: 1px solid var(--btg-rentals-line);
    }

    .btg-rentals__card > a {
        flex-direction: row;
        gap: 1rem;
        padding: 1rem 0;
    }

    .btg-rentals__image {
        flex: 0 0 38%;
        align-self: flex-start;
        aspect-ratio: 1;
    }

    .btg-rentals__body {
        padding-top: 0;
    }

    .btg-rentals__name {
        font-size: 0.95rem;
    }

    .btg-rentals__price {
        margin-bottom: 0.75rem;
    }

    .btg-rentals__cta {
        padding: 0.45rem 0.8rem;
        font-size: 0.72rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .btg-rentals__image img,
    .btg-rentals__chips a,
    .btg-rentals__cta {
        transition: none;
    }
}

/* ===== Rental product pages (btg-rentals/single.php) =====
   The rentals pages' container, type and tile around WooCommerce's
   product steps: gallery and "About this kit" on the left, the summary
   (crumbs, title, price, specs, RnB's booking form, hire facts) on the
   right and sticky, "More to hire" below. Phones: gallery, summary, about. */

.btg-rental-product {
    --btg-rentals-line: rgba(15, 15, 15, 0.12);
    --btg-rentals-muted: rgba(15, 15, 15, 0.6);
    --btg-rentals-tile: #f2f2f0;
}

.btg-product__layout {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    grid-template-areas:
        "gallery summary"
        "about   summary";
    grid-template-rows: auto 1fr;
    column-gap: 64px;
    align-items: start;
}

.btg-product__gallery { grid-area: gallery; min-width: 0; }
.btg-product__summary { grid-area: summary; position: sticky; top: 96px; min-width: 0; }
.btg-product__about { grid-area: about; min-width: 0; }

/* Gallery */
.btg-product__track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    border-radius: 8px;
    background: var(--btg-rentals-tile);
}

.btg-product__track::-webkit-scrollbar { display: none; }

.btg-product__track:focus-visible {
    outline: 2px solid #0f0f0f;
    outline-offset: 3px;
}

.btg-product__slide {
    margin: 0;
    aspect-ratio: 4 / 3;
    scroll-snap-align: start;
}

.btg-product__slide img {
    display: block;
    width: 100%;
    height: 100%;
    padding: 8%;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.btg-product__thumbs {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.btg-product__thumbs button,
.btg-product__thumbs button:hover,
.btg-product__thumbs button:focus {
    width: 72px;
    height: 72px;
    padding: 6px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: var(--btg-rentals-tile);
    cursor: pointer;
}

.btg-product__thumbs button[aria-current="true"] { border-color: #0f0f0f; }

.btg-product__thumbs img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    mix-blend-mode: multiply;
}

/* About */
.btg-product__about {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--btg-rentals-line);
}

.btg-product__heading {
    margin: 0 0 0.75rem;
    font-size: 1.35rem;
}

.btg-product__text {
    max-width: 65ch;
    font-size: 0.95rem;
    line-height: 1.65;
}

.btg-product__text p { margin: 0 0 0.9em; }

/* A photo or frame fills the gallery; thumbnails likewise */
.btg-product__slide--photo img {
    padding: 0;
    object-fit: cover;
    mix-blend-mode: normal;
}

/* Summary: crumbs, title, price, excerpt, specs */
.btg-rentals__crumbs {
    margin-bottom: 0.5rem;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--btg-rentals-muted);
}

.btg-rentals__crumbs a {
    color: inherit;
    text-decoration: none;
}

.btg-rentals__crumbs a:hover,
.btg-rentals__crumbs a:focus-visible {
    color: #0f0f0f;
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.btg-product__summary .woocommerce-breadcrumb { display: none; }

.btg-product__summary .product_title {
    margin: 0 0 0.4rem;
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    line-height: 1.1;
}

.btg-product__summary p.price {
    margin: 0 0 1rem !important;
    color: #0f0f0f !important;
}

.btg-product__summary p.price .btg-rentals__price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.25rem 0.75rem;
}

.btg-product__summary p.price .btg-rentals__day { font-size: 1.4rem; }

.btg-product__summary p.price .btg-rentals__day small,
.btg-product__summary p.price .btg-rentals__week {
    font-size: 0.9rem;
    font-weight: 400;
}

.btg-product__summary p.price .btg-rentals__week,
.btg-product__summary p.price .btg-rentals__week .amount {
    color: var(--btg-rentals-muted);
}

.btg-product__summary .woocommerce-product-details__short-description {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--btg-rentals-muted);
}

.btg-product__specs {
    margin: 0 0 1.25rem;
    font-size: 0.85rem;
}

.btg-product__specs div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--btg-rentals-line);
}

.btg-product__specs div:first-child { border-top: 1px solid var(--btg-rentals-line); }
.btg-product__specs dt { color: var(--btg-rentals-muted); font-weight: 400; }
.btg-product__specs dd { margin: 0; text-align: right; }

/* Booking panel (RnB's form) */
.btg-rental-product div.product form.cart.rnb-cart {
    display: block;
    margin: 0 0 1.25rem;
    padding: 1.25rem;
    border: 1px solid var(--btg-rentals-line);
    border-radius: 8px;
}

.btg-rental-product form.rnb-cart .date-time-picker,
.btg-rental-product form.rnb-cart .redq-quantity {
    width: 100% !important;
    margin-bottom: 1rem;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.btg-rental-product form.rnb-cart .date-time-picker h5,
.btg-rental-product form.rnb-cart .redq-quantity h5 {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0 0 0.4rem;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--btg-rentals-muted);
}

.btg-rental-product form.rnb-cart .pick-up-date-picker,
.btg-rental-product form.rnb-cart .drop-off-date-picker {
    display: block;
    position: relative;
    float: none !important;
    width: 100% !important;
    padding: 0 !important;
}

.btg-rental-product form.rnb-cart .redq-quantity input,
.btg-rental-product form.rnb-cart .date-time-picker input {
    display: block;
    width: 100% !important;
    padding: 0.75rem 0.9rem !important;
    border: 1px solid var(--btg-rentals-line) !important;
    border-radius: 6px;
    background: #fff !important;
    font-size: 0.95rem;
}

.btg-rental-product form.rnb-cart .date-time-picker input {
    padding-left: 2.4rem !important;
    cursor: pointer;
}

.btg-rental-product form.rnb-cart .date-time-picker input:focus {
    border-color: #0f0f0f !important;
    outline: none;
}

.btg-rental-product form.rnb-cart .date-time-picker i {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--btg-rentals-muted);
    pointer-events: none;
}

/* The note becomes the "?" tooltip (btg-rentals.js) */
.btg-rental-product form.rnb-cart .rnb-return-date-note.btg-has-tip { display: none; }

.btg-tip {
    position: relative;
    display: inline-flex;
    text-transform: none;
    letter-spacing: 0;
}

.btg-rental-product .btg-tip__button,
.btg-rental-product .btg-tip__button:hover,
.btg-rental-product .btg-tip__button:focus {
    display: inline-grid;
    place-items: center;
    width: 1.1rem;
    height: 1.1rem;
    padding: 0;
    border: 1px solid currentColor;
    border-radius: 50%;
    background: transparent;
    color: var(--btg-rentals-muted);
    font-size: 0.65rem;
    font-weight: 600;
    line-height: 1;
    cursor: help;
}

.btg-rental-product .btg-tip__button:focus-visible {
    outline: 2px solid #0f0f0f;
    outline-offset: 2px;
}

.btg-tip__text {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    z-index: 20;
    width: max-content;
    max-width: 260px;
    padding: 0.6rem 0.75rem;
    border-radius: 6px;
    background: #0f0f0f;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 400;
    line-height: 1.45;
    text-align: left;
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 4px);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
    pointer-events: none;
}

.btg-tip__text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border: 5px solid transparent;
    border-top-color: #0f0f0f;
}

.btg-tip:hover .btg-tip__text,
.btg-tip:focus-within .btg-tip__text,
.btg-tip.is-open .btg-tip__text {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

.btg-rental-product form.rnb-cart .booking-pricing-info {
    margin: 0 0 1rem;
    padding: 0.75rem 0.9rem;
    border-radius: 6px;
    background: var(--btg-rentals-tile);
    font-size: 0.9rem;
}

/* Buttons. RnB pads a disabled Book now differently on hover (its
   rental-style.css, !important): the same padding in every state. */
.btg-rental-product div.product form.rnb-cart button.single_add_to_cart_button,
.btg-rental-product div.product form.rnb-cart button.single_add_to_cart_button:hover,
.btg-rental-product div.product form.rnb-cart button.btn-book-now[disabled]:hover,
.btg-rental-product div.product form.rnb-cart button#quote-content-confirm,
.btg-rental-product div.product form.rnb-cart button#quote-content-confirm:hover {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0.9rem 1rem !important;
    border: 1px solid #0f0f0f !important;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    line-height: 1.2;
    text-transform: uppercase;
    transition: background-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.btg-rental-product div.product form.rnb-cart button.single_add_to_cart_button {
    background: #0f0f0f !important;
    color: #fff !important;
}

.btg-rental-product div.product form.rnb-cart button.single_add_to_cart_button:hover:not(:disabled):not(.disabled) {
    background: #333 !important;
}

.btg-rental-product div.product form.rnb-cart button#quote-content-confirm {
    margin-top: 0.6rem;
    background: transparent !important;
    color: #0f0f0f !important;
}

.btg-rental-product div.product form.rnb-cart button#quote-content-confirm:hover:not(:disabled) {
    background: #0f0f0f !important;
    color: #fff !important;
}

.btg-rental-product div.product form.rnb-cart button:disabled,
.btg-rental-product div.product form.rnb-cart button.disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* RnB's calendar and phone modal */
.btg-rental-product #cal-submit-btn,
.btg-rental-product #drop-cal-submit-btn {
    border: 1px solid #0f0f0f !important;
    border-radius: 6px !important;
    background: #0f0f0f !important;
    color: #fff !important;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.btg-rental-product .xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_current,
.btg-rental-product .xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_current:hover {
    background: #0f0f0f !important;
    box-shadow: none !important;
    color: #fff !important;
}

.btg-rental-product .xdsoft_datetimepicker .xdsoft_calendar td:hover {
    background: #e6e6e3 !important;
    color: #0f0f0f !important;
}

/* Hire facts */
.btg-rentals__facts {
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 0.85rem;
    line-height: 1.55;
}

.btg-rentals__facts li {
    margin: 0;
    padding: 0.7rem 0;
    border-top: 1px solid var(--btg-rentals-line);
    color: var(--btg-rentals-muted);
}

.btg-rentals__facts strong {
    display: block;
    color: #0f0f0f;
    font-weight: 600;
}

.btg-rentals__facts a {
    color: #0f0f0f;
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

/* More to hire. It carries its own width: hooked output earlier on the
   page (RnB's form) closes one div too many, so it can land outside the
   product container. */
.btg-rentals--more {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px 72px;
}

.btg-rentals--more > .btg-rentals__bar {
    padding-top: 2rem;
    border-top: 1px solid var(--btg-rentals-line);
}

.btg-rental-product .btg-rentals.btg-product {
    padding-bottom: 3.5rem;
}

.btg-rentals__more-title {
    margin: 0;
    font-size: clamp(1.4rem, 2.5vw, 1.8rem);
}

.btg-rentals__all {
    color: #0f0f0f;
    font-size: 0.85rem;
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

@media (max-width: 900px) {
    .btg-product__layout {
        grid-template-columns: 1fr;
        grid-template-areas: "gallery" "summary" "about";
        grid-template-rows: auto;
    }

    .btg-product__summary {
        position: static;
        margin-top: 1.5rem;
    }
}

@media (max-width: 640px) {
    .btg-rentals.btg-product {
        display: block;
    }

    .btg-product__gallery {
        margin: 0 -20px;
    }

    .btg-product__track { border-radius: 0; }

    .btg-product__thumbs { padding: 0 20px; }

    .btg-rental-product div.product form.cart.rnb-cart { padding: 1rem; }

    .btg-rentals--more { padding: 0 20px 48px; }

    .btg-rentals--more > .btg-rentals__bar { padding-top: 1.5rem; }

    .btg-rental-product .btg-rentals.btg-product { padding-bottom: 2rem; }

    .btg-rentals--more .btg-rentals__bar {
        flex-direction: row;
        align-items: baseline;
    }

    .btg-tip__text {
        left: auto;
        right: -8px;
        transform: translateY(4px);
    }

    .btg-tip:hover .btg-tip__text,
    .btg-tip:focus-within .btg-tip__text,
    .btg-tip.is-open .btg-tip__text {
        transform: translateY(0);
    }

    .btg-tip__text::after {
        left: auto;
        right: 12px;
    }
}
