/* Hotel Booking Integration - frontend styles.
   Room cards are styled by the Safar theme (safar-room__item in its main.css);
   this file only covers what the theme has no rule for. */

/* Search bar. The theme styles the pills, labels and button
   (safar-booking-search-form-wrap in main.css); these rules make five fields
   and the button share one row and cover the date inputs. */
.hbi-search .safar-search-form .mphb_sc_search-form.hbi-room-search {
	flex-wrap: nowrap;
	align-items: flex-end;
}

.hbi-search .safar-search-form .mphb_sc_search-form.hbi-room-search p {
	flex: 1 1 0;
	width: auto;
	min-width: 0;
}

.hbi-search .safar-search-form .mphb_sc_search-form.hbi-room-search p.hbi-search-rooms {
	flex: 0.6 1 0;
}

.hbi-search .safar-search-form .mphb_sc_search-form.hbi-room-search p.mphb_sc_search-submit-button-wrapper {
	flex: 1.1 1 0;
	width: auto;
}

.hbi-search .hbi-room-search input[type="submit"].button {
	width: 100%;
	height: 56px;
	padding: 0 16px;
	border-radius: 50px;
	text-transform: uppercase;
	cursor: pointer;
	white-space: nowrap;
}

.hbi-search .hbi-room-search select,
.hbi-search .hbi-room-search input[type="text"],
.hbi-search .hbi-room-search input[type="date"] {
	font-size: 18px;
	font-family: inherit;
	color: var(--safar-heading-color, #362618);
	cursor: pointer;
}

/* Native date input (used when the themed calendar is unavailable): the whole
   pill opens the picker and the theme's calendar icon is the only one shown. */
.hbi-search .hbi-room-search input[type="date"]::-webkit-calendar-picker-indicator {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	cursor: pointer;
}

@media (max-width: 1199px) {
	.hbi-search .safar-search-form .mphb_sc_search-form.hbi-room-search {
		flex-wrap: wrap;
	}

	.hbi-search .safar-search-form .mphb_sc_search-form.hbi-room-search p,
	.hbi-search .safar-search-form .mphb_sc_search-form.hbi-room-search p.hbi-search-rooms,
	.hbi-search .safar-search-form .mphb_sc_search-form.hbi-room-search p.mphb_sc_search-submit-button-wrapper {
		flex: 1 1 calc(50% - 12px);
	}
}

@media (max-width: 575px) {
	.hbi-search .safar-search-form .mphb_sc_search-form.hbi-room-search p,
	.hbi-search .safar-search-form .mphb_sc_search-form.hbi-room-search p.hbi-search-rooms,
	.hbi-search .safar-search-form .mphb_sc_search-form.hbi-room-search p.mphb_sc_search-submit-button-wrapper {
		flex: 1 1 100%;
	}
}

/* Card layout ([hotel_search layout="card"]): a white box with an optional
   title and the fields two per row, for the home page hero. With box="no"
   only the fields are output, for a page that already supplies the box. */
.hbi-search.hbi-search--card.safar-booking-search-form-wrap {
	padding: 0;
	background: transparent;
}

.hbi-search.hbi-search--card.hbi-search--boxed.safar-booking-search-form-wrap {
	width: 100%;
	max-width: 580px;
	margin-inline: auto;
	padding: 40px;
	border-radius: 24px;
	background: #fff;
	box-sizing: border-box;
}

.hbi-search--card .hbi-search__title {
	margin: 0 0 28px;
	font-size: 36px;
	line-height: 1.2;
	text-align: center;
	color: var(--safar-heading-color, #362618);
}

.hbi-search--card .safar-search-form .mphb_sc_search-form.hbi-room-search p label {
	color: var(--safar-heading-color, #362618);
}

.hbi-search--card .safar-search-form .mphb_sc_search-form.hbi-room-search {
	flex-wrap: wrap;
	justify-content: flex-start;
	gap: 20px 12px;
}

.hbi-search--card .safar-search-form .mphb_sc_search-form.hbi-room-search p,
.hbi-search--card .safar-search-form .mphb_sc_search-form.hbi-room-search p.hbi-search-rooms {
	flex: 1 1 calc(50% - 6px);
	width: auto;
	min-width: 0;
	text-align: start;
}

.hbi-search--card .safar-search-form .mphb_sc_search-form.hbi-room-search p.mphb_sc_search-submit-button-wrapper {
	flex: 0 0 100%;
	margin-block-start: 4px;
	text-align: center;
}

.hbi-search--card .hbi-room-search button.hbi-search__submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 20px;
	width: auto;
	height: 56px;
	padding: 0 7px 0 32px;
	border-radius: 50px;
	line-height: 1;
	text-transform: uppercase;
	white-space: nowrap;
	cursor: pointer;
}

.hbi-search--card .hbi-search__arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 42px;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: #fff;
	color: var(--safar-primary-color, #c97a4f);
}

/* On a white box the fields need a tint to stand out. */
.hbi-search--card .safar-search-form .mphb_sc_search-form.hbi-room-search p select,
.hbi-search--card .safar-search-form .mphb_sc_search-form.hbi-room-search p input:not([type="submit"]),
.hbi-search--card .safar-search-form .mphb_sc_search-form.hbi-room-search p .nice-select {
	background-color: #f3f1ef;
}

@media (max-width: 479px) {
	.hbi-search.hbi-search--card.hbi-search--boxed.safar-booking-search-form-wrap {
		padding: 28px 20px;
	}

	.hbi-search--card .hbi-search__title {
		font-size: 28px;
	}

	.hbi-search--card .safar-search-form .mphb_sc_search-form.hbi-room-search p,
	.hbi-search--card .safar-search-form .mphb_sc_search-form.hbi-room-search p.hbi-search-rooms {
		flex: 1 1 100%;
	}
}

/* Calendar popup (jQuery UI datepicker) in the theme's colours. */
.hbi-datepicker.ui-datepicker {
	width: auto !important;
	padding: 0 0 12px;
	border: 0;
	border-radius: 16px;
	overflow: hidden;
	background: #fff;
	box-shadow: 0 24px 80px rgba(74, 58, 45, 0.18);
	font-family: var(--safar-body-font, inherit);
	z-index: 9999 !important;
}

.hbi-datepicker.ui-datepicker-multi .ui-datepicker-group {
	float: left;
	width: 300px;
	padding: 56px 12px 0;
	box-sizing: border-box;
}

.hbi-datepicker:not(.ui-datepicker-multi) {
	width: 300px !important;
	padding: 56px 12px 12px;
}

.hbi-datepicker .ui-datepicker-row-break {
	clear: both;
}

.hbi-datepicker .ui-datepicker-header {
	position: static;
	padding: 8px 0;
	border: 0;
	border-radius: 8px;
	background: var(--safar-heading-color, #362618);
	color: #fff;
}

.hbi-datepicker .ui-datepicker-title {
	margin: 0;
	text-align: center;
	font-size: 17px;
	font-weight: 500;
	line-height: 1.6;
	color: #fff;
}

/* Prev / Next sit in a coloured bar across the top of the popup. */
.hbi-datepicker.ui-datepicker::before {
	content: "";
	display: block;
	position: absolute;
	inset: 0 0 auto 0;
	height: 48px;
	background: var(--safar-primary-color, #c97a4f);
}

.hbi-datepicker .ui-datepicker-prev,
.hbi-datepicker .ui-datepicker-next {
	position: absolute;
	top: 0;
	width: auto;
	height: 48px;
	padding: 0 20px;
	border: 0 !important;
	background: none !important;
	color: #fff;
	font-size: 17px;
	font-weight: 400;
	line-height: 48px;
	cursor: pointer;
	z-index: 1;
}

.hbi-datepicker .ui-datepicker-prev {
	left: 0;
}

.hbi-datepicker .ui-datepicker-next {
	right: 0;
}

.hbi-datepicker .ui-datepicker-prev .ui-icon,
.hbi-datepicker .ui-datepicker-next .ui-icon {
	position: static;
	display: inline;
	width: auto;
	height: auto;
	margin: 0;
	background: none;
	text-indent: 0;
	overflow: visible;
}

.hbi-datepicker .ui-state-disabled.ui-datepicker-prev,
.hbi-datepicker .ui-state-disabled.ui-datepicker-next {
	opacity: 0.45;
	cursor: default;
}

.hbi-datepicker table.ui-datepicker-calendar {
	width: 100%;
	margin: 8px 0 0;
	border: 0;
	border-collapse: collapse;
	font-size: 15px;
}

.hbi-datepicker .ui-datepicker-calendar th {
	padding: 10px 0 6px;
	border: 0;
	background: none;
	font-weight: 400;
	letter-spacing: 1px;
	color: var(--safar-heading-color, #362618);
	text-align: center;
}

.hbi-datepicker .ui-datepicker-calendar td {
	padding: 2px;
	border: 0;
	background: none;
}

.hbi-datepicker .ui-datepicker-calendar td a,
.hbi-datepicker .ui-datepicker-calendar td span {
	display: block;
	padding: 6px 0;
	border: 0;
	border-radius: 6px;
	background: none;
	color: var(--safar-heading-color, #362618);
	text-align: center;
	text-decoration: none;
}

.hbi-datepicker .ui-datepicker-calendar td.ui-datepicker-week-end a {
	background: var(--safar-shade-color, #faf5f1);
}

.hbi-datepicker .ui-datepicker-calendar td.ui-state-disabled span {
	color: #b9b9b9;
}

.hbi-datepicker .ui-datepicker-calendar td.ui-datepicker-today a {
	color: var(--safar-primary-color, #c97a4f);
}

.hbi-datepicker .ui-datepicker-calendar td a:hover,
.hbi-datepicker .ui-datepicker-calendar td.ui-datepicker-current-day a {
	background: var(--safar-primary-color, #c97a4f);
	color: #fff;
}

.hbi-room-list__summary {
	margin-block-end: 24px;
	font-size: 18px;
}

/* Grid fallbacks, in case the theme's column gutters are not applied. */
.hbi-room-col {
	padding-inline: 15px;
	margin-block-end: 30px;
	box-sizing: border-box;
}

.hbi-room-col .safar-room__item {
	height: 100%;
	display: flex;
	flex-direction: column;
	background: #fff;
}

.hbi-room-col .safar-room__item .content {
	flex: 1 1 auto;
}

/* Photos of any shape are cropped to the same frame. */
.hbi-room-col .safar-room__item .thumb a {
	display: block;
}

.hbi-room-col .safar-room__item .thumb img {
	display: block;
	aspect-ratio: 83 / 60;
	height: auto;
	object-fit: cover;
}

.hbi-room-col .price-tag .mphb-regular-price {
	display: inline-flex;
	align-items: baseline;
	gap: 6px;
}

.hbi-room-note {
	font-weight: 600;
	color: var(--safar-primary-color, #c97a4f);
}

.hbi-notice {
	padding: 12px 16px;
	border: 1px solid rgba(0, 0, 0, 0.2);
	border-radius: 12px;
}

.hbi-notice--error {
	border-color: #b32d2e;
	color: #b32d2e;
}

@media (max-width: 767px) {
	.hbi-room-col {
		flex: 0 0 100%;
		max-width: 100%;
	}
}

/* Booking page: guest details on the left, stay summary on the right. */
.hbi-booking {
	display: flex;
	flex-wrap: wrap;
	gap: 40px;
	align-items: flex-start;
}

.hbi-booking__main {
	flex: 1 1 520px;
	min-width: 0;
}

.hbi-booking__aside {
	flex: 0 1 380px;
	min-width: 280px;
}

.hbi-booking > .hbi-notice {
	flex: 1 1 100%;
}

.hbi-booking__heading {
	margin-block: 0 24px;
	font-size: 32px;
}

.hbi-booking-form__row {
	display: flex;
	flex-wrap: wrap;
	gap: 0 16px;
}

.hbi-booking-form__field {
	flex: 1 1 200px;
	margin: 0 0 20px;
}

.hbi-booking-form__field--title {
	flex: 0 1 120px;
}

.hbi-booking-form__field label {
	display: block;
	margin-block-end: 8px;
	font-weight: 500;
	color: var(--safar-heading-color, #362618);
}

.hbi-booking-form__field label abbr {
	border: 0;
	text-decoration: none;
}

.hbi-booking-form__field input,
.hbi-booking-form__field select,
.hbi-booking-form__field textarea {
	display: block;
	width: 100%;
	min-height: 56px;
	padding: 14px 20px;
	border: 1px solid var(--safar-border-color, #eaeaea);
	border-radius: 12px;
	background: #fff;
	color: var(--safar-heading-color, #362618);
	font: inherit;
	box-sizing: border-box;
}

.hbi-booking-form__field input:focus,
.hbi-booking-form__field select:focus,
.hbi-booking-form__field textarea:focus {
	border-color: var(--safar-primary-color, #c97a4f);
	outline: none;
}

/* Spam trap: kept out of sight and out of the tab order. */
.hbi-booking-form__trap {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.hbi-booking-form__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 16px 24px;
	align-items: center;
	margin: 8px 0 12px;
}

.hbi-booking .hbi-button {
	display: inline-block;
	min-height: 56px;
	padding: 0 36px;
	border: 1px solid var(--safar-primary-color, #c97a4f);
	border-radius: 50px;
	background: var(--safar-primary-color, #c97a4f);
	color: #fff;
	font: inherit;
	font-weight: 500;
	line-height: 54px;
	text-transform: uppercase;
	text-decoration: none;
	cursor: pointer;
	transition: 0.3s ease-in-out;
}

.hbi-booking .hbi-button:hover {
	border-color: var(--safar-heading-color, #362618);
	background: var(--safar-heading-color, #362618);
	color: #fff;
}

.hbi-booking-form__hint {
	margin: 0;
	font-size: 15px;
}

.hbi-stay {
	padding: 24px;
	border: 1px solid var(--safar-border-color, #eaeaea);
	border-radius: 24px;
	background: #fff;
}

.hbi-stay__image img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 83 / 60;
	object-fit: cover;
	border-radius: 12px;
	margin-block-end: 20px;
}

.hbi-stay__name {
	margin: 0 0 16px;
	font-size: 24px;
}

.hbi-stay__reference {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	margin: 0 0 16px;
	padding: 12px 16px;
	border-radius: 12px;
	background: var(--safar-shade-color, #faf5f1);
}

.hbi-stay__lines {
	margin: 0;
}

.hbi-stay__lines > div {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	padding: 8px 0;
	border-bottom: 1px solid var(--safar-border-color, #eaeaea);
}

.hbi-stay__lines dt,
.hbi-stay__lines dd {
	margin: 0;
	font-weight: 400;
}

.hbi-stay__lines dd {
	color: var(--safar-heading-color, #362618);
	text-align: end;
}

.hbi-stay__total {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 16px;
	margin: 16px 0 0;
	font-size: 18px;
}

.hbi-stay__total strong {
	font-size: 26px;
	font-weight: 500;
	color: var(--safar-heading-color, #362618);
}

.hbi-payment-options {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	margin-block: 24px;
}

.hbi-payment-option {
	flex: 1 1 220px;
	padding: 24px;
	border: 1px solid var(--safar-border-color, #eaeaea);
	border-radius: 16px;
	background: var(--safar-shade-color, #faf5f1);
}

.hbi-payment-option__title {
	margin: 0 0 8px;
	font-size: 20px;
}

.hbi-payment-option__amount {
	margin: 0 0 4px;
	font-size: 28px;
	color: var(--safar-heading-color, #362618);
}

.hbi-payment-option__note {
	margin: 0;
	font-size: 15px;
}

.hbi-payment-option .hbi-button {
	margin-block-start: 16px;
}

.hbi-order-booking {
	margin-block: 32px;
}
