/* =========================================================
   BOOKING BAR
========================================================= */

.booking-bar {
    position: absolute;

    z-index: 10;

    left: 50%;
    bottom: 65px;

    width: min(var(--hero-content-width), calc(100% - (2 * var(--container-padding))));

    height: 100px;

    transform: translateX(-50%);

    display: flex;
    align-items: center;

    gap: 16px;

    padding: 16px;

    box-sizing: border-box;

    background: var(--color-white);

    border-radius: 5px;
}


/* =========================================================
   FIELDS WRAPPER
========================================================= */

.booking-bar__fields {
    min-width: 0;

    flex: 1;

    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 16px;
}


/* =========================================================
   FIELD
========================================================= */

.booking-field {
    position: relative;

    min-width: 0;
    height: 68px;

    display: flex;
    flex-direction: column;
    justify-content: center;

    padding: 10px 14px;

    box-sizing: border-box;

    color: var(--color-black);
    background: var(--color-white);

    border: 1px solid var(--color-black);
    border-radius: 5px;
}


/* =========================================================
   FIELD LABEL
========================================================= */

.booking-field__label {
    margin-bottom: 4px;

    color: rgba(16, 17, 17, 0.6);

    font-size: 14px;
    font-weight: 400;
    line-height: 1;
}


/* =========================================================
   FIELD VALUE
========================================================= */

.booking-field strong {
    min-width: 0;

    padding-right: 24px;

    color: var(--color-black);

    font-size: 18px;
    font-weight: 500;
    line-height: 1;

    white-space: nowrap;

    overflow: hidden;
    text-overflow: ellipsis;
}


/* =========================================================
   FIELD ICON
========================================================= */

.booking-field__icon {
    position: absolute;

    top: 50%;
    right: 12px;

    transform: translateY(-50%);

    color: var(--color-gold);

    font-size: 18px;
}

.booking-field--guests
.booking-field__icon {
    color: var(--color-black);
}


/* =========================================================
   SEARCH BUTTON
========================================================= */

.booking-bar__button {
    width: 214px;
    height: 68px;

    flex: 0 0 214px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: var(--color-black);
    background: var(--color-gold);

    border-radius: 5px;

    font-size: 18px;
    font-weight: 500;
    line-height: 1;

    text-decoration: none;
}

.booking-bar .booking-bar__button:focus-visible {
    outline: 2px solid var(--color-gold);
    outline-offset: 3px;
}


/* =========================================================
   SHARED BOOKING BAR — DESKTOP
========================================================= */

@media (min-width: 1120px) {

    .booking-bar {
        bottom: 0;

        width: min(1380px, calc(100% - 64px));
        height: 100px;

        gap: 18px;

        padding: 12px 20px;

        border-radius: 6px;

        box-shadow: 0 18px 45px rgba(17, 18, 18, 0.16);

        transform: translate(-50%, 50%);
    }

    .booking-bar__fields {
        grid-template-columns:
            1fr
            1fr
            1.12fr
            1.12fr;

        gap: 0;
    }

    .booking-field {
        height: 72px;

        padding: 10px 20px;

        border: 0;
        border-right: 1px solid rgba(16, 17, 17, 0.28);
        border-radius: 0;
    }

    .booking-field:first-child {
        border-left: 1px solid rgba(16, 17, 17, 0.28);
    }

    .booking-bar__button {
        width: 226px;
        height: 60px;

        flex-basis: 226px;

        border-radius: 4px;
    }

}

@media (min-width: 1120px) and (max-width: 1239px) {
    .booking-field strong {
        font-size: clamp(15px, calc(2.5vw - 13px), 18px);
        letter-spacing: -0.02em;
    }
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1100px) and (min-width: 768px) {

    .booking-bar {
        bottom: 0;

        width: calc(100% - 40px);
        max-width: 900px;

        gap: 10px;

        padding: 12px;

        box-shadow: 0 16px 36px rgba(17, 18, 18, 0.15);

        transform: translate(-50%, 50%);
    }

    .booking-bar__fields {
        gap: 10px;
    }

    .booking-field {
        padding-left: 10px;
        padding-right: 10px;
    }

    .booking-field__label {
        font-size: 12px;
    }

    .booking-field strong {
        font-size: 14px;
    }

    .booking-bar__button {
        width: 170px;

        flex-basis: 170px;

        font-size: 14px;
    }

}

@media (min-width: 1101px) and (max-width: 1119px) {

    .booking-bar {
        bottom: 0;

        width: calc(100% - 40px);
        max-width: 900px;

        gap: 10px;
        padding: 12px;
        box-shadow: 0 16px 36px rgba(17, 18, 18, 0.15);

        transform: translate(-50%, 50%);
    }

    .booking-bar__fields {
        gap: 10px;
    }

    .booking-field {
        padding-right: 10px;
        padding-left: 10px;
    }

    .booking-field__label {
        font-size: 12px;
    }

    .booking-field strong {
        font-size: 14px;
    }

    .booking-bar__button {
        width: 170px;
        flex-basis: 170px;
        font-size: 14px;
    }

}

@media (min-width: 768px) {
    .site-main :is(
        .about-hero,
        .rooms-hero,
        .services-hero,
        .single-room-hero,
        .special-offer-hero
    ) {
        overflow: visible;
    }
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 767px) {

    .booking-bar {
        bottom: 34px;

        width: calc(100% - 24px);
        max-width: none;

        height: auto;

        display: block;

        padding: 10px;

        box-sizing: border-box;

        border-radius: 5px;
    }

    .site-main :is(
        .home-hero,
        .about-hero,
        .rooms-hero,
        .services-hero,
        .single-room-hero,
        .special-offer-hero
    ) > .booking-bar {
        bottom: 34px;
    }


    /* =====================================================
       MOBILE FIELDS
    ===================================================== */

    .booking-bar__fields {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 6px;
    }


    /* =====================================================
       MOBILE FIELD
    ===================================================== */

    .booking-field {
        height: 57px;

        padding: 7px 9px;

        border-radius: 5px;
    }

    .booking-field__label {
        margin-bottom: 4px;

        font-size: 12px;
    }

    .booking-field strong {
        max-width: calc(100% - 18px);

        padding-right: 0;

        overflow: hidden;

        font-size: 14px;
        line-height: 1;

        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .booking-field__icon {
        right: 7px;

        font-size: 15px;
    }


    /* =====================================================
       MOBILE SEARCH BUTTON
    ===================================================== */

    .booking-bar__button {
        width: 100%;
        height: 42px;

        margin-top: 7px;

        font-size: 14px;

        border-radius: 5px;
    }
}
