/*
 * Booking flow and guest account pages. Built on the theme's variables
 * (style.css :root): --heading-color gold, --rts-heading / --rts-para text,
 * --rts-gray panels, --rts-border hairlines, Gilda Display + Jost.
 */

.booking__page {
  --booking-radius: 12px;
  --booking-shadow: 0 10px 30px rgba(27, 27, 27, 0.06);
  --booking-success: #1f8a4c;
  --booking-danger: #c0392b;
  --booking-warning: #b86e00;
  padding: 60px 0 100px;
  background: #faf8f5;
}

@media screen and (max-width: 768px) {
  .booking__page {
    padding: 32px 0 120px;
  }
}

/* ------------------------------------------------------------- hero */

.page__hero__height.booking__hero {
  height: 420px;
}

@media screen and (max-width: 768px) {
  .page__hero__height.booking__hero {
    height: 300px;
  }
}

.booking__hero .page__hero__content h1 {
  margin-bottom: 12px;
}

/* ------------------------------------------------------------ steps */

.booking__steps {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 0 auto 40px;
  padding: 0;
  list-style: none;
  max-width: 640px;
  counter-reset: step;
}

.booking__steps li {
  flex: 1;
  position: relative;
  text-align: center;
  font-size: 15px;
  color: var(--rts-para);
}

.booking__steps li::before {
  counter-increment: step;
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin: 0 auto 8px;
  border-radius: 50%;
  border: 1px solid var(--rts-border);
  background: var(--rts-white);
  font-weight: 500;
  position: relative;
  z-index: 1;
}

.booking__steps li::after {
  content: "";
  position: absolute;
  top: 18px;
  left: calc(50% + 26px);
  width: calc(100% - 52px);
  height: 1px;
  background: var(--rts-border);
}

.booking__steps li:last-child::after {
  display: none;
}

.booking__steps li.is__done::before {
  content: "\2713";
  background: var(--heading-color);
  border-color: var(--heading-color);
  color: #fff;
}

.booking__steps li.is__done::after {
  background: var(--heading-color);
}

.booking__steps li.is__current {
  color: var(--rts-heading);
  font-weight: 500;
}

.booking__steps li.is__current::before {
  border-color: var(--heading-color);
  color: var(--heading-color);
  box-shadow: 0 0 0 4px rgba(171, 138, 98, 0.15);
}

.booking__steps a {
  color: inherit;
}

@media screen and (max-width: 576px) {
  .booking__steps {
    margin-bottom: 28px;
  }

  .booking__steps li {
    font-size: 13px;
  }
}

/* ---------------------------------------------------- shared pieces */

.booking__card {
  background: var(--rts-white);
  border: 1px solid rgba(125, 128, 135, 0.18);
  border-radius: var(--booking-radius);
  box-shadow: var(--booking-shadow);
  padding: 32px;
}

@media screen and (max-width: 576px) {
  .booking__card {
    padding: 22px 18px;
  }
}

.booking__card + .booking__card {
  margin-top: 24px;
}

.booking__card__title {
  font-family: var(--glida);
  font-size: 24px;
  color: var(--rts-heading);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.booking__card__title .booking__card__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(171, 138, 98, 0.12);
  color: var(--heading-color);
  font-family: var(--jost);
  font-size: 15px;
  font-weight: 500;
  flex-shrink: 0;
}

.booking__muted {
  color: var(--rts-para);
  font-size: 15px;
}

.booking__alert {
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 24px;
  font-size: 15px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.booking__alert ul {
  margin: 0;
  padding-left: 18px;
}

.booking__alert.is__success {
  background: #eaf6ee;
  color: var(--booking-success);
  border: 1px solid #c9e8d3;
}

.booking__alert.is__error {
  background: #fcecea;
  color: var(--booking-danger);
  border: 1px solid #f3cdc8;
}

.booking__alert.is__info {
  background: rgba(171, 138, 98, 0.08);
  color: var(--rts-heading);
  border: 1px solid rgba(171, 138, 98, 0.25);
}

.booking__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  background: var(--rts-gray);
  color: var(--rts-heading);
  white-space: nowrap;
}

.booking__badge.is__success {
  background: #eaf6ee;
  color: var(--booking-success);
}

.booking__badge.is__warning {
  background: #fff4e5;
  color: var(--booking-warning);
}

.booking__badge.is__danger {
  background: #fcecea;
  color: var(--booking-danger);
}

.booking__badge.is__gold {
  background: rgba(171, 138, 98, 0.12);
  color: #8a6c47;
}

.booking__link {
  color: var(--heading-color);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.booking__link:hover {
  color: var(--rts-heading);
}

.booking__page .theme-btn {
  min-height: 48px;
}

.booking__page .theme-btn.fill span {
  color: #fff;
}

.booking__page .theme-btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

.booking__btn__row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.booking__btn__outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 8px 22px;
  border: 1px solid var(--rts-border);
  background: var(--rts-white);
  color: var(--rts-heading);
  font-size: 16px;
  transition: var(--transition);
}

