/* ================================================================
   HOTEL BOOKING FRONTEND — #0060.1.1 CONTAINER RESPONSIVE HOTFIX
   ================================================================ */

.hb-booking,
.hb-booking * {
    box-sizing: border-box;
}

/* #0052.3 payment status on booking confirmation */
.hb-payment-status {
    color: #765400;
}

.hb-payment-status--succeeded,
.hb-payment-status--not-required {
    color: #157347;
}

.hb-payment-status--failed,
.hb-payment-status--cancelled,
.hb-payment-status--expired {
    color: #b42318;
}

.hb-payment-pending-notice {
    background: #fff8e1;
    border: 1px solid #f3d98b;
    border-radius: 10px;
    color: #5e4700;
    display: grid;
    gap: 3px;
    margin: 18px 0;
    padding: 14px 16px;
}

.hb-payment-action-button {
    align-items: center;
    align-self: start;
    background: #1f5f4a;
    border-radius: 7px;
    color: #fff;
    display: inline-flex;
    font-weight: 700;
    justify-content: center;
    margin-top: 9px;
    min-height: 42px;
    padding: 9px 16px;
    text-decoration: none;
    width: fit-content;
}

.hb-payment-action-button:hover,
.hb-payment-action-button:focus {
    background: #174a3a;
    color: #fff;
}

.hb-payment-result-notice {
    border: 1px solid;
    border-radius: 10px;
    display: grid;
    gap: 3px;
    margin: 18px 0;
    padding: 14px 16px;
}

.hb-payment-result-notice--success {
    background: #ecf8f0;
    border-color: #9bd0ab;
    color: #116329;
}

.hb-payment-result-notice--error {
    background: #fff1f0;
    border-color: #f2b8b5;
    color: #8a1c17;
}

.hb-booking {
    --hb-ui-accent: #14785c;
    --hb-ui-accent-dark: #0e5d46;
    --hb-ui-border: #dfe4e2;
    --hb-ui-ink: #17221e;
    --hb-ui-muted: #63716c;
    --hb-ui-soft: #f4f8f6;

    container-name: hb-booking;
    container-type: inline-size;
    color: var(--hb-ui-ink);
    margin-inline: auto;
    max-width: 1180px;
    width: 100%;
}

.hb-booking__header {
    margin-bottom: 20px;
}

.hb-booking__title {
    margin: 0;
    color: var(--hb-ui-ink);
    font-size: clamp(1.65rem, 4cqi, 2.25rem);
    line-height: 1.15;
}

/* ----------------------------------------------------------------
   BUTTONS
   ---------------------------------------------------------------- */

.hb-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 9px 16px;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    background: #fff;
    color: inherit;
    font: inherit;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    text-decoration: none;
}

.hb-button--primary {
    border-color: currentColor;
}

.hb-button:focus-visible,
.hb-search-form input:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* ----------------------------------------------------------------
   SEARCH FORM
   ---------------------------------------------------------------- */

.hb-search-form {
    margin-bottom: 20px;
    padding: clamp(18px, 3.2cqi, 28px);
    border: 1px solid var(--hb-ui-border);
    border-radius: 16px;
    background:
        radial-gradient(circle at 100% 0, rgba(20, 120, 92, .10), transparent 32%),
        linear-gradient(135deg, #fff 0%, #f8fbfa 100%);
    box-shadow: 0 12px 32px rgba(26, 51, 42, .08);
}

.hb-search-form__heading {
    display: flex;
    gap: 18px;
    align-items: end;
    justify-content: space-between;
    margin-bottom: 20px;
}

.hb-search-form__eyebrow {
    display: block;
    margin-bottom: 5px;
    color: var(--hb-ui-accent);
    font-size: .74rem;
    font-weight: 800;
    letter-spacing: .08em;
    line-height: 1.25;
    text-transform: uppercase;
}

.hb-search-form__title {
    display: block;
    color: var(--hb-ui-ink);
    font-size: clamp(1.15rem, 2.5cqi, 1.4rem);
    line-height: 1.25;
}

.hb-search-form__hint {
    max-width: 390px;
    margin: 0;
    color: var(--hb-ui-muted);
    font-size: .86rem;
    line-height: 1.5;
    text-align: right;
}

.hb-search-form__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(130px, 1fr)) auto;
    gap: 16px;
    align-items: end;
}

.hb-search-form__field {
    display: grid;
    gap: 6px;
}

.hb-search-form__field label {
    color: #34423d;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .025em;
    line-height: 1.25;
    text-transform: uppercase;
}

