/* Hero khách sạn — nền fullscreen (tgwv-hotels). Builds on tgwv-builder-slide-anh-2/frontend.css + request-form.css. */
/* The request form (calendar, popup) takes the site brand colour inside the hero instead of its blue fallback. */
.tgwv-hotel-hero {
    --tgwv-color-primary: var(--tgwv-brand, #b3122e);
}

.tgwv-hotel-hero {
    --tgwv-hotel-hero-accent: var(--tgwv-color-primary);
    --tgwv-hotel-hero-ink: #1f2937;
    --tgwv-hotel-hero-muted: #8a8f98;
    --tgwv-hotel-hero-line: #e5e7eb;
}

/* ---------- Title: serif italic + decorative divider ---------- */
.tgwv-hotel-hero--serif .tgwv-slide-2__title {
    font-family: "Playfair Display", "Cormorant Garamond", Georgia, "Times New Roman", serif;
    font-style: italic;
    font-weight: 600;
    font-size: clamp(30px, 3.6vw, 52px) !important;
    line-height: 1.32;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 18px;
}

.tgwv-hotel-hero.tgwv-slide-2--align-left .tgwv-slide-2__title { margin-left: 0; }
.tgwv-hotel-hero.tgwv-slide-2--align-right .tgwv-slide-2__title { margin-right: 0; }

.tgwv-hotel-hero--divider .tgwv-slide-2__text-inner::after {
    content: "";
    display: block;
    width: min(460px, 80%);
    height: 40px;
    margin: 0 auto 8px;
    opacity: 0;
    animation: tgwv-slide-2-fade-in-up 1s ease 0.5s forwards;
    background:
        linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.85)) left center / calc(50% - 30px) 1.5px no-repeat,
        linear-gradient(90deg, rgba(255, 255, 255, 0.85), transparent) right center / calc(50% - 30px) 1.5px no-repeat,
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath fill='%23fff' d='M32 3l5 10 6-3-2 12 9-7 2 7 7-1-4 9 5 3-14 10 2 5-12-2v15h-4V46l-12 2 2-5L8 33l5-3-4-9 7 1 2-7 9 7-2-12 6 3z'/%3E%3C/svg%3E") center / 34px 34px no-repeat;
}

.tgwv-hotel-hero.tgwv-slide-2--align-left .tgwv-slide-2__text-inner::after { margin-left: 0; }
.tgwv-hotel-hero.tgwv-slide-2--align-right .tgwv-slide-2__text-inner::after { margin-right: 0; }

.tgwv-hotel-hero .tgwv-slide-2__content { max-width: 820px; }

/* ---------- Booking bar ---------- */
.tgwv-hotel-hero__booking {
    position: absolute;
    z-index: 5;
    left: 0;
    right: 0;
    bottom: clamp(56px, 14vh, 140px);
    padding: 0 16px;
    pointer-events: none;
}

.tgwv-hotel-hero--booking .tgwv-slide-2__container {
    padding-top: 120px;
    padding-bottom: clamp(170px, 26vh, 260px);
}

.tgwv-hotel-hero__bar {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto;
    align-items: center;
    max-width: 1170px;
    margin: 0 auto;
    padding: 14px 22px 14px 14px;
    border-radius: 14px;
    background: #fff;
    color: var(--tgwv-hotel-hero-ink);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
    pointer-events: auto;
    text-align: left;
}

.tgwv-hotel-hero__icon { flex: 0 0 auto; display: block; }

.tgwv-hotel-hero__dates,
.tgwv-hotel-hero__date-field { min-width: 0; }

.tgwv-hotel-hero__date-field { position: relative; }

/* One trigger (shared date picker) rendered as two fields */
.tgwv-hotel-hero .tgwv-hotel-hero__date-trigger {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

/* Each date field is a button inside the shared trigger row */
.tgwv-hotel-hero__date-slot {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.tgwv-hotel-hero__field {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    padding: 8px 18px;
    border-right: 1px solid var(--tgwv-hotel-hero-line);
    font: inherit;
    color: inherit;
}

.tgwv-hotel-hero__field > .tgwv-hotel-hero__icon { color: var(--tgwv-hotel-hero-accent); width: 24px; height: 24px; }

.tgwv-hotel-hero__field-text {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1 1 auto;
    min-width: 0;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--tgwv-hotel-hero-line);
}

.tgwv-hotel-hero__label {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--tgwv-hotel-hero-ink);
}