.booking__btn__outline:hover {
  border-color: var(--heading-color);
  color: var(--heading-color);
}

.booking__btn__danger {
  border-color: #f3cdc8;
  color: var(--booking-danger);
}

.booking__btn__danger:hover {
  background: #fcecea;
  border-color: var(--booking-danger);
  color: var(--booking-danger);
}

/* ------------------------------------------------------ search bar */

.booking__search {
  background: var(--rts-white);
  border-radius: var(--booking-radius);
  box-shadow: var(--booking-shadow);
  padding: 24px;
  margin-bottom: 32px;
}

.booking__search .advance__search__wrapper {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 16px;
  align-items: end;
}

.booking__search .query__input {
  width: 100%;
  min-width: 0;
}

.booking__search .search__btn {
  height: 60px;
  white-space: nowrap;
}

@media screen and (max-width: 1200px) {
  .booking__search .advance__search__wrapper {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .booking__search .search__btn {
    grid-column: 1 / -1;
    width: 100%;
  }
}

@media screen and (max-width: 576px) {
  .booking__search {
    padding: 18px;
  }

  .booking__search .advance__search__wrapper {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.booking__sidebar__note {
  width: 100%;
  font-size: 14px;
  color: var(--rts-para);
  text-align: center;
}

.booking__sidebar__note i {
  color: var(--heading-color);
  margin-right: 4px;
}

/* --------------------------------------------------------- results */

.booking__results__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 8px 24px;
  margin-bottom: 20px;
}

.booking__results__head h2 {
  font-size: 30px;
  margin: 0;
}

.booking__results {
  display: grid;
  gap: 24px;
}

.booking__room {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr) 240px;
  background: var(--rts-white);
  border: 1px solid rgba(125, 128, 135, 0.18);
  border-radius: var(--booking-radius);
  box-shadow: var(--booking-shadow);
  overflow: hidden;
  transition: var(--transition);
}

.booking__room:hover {
  box-shadow: 0 16px 40px rgba(27, 27, 27, 0.1);
}

.booking__room.is__unavailable {
  opacity: 0.7;
}

.booking__room.is__unavailable .booking__room__image img {
  filter: grayscale(0.6);
}

.booking__room__image {
  position: relative;
  min-height: 220px;
  background: var(--rts-gray);
}

.booking__room__image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.booking__room__image .booking__badge {
  position: absolute;
  top: 14px;
  left: 14px;
}

.booking__room__body {
  padding: 26px 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.booking__room__eyebrow {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--heading-color);
}

.booking__room__title {
  font-size: 28px;
  margin: 0;
  line-height: 1.2;
}

.booking__room__title a {
  color: var(--rts-heading);
}

.booking__room__title a:hover {
  color: var(--heading-color);
}

.booking__room__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-size: 15px;
  color: var(--rts-para);
}

.booking__room__meta i {
  color: var(--heading-color);
  margin-right: 6px;
}