.hb-search-form__field input {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    padding: 9px 12px;
    border: 1px solid #cbd5d1;
    border-radius: 10px;
    background: #fff;
    color: var(--hb-ui-ink);
    font: inherit;
    line-height: 1.25;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.hb-search-form__field input:hover {
    border-color: #9dada7;
}

.hb-search-form__field input:focus {
    border-color: var(--hb-ui-accent);
    box-shadow: 0 0 0 3px rgba(20, 120, 92, .13);
}

.hb-search-form__action {
    display: flex;
}

.hb-search-form__action .hb-button {
    min-height: 48px;
    padding-inline: 22px;
    border-color: var(--hb-ui-accent);
    border-radius: 10px;
    background: var(--hb-ui-accent);
    color: #fff;
    font-weight: 750;
    white-space: nowrap;
    box-shadow: 0 8px 18px rgba(14, 93, 70, .17);
}

.hb-search-form__action .hb-button:hover,
.hb-search-form__action .hb-button:focus {
    border-color: var(--hb-ui-accent-dark);
    background: var(--hb-ui-accent-dark);
    color: #fff;
}

/* ----------------------------------------------------------------
   SEARCH SUMMARY
   ---------------------------------------------------------------- */

.hb-search-summary {
    display: grid;
    gap: 16px;
    margin-bottom: 22px;
    padding: clamp(18px, 2.8cqi, 24px);
    border: 1px solid var(--hb-ui-border);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(26, 51, 42, .055);
}

.hb-search-summary__heading {
    display: flex;
    gap: 12px;
    align-items: baseline;
    justify-content: space-between;
    padding-bottom: 13px;
    border-bottom: 1px solid #e8ecea;
}

.hb-search-summary__heading strong {
    color: var(--hb-ui-ink);
    font-size: 1.05rem;
}

.hb-search-summary__heading span {
    color: var(--hb-ui-muted);
    font-size: .8rem;
}

.hb-search-summary__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.hb-search-summary__item {
    display: grid;
    gap: 5px;
    min-width: 0;
    padding: 13px 14px;
    border: 1px solid #e5eae7;
    border-radius: 11px;
    background: #fafcfb;
}

.hb-search-summary__label {
    color: var(--hb-ui-muted);
    font-size: .73rem;
    font-weight: 750;
    letter-spacing: .04em;
    line-height: 1.25;
    text-transform: uppercase;
}

.hb-search-summary__item strong {
    overflow-wrap: anywhere;
    color: var(--hb-ui-ink);
    font-size: .94rem;
    line-height: 1.35;
}

.hb-search-summary__item--results {
    border-color: #cde7dc;
    background: var(--hb-ui-soft);
}

.hb-search-summary__item--results .hb-search-summary__label,
.hb-search-summary__item--results strong {
    color: var(--hb-ui-accent-dark);
}

/* ----------------------------------------------------------------
   NOTICE / EMPTY STATE
   ---------------------------------------------------------------- */

.hb-notice,
.hb-empty-state {
    margin-bottom: 20px;
    padding: 14px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.hb-notice--error {
    border-color: #b32d2e;
    background: #fff2f2;
}

.hb-empty-state {
    text-align: center;
    background: #fafafa;
}

.hb-empty-state h3 {
    margin-top: 0;
}

.hb-empty-state p:last-child {
    margin-bottom: 0;
}

/* ----------------------------------------------------------------
   RESULT LIST / CARD
   ---------------------------------------------------------------- */

.hb-room-results {
    display: grid;
    gap: 24px;
}

.hb-room-card {
    --hb-card-accent: #14785c;
    --hb-card-accent-dark: #0e5d46;
    --hb-card-border: #dfe4e2;
    --hb-card-ink: #17221e;
    --hb-card-muted: #63716c;
    --hb-card-soft: #f4f8f6;

    overflow: hidden;
    border: 1px solid var(--hb-card-border);
    border-radius: 16px;
    background: #fff;
    color: var(--hb-card-ink);
    box-shadow: 0 12px 34px rgba(26, 51, 42, .08);
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.hb-room-card:hover {
    border-color: #c7d2ce;
    box-shadow: 0 18px 42px rgba(26, 51, 42, .12);
    transform: translateY(-2px);
}

.hb-room-card__layout {
    display: grid;
    grid-template-columns:
        minmax(260px, 31%)
        minmax(0, 1fr)
        minmax(250px, 25%);
    min-height: 330px;
}

.hb-room-card__media,
.hb-room-card__content,
.hb-room-card__pricing {
    min-width: 0;
}

.hb-room-card__media {
    position: relative;
    min-height: 330px;
    background: #e8efec;
}

.hb-room-card__content {
    padding: 28px 30px;
}

.hb-room-card__pricing {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 26px 24px;
    border-left: 1px solid var(--hb-card-border);
    background: linear-gradient(180deg, #fbfdfc 0%, var(--hb-card-soft) 100%);
}

/* ----------------------------------------------------------------
   RESULT IMAGE
   ---------------------------------------------------------------- */

.hb-room-card__image-wrap {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 330px;
}

.hb-room-card__image {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 330px;
    object-fit: cover;
}

.hb-room-card__photo-count {
    position: absolute;
    right: 14px;
    bottom: 14px;
    padding: 6px 10px;
    border: 1px solid rgba(255, 255, 255, .55);
    border-radius: 999px;
    background: rgba(18, 31, 26, .78);
    color: #fff;
    font-size: .78rem;
    font-weight: 700;
    line-height: 1;
    backdrop-filter: blur(5px);
}

.hb-room-card__image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 330px;
    padding: 24px;
    background: linear-gradient(135deg, #eef3f1, #dde8e3);
    color: var(--hb-card-muted);
    text-align: center;
}

/* ----------------------------------------------------------------
   ROOM CONTENT
   ---------------------------------------------------------------- */

.hb-room-card__eyebrow {
    margin: 0 0 7px;
    color: var(--hb-card-accent);
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .08em;
    line-height: 1.25;
    text-transform: uppercase;
}

.hb-room-card__title {
    margin: 0;
    color: var(--hb-card-ink);
    font-size: clamp(1.35rem, 2vw, 1.75rem);
    line-height: 1.18;
}

.hb-room-card__quick-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin: 15px 0 0;
    padding: 0;
    color: #3d4b46;
    font-size: .91rem;
    font-weight: 650;
    list-style: none;
}

.hb-room-card__quick-facts li {
    display: inline-flex;
    gap: 7px;
    align-items: center;
}

.hb-room-card__quick-facts li + li::before {
    width: 5px;
    height: 5px;
    margin-right: 7px;
    border-radius: 50%;
    background: #a7b2ae;
    content: "";
}

.hb-room-card__description {
    display: -webkit-box;
    overflow: hidden;
    margin: 18px 0 0;
    color: var(--hb-card-muted);
    line-height: 1.58;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.hb-room-card__section-title {
    margin-bottom: 10px;
    color: #34423d;
    font-size: .82rem;
    font-weight: 800;
    letter-spacing: .035em;
    text-transform: uppercase;
}

.hb-room-card__amenities {
    margin: 20px 0 0;
}

.hb-room-card__amenity-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.hb-room-card__amenity {
    display: flex;
    gap: 7px;
    align-items: baseline;
    min-width: 0;
    color: #415049;
    font-size: .88rem;
    line-height: 1.35;
}

.hb-room-card__amenity::before {
    flex: 0 0 auto;
    color: var(--hb-card-accent);
    font-weight: 900;
    content: "\2713";
}

.hb-room-card__amenity--more {
    color: var(--hb-card-accent-dark);
    font-weight: 750;
}

/* ----------------------------------------------------------------
   AVAILABILITY
   ---------------------------------------------------------------- */

.hb-room-card__availability-badge {
    display: inline-flex;
    align-self: flex-start;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: .77rem;
    font-weight: 800;
    line-height: 1.15;
}

.hb-room-card__availability-badge--available {
    background: #e6f6ef;
    color: #0d674b;
}

.hb-room-card__availability-badge--low {
    background: #fff7e6;
    color: #7a5200;
}

.hb-room-card__availability-badge--critical {
    background: #fff0f0;
    color: #9b2929;
}

/* ----------------------------------------------------------------
   PRICE / TOTAL
   ---------------------------------------------------------------- */

.hb-room-card__total {
    padding-bottom: 18px;
    border-bottom: 1px solid var(--hb-card-border);
}

.hb-room-card__total-label {
    color: var(--hb-card-muted);
    font-size: .84rem;
    font-weight: 700;
}

.hb-room-card__total-value {
    margin: 5px 0 6px;
    color: var(--hb-card-ink);
    font-size: clamp(1.65rem, 2.4vw, 2rem);
    font-weight: 800;
    line-height: 1.05;
}

.hb-room-card__total-value span {
    font-size: .53em;
    font-weight: 750;
    letter-spacing: .04em;
}

.hb-room-card__price-period {
    color: var(--hb-card-muted);
    font-size: .79rem;
    line-height: 1.4;
}

.hb-room-card__price-facts {
    display: grid;
    gap: 8px;
    margin: 0;
}

.hb-room-card__price-facts > div {
    display: flex;
    gap: 14px;
    align-items: baseline;
    justify-content: space-between;
}

.hb-room-card__price-facts dt {
    color: var(--hb-card-muted);
    font-size: .84rem;
}

.hb-room-card__price-facts dd {
    margin: 0;
    font-size: .88rem;
    font-weight: 750;
}

/* ----------------------------------------------------------------
   ACTIONS
   ---------------------------------------------------------------- */

.hb-room-card__actions {
    display: grid;
    gap: 10px;
    margin-top: auto;
}

.hb-room-card__actions .hb-button {
    width: 100%;
    min-height: 46px;
    border-radius: 8px;
}

.hb-room-card__actions .hb-button--primary {
    border-color: var(--hb-card-accent);
    background: var(--hb-card-accent);
    color: #fff;
}

.hb-room-card__actions .hb-button--primary:hover,
.hb-room-card__actions .hb-button--primary:focus {
    border-color: var(--hb-card-accent-dark);
    background: var(--hb-card-accent-dark);
    color: #fff;
}

.hb-room-card__actions .hb-button--secondary {
    border-color: #a9b8b2;
    background: #fff;
    color: var(--hb-card-accent-dark);
}

.hb-room-card__actions .hb-button--secondary:hover,
.hb-room-card__actions .hb-button--secondary:focus {
    border-color: var(--hb-card-accent);
    background: #eef8f4;
    color: var(--hb-card-accent-dark);
}

.hb-room-card__action-note {
    margin: -8px 0 0;
    color: var(--hb-card-muted);
    font-size: .75rem;
    line-height: 1.4;
    text-align: center;
}

/* ----------------------------------------------------------------
   RESPONSIVE FALLBACKS (VIEWPORT)
   ---------------------------------------------------------------- */

@media (max-width: 1120px) {
    .hb-search-form__grid {
        grid-template-columns: repeat(2, minmax(150px, 1fr));
    }

    .hb-search-form__action {
        grid-column: 1 / -1;
    }

    .hb-search-form__action .hb-button {
        width: 100%;
    }

    .hb-search-summary__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hb-room-card__layout {
        grid-template-columns:
            minmax(260px, 38%)
            minmax(0, 1fr);
    }

    .hb-room-card__pricing {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(190px, .8fr) minmax(220px, .9fr);
        align-items: center;
        border-top: 1px solid var(--hb-card-border);
        border-left: 0;
    }

    .hb-room-card__availability-badge {
        grid-column: 1 / -1;
    }

    .hb-room-card__total {
        padding: 0 18px 0 0;
        border-right: 1px solid var(--hb-card-border);
        border-bottom: 0;
    }

    .hb-room-card__actions {
        margin-top: 0;
    }

    .hb-room-card__action-note {
        grid-column: 3;
    }
}

@media (max-width: 720px) {
    .hb-search-form__grid {
        grid-template-columns: 1fr;
    }

    .hb-search-form__action {
        grid-column: auto;
    }

    .hb-search-form__action .hb-button {
        width: 100%;
    }

    .hb-search-form__heading {
        display: grid;
        gap: 7px;
    }

    .hb-search-form__hint {
        text-align: left;
    }

    .hb-search-summary__grid {
        grid-template-columns: 1fr;
    }

    .hb-room-card__layout {
        display: block;
    }

    .hb-room-card__media,
    .hb-room-card__image-wrap,
    .hb-room-card__image,
    .hb-room-card__image-placeholder {
        min-height: 230px;
        max-height: 310px;
    }

    .hb-room-card__content,
    .hb-room-card__pricing {
        padding: 22px 20px;
    }

    .hb-room-card__content {
        border-top: 1px solid var(--hb-card-border);
    }

    .hb-room-card__amenity-list {
        grid-template-columns: 1fr;
    }

    .hb-room-card__quick-facts {
        display: grid;
        gap: 7px;
    }

    .hb-room-card__quick-facts li + li::before {
        display: none;
    }

    .hb-room-card__pricing {
        display: flex;
        border-left: 0;
    }

    .hb-room-card__total {
        padding: 0 0 18px;
        border-right: 0;
        border-bottom: 1px solid var(--hb-card-border);
    }

    .hb-room-card__action-note {
        grid-column: auto;
    }
}

/*
 * The booking shortcode can sit inside a narrow theme column even when the
 * browser viewport is wide. Container queries therefore own the real layout
 * decisions; viewport rules above remain as a compatibility fallback.
 */
@container hb-booking (max-width: 919px) {
    .hb-search-form__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hb-search-form__action {
        grid-column: 1 / -1;
    }

    .hb-search-form__action .hb-button {
        width: 100%;
    }

    .hb-search-summary__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hb-room-card__layout {
        grid-template-columns:
            minmax(230px, 38%)
            minmax(0, 1fr);
    }

    .hb-room-card__pricing {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: minmax(0, 1.15fr) minmax(150px, .85fr);
        gap: 16px 24px;
        align-items: center;
        border-top: 1px solid var(--hb-card-border);
        border-left: 0;
    }

    .hb-room-card__availability-badge,
    .hb-room-card__actions,
    .hb-room-card__action-note {
        grid-column: 1 / -1;
    }

    .hb-room-card__total {
        padding: 0 20px 0 0;
        border-right: 1px solid var(--hb-card-border);
        border-bottom: 0;
    }

    .hb-room-card__actions {
        margin-top: 0;
    }
}

@container hb-booking (max-width: 540px) {
    .hb-booking__header {
        margin-bottom: 16px;
    }

    .hb-search-form,
    .hb-search-summary {
        border-radius: 13px;
    }

    .hb-search-form__heading {
        display: grid;
        gap: 7px;
    }

    .hb-search-form__hint {
        text-align: left;
    }

    .hb-search-form__grid,
    .hb-search-summary__grid {
        grid-template-columns: 1fr;
    }

    .hb-search-summary__heading {
        display: grid;
        gap: 4px;
    }

    .hb-room-card__layout {
        display: block;
    }

    .hb-room-card__media,
    .hb-room-card__image-wrap,
    .hb-room-card__image,
    .hb-room-card__image-placeholder {
        min-height: 230px;
        max-height: 310px;
    }

    .hb-room-card__content,
    .hb-room-card__pricing {
        padding: 22px 20px;
    }

    .hb-room-card__content {
        border-top: 1px solid var(--hb-card-border);
    }

    .hb-room-card__amenity-list {
        grid-template-columns: 1fr;
    }

    .hb-room-card__quick-facts {
        display: grid;
        gap: 7px;
    }

    .hb-room-card__quick-facts li + li::before {
        display: none;
    }

    .hb-room-card__pricing {
        display: flex;
        border-left: 0;
    }

    .hb-room-card__total {
        padding: 0 0 18px;
        border-right: 0;
        border-bottom: 1px solid var(--hb-card-border);
    }
}

@media (prefers-reduced-motion: reduce) {
    .hb-room-card {
        transition: none;
    }

    .hb-room-card:hover {
        transform: none;
    }
}

.hb-booking-confirmation__nightly-prices {
    margin-top: 24px;
}

.hb-booking-confirmation__table-wrap {
    overflow-x: auto;
}

.hb-booking-confirmation__nightly-prices table {
    width: 100%;
    border-collapse: collapse;
}

.hb-booking-confirmation__nightly-prices th,
.hb-booking-confirmation__nightly-prices td {
    padding: 10px 12px;
    border: 1px solid #e2e2e2;
    text-align: left;
}
.hb-stripe-payment {
    margin: 24px 0;
    padding: 24px;
    border: 1px solid #d9e3df;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(24, 52, 44, 0.08);
}

.hb-stripe-payment h3 {
    margin: 0 0 8px;
}

.hb-stripe-payment__element {
    min-height: 120px;
    margin: 18px 0;
}

.hb-stripe-payment__error {
    margin: 12px 0;
    padding: 10px 12px;
    border-radius: 8px;
    color: #8b1e2d;
    background: #fff0f2;
}

.hb-stripe-payment__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 160px;
    padding: 12px 18px;
    border: 0;
    border-radius: 8px;
    color: #fff;
    background: #1f5f4a;
    font-weight: 700;
    cursor: pointer;
}

.hb-stripe-payment__submit:disabled {
    cursor: wait;
    opacity: 0.65;
}

.hb-stripe-payment__security {
    margin: 14px 0 0;
    color: #60706a;
    font-size: 0.9em;
}

.hb-stripe-payment [data-hb-stripe-spinner] {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: hb-stripe-spin 0.7s linear infinite;
}

@keyframes hb-stripe-spin {
    to {
        transform: rotate(360deg);
    }
}