.tgwv-hotel-hero__value {
    font-size: 13px;
    line-height: 1.3;
    color: var(--tgwv-hotel-hero-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tgwv-hotel-hero__value.is-empty { color: var(--tgwv-hotel-hero-muted); }

.tgwv-hotel-hero__field-end {
    align-self: flex-end;
    margin-left: -30px;
    padding-bottom: 8px;
    color: var(--tgwv-hotel-hero-muted);
}

.tgwv-hotel-hero__field-end .tgwv-hotel-hero__icon { width: 17px; height: 17px; }

.tgwv-hotel-hero__date-slot:hover .tgwv-hotel-hero__field-text,
.tgwv-hotel-hero__guests-trigger:hover .tgwv-hotel-hero__field-text,
.tgwv-hotel-hero__date-slot[aria-expanded="true"] .tgwv-hotel-hero__field-text,
.tgwv-hotel-hero__guests-trigger[aria-expanded="true"] .tgwv-hotel-hero__field-text {
    border-bottom-color: var(--tgwv-hotel-hero-accent);
}

.tgwv-hotel-hero__date-slot:focus-visible,
.tgwv-hotel-hero__guests-trigger:focus-visible,
.tgwv-hotel-hero__submit:focus-visible {
    outline: 3px solid var(--tgwv-hotel-hero-accent);
    outline-offset: 2px;
}

.tgwv-hotel-hero__date-trigger[aria-invalid="true"] .tgwv-hotel-hero__field-text { border-bottom-color: #b91c1c; }

/* Calendar opens under the date fields (one month). The base hero clips at its edge, so it is made visible:
   the background slider keeps its own clipping, and the calendar may hang past the hero's bottom edge. */
.tgwv-hotel-hero.tgwv-hotel-hero--booking { overflow: visible; }

.tgwv-hotel-hero .tgwv-hotel-hero__calendar { color: var(--tgwv-hotel-hero-ink); }

.tgwv-hotel-hero.tgwv-hotel-hero--booking .tgwv-hotel-request__calendar {
    /* Overrides the phone bottom sheet (position: fixed) in request-form.css. */
    position: absolute;
    top: calc(100% + 8px);
    bottom: auto;
    left: 0;
    right: auto;
    z-index: 100;
    width: max-content;
    max-width: 100%;
    max-height: none;
    overflow: visible;
    padding: 12px 14px;
    border-radius: 12px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.25);
}

.tgwv-hotel-hero.tgwv-hotel-hero--booking .tgwv-hotel-request__calendar-foot { justify-content: flex-end; }

/* Fade in when opened; fade out when a date is picked (request-form.js hides it after the fade). */
.tgwv-hotel-hero .tgwv-hotel-hero__calendar:not([hidden]) { animation: tgwv-hotel-cal-in 0.16s ease-out; }
.tgwv-hotel-hero .tgwv-hotel-hero__calendar.is-closing { animation: tgwv-hotel-cal-out 0.16s ease-in forwards; }
@keyframes tgwv-hotel-cal-in {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: none; }
}
@keyframes tgwv-hotel-cal-out {
    from { opacity: 1; transform: none; }
    to { opacity: 0; transform: translateY(-4px); }
}

/* Narrow screens: the calendar takes the width of the date fields and its days share that width. */
@media (max-width: 639px) {
    .tgwv-hotel-hero.tgwv-hotel-hero--booking .tgwv-hotel-request__calendar { width: min(300px, 100%); }
    .tgwv-hotel-hero.tgwv-hotel-hero--booking .tgwv-hotel-request__month table { width: 100%; }
    .tgwv-hotel-hero.tgwv-hotel-hero--booking .tgwv-hotel-request__month th { font-size: 0.7rem; letter-spacing: -0.02em; }
    .tgwv-hotel-hero.tgwv-hotel-hero--booking .tgwv-hotel-request__day { display: block; width: 100%; max-width: 40px; height: 38px; margin: 0 auto; }
}

/* Guests */
.tgwv-hotel-hero__guests { position: relative; min-width: 0; }

.tgwv-hotel-hero__guests-trigger {
    width: 100%;
    background: transparent;
    border-top: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 0;
    text-align: left;
    cursor: pointer;
}

.tgwv-hotel-hero__guests-trigger .tgwv-hotel-hero__field-end { margin-left: 0; color: var(--tgwv-hotel-hero-ink); }
.tgwv-hotel-hero__guests-trigger[aria-expanded="true"] .tgwv-hotel-hero__icon--chevron { transform: rotate(180deg); }

.tgwv-hotel-hero__guests-panel {
    position: absolute;
    z-index: 50;
    left: 0;
    right: 0;
    top: calc(100% + 8px);
    min-width: 260px;
    padding: 14px 16px;
    border-radius: 12px;
    background: #fff;
    color: var(--tgwv-hotel-hero-ink);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.22);
}

.tgwv-hotel-hero__guests-panel[hidden] { display: none; }

.tgwv-hotel-hero__stepper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--tgwv-hotel-hero-line);
}