.booking__room__summary {
  font-size: 15px;
  color: var(--rts-para);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.booking__room__perks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.booking__room__price {
  padding: 26px 24px;
  border-left: 1px solid rgba(125, 128, 135, 0.18);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  text-align: right;
  background: #fdfcfa;
}

.booking__room__rate {
  font-family: var(--glida);
  font-size: 32px;
  color: var(--rts-heading);
  line-height: 1.1;
}

.booking__room__rate small {
  font-family: var(--jost);
  font-size: 15px;
  color: var(--rts-para);
}

.booking__room__total {
  font-size: 15px;
  color: var(--rts-para);
  margin-bottom: 12px;
}

.booking__room__total strong {
  color: var(--rts-heading);
  font-weight: 500;
}

.booking__room__price .theme-btn {
  width: 100%;
  text-align: center;
}

.booking__room__reason {
  font-size: 14px;
  color: var(--booking-danger);
  margin: 0;
}

@media screen and (max-width: 1200px) {
  .booking__room {
    grid-template-columns: 260px minmax(0, 1fr) 220px;
  }
}

@media screen and (max-width: 992px) {
  .booking__room {
    grid-template-columns: 240px minmax(0, 1fr);
  }

  .booking__room__price {
    grid-column: 1 / -1;
    border-left: 0;
    border-top: 1px solid rgba(125, 128, 135, 0.18);
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    padding: 18px 24px;
  }

  .booking__room__total {
    margin: 0;
  }

  .booking__room__price .theme-btn {
    width: auto;
    min-width: 180px;
  }
}

@media screen and (max-width: 576px) {
  .booking__room {
    grid-template-columns: 1fr;
  }

  .booking__room__image {
    min-height: 200px;
  }

  .booking__room__body {
    padding: 20px 18px 8px;
  }

  .booking__room__title {
    font-size: 24px;
  }

  .booking__room__price {
    padding: 16px 18px 20px;
  }

  .booking__room__price .theme-btn {
    width: 100%;
  }
}

.booking__empty {
  text-align: center;
  padding: 56px 24px;
}

.booking__empty i {
  font-size: 40px;
  color: var(--heading-color);
}

.booking__perks {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 48px;
}

.booking__perk {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 20px;
  background: var(--rts-white);
  border-radius: var(--booking-radius);
  border: 1px solid rgba(125, 128, 135, 0.18);
}

.booking__perk i {
  font-size: 26px;
  color: var(--heading-color);
  line-height: 1;
}

.booking__perk strong {
  display: block;
  font-weight: 500;
  color: var(--rts-heading);
}

.booking__perk span {
  font-size: 14px;
  color: var(--rts-para);
}

@media screen and (max-width: 992px) {
  .booking__perks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media screen and (max-width: 576px) {
  .booking__perks {
    grid-template-columns: 1fr;
  }
}

/* ------------------------------------------------------------ forms */

.booking__form .form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 20px;
}

.booking__form .form__grid .is__full {
  grid-column: 1 / -1;
}

@media screen and (max-width: 576px) {
  .booking__form .form__grid {
    grid-template-columns: 1fr;
  }
}

.booking__field label {
  display: block;
  font-size: 15px;
  font-weight: 500;
  color: var(--rts-heading);
  margin-bottom: 8px;
}

.booking__field label .booking__optional {
  font-weight: 400;
  color: var(--rts-para);
  font-size: 13px;
}

.booking__field input[type="text"],
.booking__field input[type="email"],
.booking__field input[type="tel"],
.booking__field input[type="password"],
.booking__field select,
.booking__field textarea {
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  border: 1px solid rgba(125, 128, 135, 0.35);
  border-radius: 8px;
  background: var(--rts-white);
  color: var(--rts-heading);
  font-size: 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.booking__field textarea {
  min-height: 110px;
  resize: vertical;
}

.booking__field input:focus,
.booking__field select:focus,
.booking__field textarea:focus {
  outline: none;
  border-color: var(--heading-color);
  box-shadow: 0 0 0 3px rgba(171, 138, 98, 0.18);
}

.booking__field.has__error input,
.booking__field.has__error select,
.booking__field.has__error textarea {
  border-color: var(--booking-danger);
}

.booking__field__error {
  display: block;
  margin-top: 6px;
  font-size: 14px;
  color: var(--booking-danger);
}

.booking__field__hint {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: var(--rts-para);
}

.booking__check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  cursor: pointer;
  font-size: 15px;
  color: var(--rts-heading);
}

.booking__check input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--heading-color);
}

.booking__signin {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 16px;
  padding: 14px 18px;
  margin-bottom: 24px;
  border-radius: 10px;
  background: rgba(171, 138, 98, 0.08);
  font-size: 15px;
}

/* --------------------------------------------------- payment options */

.booking__payments {
  display: grid;
  gap: 12px;
}

.booking__payment {
  position: relative;
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid rgba(125, 128, 135, 0.35);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.booking__payment input {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  accent-color: var(--heading-color);
}

.booking__payment__label {
  flex: 1;
  min-width: 0;
}

.booking__payment__label strong {
  display: block;
  font-weight: 500;
  color: var(--rts-heading);
}

.booking__payment__label span {
  font-size: 14px;
  color: var(--rts-para);
}

.booking__payment:has(input:checked) {
  border-color: var(--heading-color);
  background: rgba(171, 138, 98, 0.06);
  box-shadow: 0 0 0 1px var(--heading-color);
}

.booking__payment.is__disabled {
  cursor: not-allowed;
  background: #fafafa;
}

.booking__payment.is__disabled .booking__payment__label {
  opacity: 0.55;
}

/* ------------------------------------------------------- summary */

.booking__summary {
  position: sticky;
  top: 120px;
}

.booking__summary__image {
  margin: -32px -32px 22px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--booking-radius) var(--booking-radius) 0 0;
  background: var(--rts-gray);
}

.booking__summary__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media screen and (max-width: 576px) {
  .booking__summary__image {
    margin: -22px -18px 18px;
  }
}

.booking__summary h3 {
  font-size: 26px;
  margin-bottom: 18px;
}

.booking__summary__dates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid rgba(125, 128, 135, 0.2);
  border-radius: 10px;
  margin-bottom: 18px;
}

.booking__summary__dates > div {
  padding: 12px 16px;
}

.booking__summary__dates > div + div {
  border-left: 1px solid rgba(125, 128, 135, 0.2);
}