.tgwv-hotel-hero__stepper-label { display: flex; flex-direction: column; font-weight: 600; }
.tgwv-hotel-hero__stepper-label small { font-weight: 400; color: var(--tgwv-hotel-hero-muted); }

.tgwv-hotel-hero__stepper-controls { display: inline-flex; align-items: center; gap: 10px; }

.tgwv-hotel-hero__stepper-controls button {
    width: 36px;
    height: 36px;
    border: 1px solid var(--tgwv-hotel-hero-line);
    border-radius: 50%;
    background: #fff;
    color: var(--tgwv-hotel-hero-ink);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.tgwv-hotel-hero__stepper-controls button:hover:not(:disabled) { border-color: var(--tgwv-hotel-hero-accent); color: var(--tgwv-hotel-hero-accent); }
.tgwv-hotel-hero__stepper-controls button:disabled { opacity: 0.35; cursor: not-allowed; }
.tgwv-hotel-hero__stepper-controls output { min-width: 24px; text-align: center; font-weight: 600; }

.tgwv-hotel-hero__guests-done {
    display: block;
    margin: 10px 0 0 auto;
    padding: 6px 14px;
    border: 0;
    background: none;
    color: var(--tgwv-hotel-hero-accent);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

/* Submit */
.tgwv-hotel-hero__action { padding-left: 22px; }

.tgwv-hotel-hero__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-width: 222px;
    height: 56px;
    padding: 0 28px;
    border: 0;
    border-radius: 8px;
    background: var(--tgwv-hotel-hero-accent);
    color: #fff;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    transition: filter 0.2s ease, transform 0.2s ease;
}

.tgwv-hotel-hero__submit:hover { filter: brightness(1.1); transform: translateY(-1px); }
.tgwv-hotel-hero__submit .tgwv-hotel-hero__icon { width: 21px; height: 21px; }

/* The open calendar sits above the floating contact buttons. */
.tgwv-hotel-hero__booking:has(.tgwv-hotel-hero__calendar:not([hidden])),
.tgwv-hotel-hero__booking:has(.tgwv-hotel-hero__guests-panel:not([hidden])) { z-index: 100000; }

.tgwv-hotel-hero__status {
    grid-column: 1 / -1;
    margin: 0;
    font-size: 14px;
    color: #b91c1c;
}

.tgwv-hotel-hero__status:empty { display: none; }
.tgwv-hotel-hero__status:not(:empty) { padding: 8px 18px 0; }

.tgwv-hotel-hero .tgwv-hotel-request__day:hover:not([aria-disabled="true"]) { background: #fdecec; }
.tgwv-hotel-hero .tgwv-hotel-request__day.is-in-range { background: #fde2e2; }


/* ---------- Tablet ---------- */
@media (max-width: 1199px) {
    .tgwv-hotel-hero__field { padding: 8px 12px; gap: 10px; }
    .tgwv-hotel-hero__submit { min-width: 0; }
    .tgwv-hotel-hero__action { padding-left: 14px; }
}

/* ---------- Mobile: bar flows under the title, the hero grows to fit ---------- */
@media (max-width: 767px) {
    .tgwv-hotel-hero.tgwv-hotel-hero--booking.tgwv-slide-2--fullscreen,
    .tgwv-hotel-hero.tgwv-hotel-hero--booking.tgwv-slide-2--ratio {
        height: auto;
        min-height: 100vh;
        min-height: 100svh;
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 40px 0 72px;
        overflow: visible;
    }

    .tgwv-hotel-hero--booking .tgwv-slide-2__container { height: auto; padding-top: 0; padding-bottom: 20px; }

    .tgwv-hotel-hero__booking { position: relative; bottom: auto; padding: 0 16px; }

    .tgwv-hotel-hero__bar { grid-template-columns: 1fr; padding: 8px 14px 14px; }

    .tgwv-hotel-hero .tgwv-hotel-hero__date-trigger { grid-template-columns: 1fr 1fr; }

    .tgwv-hotel-hero__field { padding: 10px 6px; border-right: 0; }
    .tgwv-hotel-hero__field-end { display: none; }
    .tgwv-hotel-hero__guests-trigger .tgwv-hotel-hero__field-end { display: block; }
    .tgwv-hotel-hero__label { font-size: 14px; }

    .tgwv-hotel-hero__action { padding: 10px 0 0; }
    .tgwv-hotel-hero__submit { width: 100%; height: 52px; }

}

@media (prefers-reduced-motion: reduce) {
    .tgwv-hotel-hero__submit { transition: none; }
    .tgwv-hotel-hero .tgwv-hotel-hero__calendar:not([hidden]),
    .tgwv-hotel-hero .tgwv-hotel-hero__calendar.is-closing { animation: none; }
}