.booking__summary__dates span {
  display: block;
  font-size: 13px;
  color: var(--rts-para);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.booking__summary__dates strong {
  font-weight: 500;
  color: var(--rts-heading);
}

.booking__summary__list {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  display: grid;
  gap: 10px;
  font-size: 15px;
}

.booking__summary__list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--rts-para);
}

.booking__summary__list li strong {
  color: var(--rts-heading);
  font-weight: 500;
  text-align: right;
}

.booking__summary__total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 16px;
  border-top: 1px dashed rgba(125, 128, 135, 0.4);
}

.booking__summary__total span {
  font-weight: 500;
  color: var(--rts-heading);
}

.booking__summary__total strong {
  font-family: var(--glida);
  font-size: 32px;
  color: var(--rts-heading);
  font-weight: 400;
}

.booking__summary__note {
  margin: 14px 0 0;
  font-size: 14px;
  color: var(--booking-success);
  display: flex;
  gap: 8px;
  align-items: center;
}

@media screen and (max-width: 992px) {
  .booking__summary {
    position: static;
  }
}

/* Mobile: a fixed bar with the total and the confirm button. */
.booking__mobile__bar {
  display: none;
}

@media screen and (max-width: 992px) {
  .booking__mobile__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: var(--rts-white);
    box-shadow: 0 -8px 24px rgba(27, 27, 27, 0.1);
  }

  .booking__mobile__bar span {
    display: block;
    font-size: 13px;
    color: var(--rts-para);
  }

  .booking__mobile__bar strong {
    font-family: var(--glida);
    font-size: 24px;
    color: var(--rts-heading);
    font-weight: 400;
  }

  .booking__mobile__bar .theme-btn {
    flex-shrink: 0;
  }
}

/* --------------------------------------------------- confirmation */

.booking__success {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 32px;
}

.booking__success__icon {
  width: 76px;
  height: 76px;
  margin: 0 auto 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eaf6ee;
  color: var(--booking-success);
  font-size: 34px;
  animation: booking-pop 0.5s ease-out;
}

@keyframes booking-pop {
  0% { transform: scale(0.4); opacity: 0; }
  70% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); }
}

.booking__success h2 {
  font-size: 40px;
  margin-bottom: 10px;
}

@media screen and (max-width: 576px) {
  .booking__success h2 {
    font-size: 30px;
  }
}

.booking__reference {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 28px;
  margin: 18px 0 8px;
  border: 1px dashed var(--heading-color);
  border-radius: 10px;
  background: rgba(171, 138, 98, 0.06);
}

.booking__reference span {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--rts-para);
}

.booking__reference strong {
  font-family: var(--glida);
  font-size: 30px;
  letter-spacing: 0.08em;
  color: var(--rts-heading);
  font-weight: 400;
}

.booking__details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 24px;
  margin: 0;
}

.booking__details dt {
  font-size: 13px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--rts-para);
  margin-bottom: 2px;
}

.booking__details dd {
  margin: 0;
  color: var(--rts-heading);
  overflow-wrap: anywhere;
}

@media screen and (max-width: 576px) {
  .booking__details {
    grid-template-columns: 1fr;
  }
}

/* -------------------------------------------------------- account */

.booking__auth {
  max-width: 520px;
  margin: 0 auto;
}

.booking__auth .booking__card__title {
  justify-content: center;
}

.booking__auth__footer {
  text-align: center;
  margin-top: 20px;
  font-size: 15px;
  color: var(--rts-para);
}

.booking__auth__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.booking__account__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}

.booking__account__head h2 {
  font-size: 32px;
  margin: 0;
}

.booking__section__title {
  font-size: 24px;
  margin: 36px 0 16px;
}

.booking__list {
  display: grid;
  gap: 16px;
}

.booking__item {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 16px;
  background: var(--rts-white);
  border: 1px solid rgba(125, 128, 135, 0.18);
  border-radius: var(--booking-radius);
}

.booking__item__image {
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  overflow: hidden;
  background: var(--rts-gray);
}

.booking__item__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.booking__item h4 {
  font-size: 22px;
  margin: 4px 0;
}

.booking__item__meta {
  font-size: 15px;
  color: var(--rts-para);
}

.booking__item__side {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.booking__item__side strong {
  font-family: var(--glida);
  font-size: 24px;
  font-weight: 400;
  color: var(--rts-heading);
}

@media screen and (max-width: 768px) {
  .booking__item {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .booking__item__side {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: left;
  }
}

/* --------------------------------------------------------- print */

@media print {
  .top__bar,
  .main__header,
  .rts__footer,
  .booking__hero,
  .booking__steps,
  .booking__btn__row,
  .gdpr__cookie,
  .booking__mobile__bar {
    display: none !important;
  }

  .booking__page {
    padding: 0;
    background: #fff;
  }

  .booking__card {
    box-shadow: none;
  }
}
