/**
 * Miami 306 booking UI — search bar, calendar popup, fullscreen overlay.
 */

.m306-hb-app {
	--m306-green: #182220;
	--m306-cream: #fefcf8;
	--m306-mint: #9fd4cf;
	--m306-line: #e4e0d8;
	--m306-muted: #6b736f;
	--m306-ink: #182220;
	--m306-error: #a6402f;
	--m306-error-bg: #fbeae5;
	--m306-ok: #1f7a4f;
	--m306-font: 'Fahkwang', 'Times New Roman', serif;

	font-family: var(--m306-font);
	color: var(--m306-ink);
	max-width: 800px;
	margin: 0 auto;
	position: relative;
	box-sizing: border-box;
}

.m306-hb-app *,
.m306-hb-app *::before,
.m306-hb-app *::after {
	box-sizing: border-box;
}

/* Author display:flex/grid must not override the HTML hidden attribute */
.m306-hb-app [hidden] {
	display: none !important;
}

.m306-hb-app[data-loaded='1'] .m306-hb-state[data-state='loading'] {
	display: none;
}

.m306-hb-loading {
	text-align: center;
	color: var(--m306-muted);
	padding: 16px 0;
}

.m306-hb-alert {
	border-radius: 6px;
	padding: 12px 16px;
	font-size: 14px;
	margin-bottom: 16px;
}

.m306-hb-alert--error {
	background: var(--m306-error-bg);
	color: var(--m306-error);
	border: 1px solid rgba(166, 64, 47, 0.25);
}

.m306-hb-alert--warning {
	background: #fff8e6;
	border: 1px solid #e6c35c;
	color: #5c4a00;
}

.m306-hb-app.is-test-mode {
	outline: 2px dashed #e6c35c;
	outline-offset: 4px;
}

/* Search bar 800×170 */
.m306-hb-shell {
	position: relative;
	z-index: 20;
	width: 100%;
	max-width: 800px;
	margin: 0 auto;
}

.m306-hb-search {
	width: 100%;
	max-width: 800px;
	min-height: 170px;
	display: grid;
	grid-template-columns: 1fr 1fr auto;
	gap: 18px 20px;
	align-items: end;
	background: var(--m306-green);
	padding: 28px 28px 32px;
	color: #fff;
}

.m306-hb-search__field label,
.m306-hb-app .m306-hb-search label {
	display: block;
	font-size: 12px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	margin-bottom: 10px;
	font-weight: 600;
	color: #ffffff !important;
	opacity: 1;
}

.m306-hb-search__input {
	width: 100%;
	min-height: 48px;
	padding: 12px 14px;
	border: none;
	background: #fff;
	color: #222;
	font-family: var(--m306-font);
	font-size: 15px;
	cursor: pointer;
}

.m306-hb-search__input::placeholder {
	color: #9a9a9a;
}

.m306-hb-search__cta {
	min-height: 48px;
	padding: 0 22px;
	border: 1px solid rgba(255, 255, 255, 0.7);
	background: transparent;
	color: #fff;
	font-family: var(--m306-font);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	cursor: pointer;
	white-space: nowrap;
	transition: background 0.2s ease, color 0.2s ease;
}

.m306-hb-search__cta.is-ready {
	background: #fff;
	color: var(--m306-green);
	border-color: #fff;
}

.m306-hb-search--overlay {
	margin: 0 auto 36px;
	max-width: 800px;
}

/* Calendar — same width as search, slides out underneath */
.m306-hb-datepicker {
	width: 100%;
	max-width: 800px;
	margin: 0;
	background: #fff;
	border: 1px solid rgba(24, 34, 32, 0.12);
	border-top: none;
	box-shadow: 0 16px 32px rgba(24, 34, 32, 0.12);
	padding: 18px 20px 22px;
	overflow: hidden;
	animation: m306-hb-slide 0.28s ease;
}

.m306-hb-app.is-calendar-over-overlay .m306-hb-datepicker {
	position: fixed;
	left: 50%;
	top: 96px;
	transform: translateX(-50%);
	width: min(800px, calc(100vw - 32px));
	z-index: 100050;
	border-top: 1px solid rgba(24, 34, 32, 0.12);
}

.m306-hb-datepicker__close {
	border: none;
	background: transparent;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	padding: 0;
	margin: 0 0 6px;
	color: #222;
}

.m306-hb-datepicker__heading {
	margin: 0 0 12px;
	font-size: clamp(18px, 2.4vw, 26px);
	font-weight: 500;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.m306-hb-datepicker__divider {
	height: 1px;
	background: var(--m306-line);
	margin-bottom: 14px;
}

.m306-hb-datepicker__months {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px 16px;
	width: 100%;
}

.m306-hb-month {
	min-width: 0;
	width: 100%;
	overflow: hidden;
}

.m306-hb-month__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 8px;
	gap: 4px;
}

.m306-hb-cal-title {
	font-size: 13px;
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.m306-hb-cal-nav {
	width: 28px;
	height: 28px;
	flex: 0 0 auto;
	border: none;
	background: transparent;
	font-size: 22px;
	cursor: pointer;
	color: var(--m306-ink);
}

.m306-hb-cal-nav--spacer {
	visibility: hidden;
	pointer-events: none;
}

.m306-hb-cal-weekdays,
.m306-hb-cal-grid {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 2px;
	width: 100%;
}

.m306-hb-cal-weekdays {
	font-size: 10px;
	color: var(--m306-muted);
	text-align: center;
	margin-bottom: 4px;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

.m306-hb-cal-weekdays span {
	min-width: 0;
	overflow: hidden;
}

.m306-hb-cal-day {
	width: 100%;
	aspect-ratio: 1 / 1;
	max-height: 42px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: none;
	background: transparent;
	border-radius: 50%;
	font-family: var(--m306-font);
	font-size: 12px;
	line-height: 1;
	color: var(--m306-ink);
	cursor: pointer;
	padding: 0;
	min-width: 0;
}

.m306-hb-cal-day.is-empty {
	cursor: default;
	visibility: hidden;
}

.m306-hb-cal-day.is-unavailable,
.m306-hb-cal-day.is-past {
	color: #b0b0b0;
	text-decoration: line-through;
	cursor: not-allowed;
	opacity: 0.55;
}

.m306-hb-cal-day.is-available:hover {
	background: rgba(159, 212, 207, 0.35);
}

.m306-hb-cal-day.is-selected {
	background: var(--m306-mint);
	font-weight: 600;
}

.m306-hb-cal-day.is-in-range {
	background: rgba(159, 212, 207, 0.45);
	border-radius: 0;
}

.m306-hb-datepicker__confirm {
	margin-top: 16px;
	min-width: 132px;
	padding: 11px 24px;
	border: none;
	background: var(--m306-green);
	color: #fff;
	font-family: var(--m306-font);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	cursor: pointer;
}

.m306-hb-datepicker__confirm:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

/* Fullscreen overlay */
.m306-hb-overlay {
	position: fixed;
	inset: 0;
	z-index: 100000;
	background: var(--m306-cream);
	display: flex;
	flex-direction: column;
	overflow: auto;
	animation: m306-hb-fade 0.25s ease;
}

.m306-hb-overlay__header {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: var(--m306-green);
	padding: 14px 22px;
	min-height: 72px;
}

.m306-hb-overlay__logo {
	height: 56px;
	width: auto;
	display: block;
}

.m306-hb-overlay__close {
	width: 40px;
	height: 40px;
	border: 1px solid rgba(255, 255, 255, 0.7);
	background: transparent;
	color: #fff;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.m306-hb-overlay__body {
	flex: 1 1 auto;
	padding: 28px clamp(16px, 4vw, 48px) 40px;
	max-width: 1200px;
	width: 100%;
	margin: 0 auto;
}

.m306-hb-property {
	display: grid;
	grid-template-columns: 1.05fr 1fr;
	gap: 36px;
	align-items: start;
	margin-bottom: 48px;
}

.m306-hb-property__media img {
	width: 100%;
	height: auto;
	display: block;
	object-fit: cover;
	aspect-ratio: 4 / 3;
}

.m306-hb-property__title {
	margin: 0 0 14px;
	font-size: clamp(26px, 3.2vw, 40px);
	font-weight: 500;
	letter-spacing: 0.04em;
	line-height: 1.15;
}

.m306-hb-property__desc {
	margin: 0 0 22px;
	font-size: 15px;
	line-height: 1.65;
	color: #333;
}

.m306-hb-feature-row {
	display: flex;
	flex-wrap: wrap;
	gap: 18px 28px;
}

.m306-hb-feature {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 8px;
	color: #7a7a7a;
	font-size: 12px;
	min-width: 72px;
}

.m306-hb-feature__icon {
	font-size: 22px;
	line-height: 1;
}

.m306-hb-offers__title {
	margin: 0 0 18px;
	text-align: center;
	font-size: clamp(22px, 2.5vw, 30px);
	font-weight: 500;
	letter-spacing: 0.08em;
}

.m306-hb-offer {
	display: grid;
	grid-template-columns: 1.4fr 1fr;
	gap: 24px;
	padding: 28px 0;
	border-top: 1px solid #d9d5cd;
	border-bottom: 1px solid #d9d5cd;
	align-items: center;
}

.m306-hb-offer__name {
	margin: 0 0 10px;
	font-size: clamp(18px, 2vw, 24px);
	font-weight: 500;
}

.m306-hb-offer__note {
	margin: 0;
	font-size: 14px;
	line-height: 1.55;
	color: var(--m306-muted);
}

.m306-hb-offer__right {
	text-align: right;
}

.m306-hb-offer__nightly {
	margin: 0 0 6px;
	font-size: clamp(22px, 2.4vw, 30px);
	font-weight: 500;
}

.m306-hb-offer__total {
	margin: 0 0 16px;
	font-size: 14px;
	color: var(--m306-muted);
}

.m306-hb-offer__book {
	min-width: 160px;
	padding: 12px 22px;
	border: none;
	background: var(--m306-green);
	color: #fff;
	font-family: var(--m306-font);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	cursor: pointer;
}

.m306-hb-offers__empty {
	text-align: center;
	color: var(--m306-error);
	padding: 18px 0;
}

.m306-hb-checkout {
	margin-top: 36px;
	background: #fff;
	border: 1px solid var(--m306-line);
	padding: 24px clamp(16px, 3vw, 28px);
}

.m306-hb-section {
	margin-bottom: 22px;
}

.m306-hb-section-title {
	margin: 0 0 16px;
	font-size: 22px;
	font-weight: 500;
	letter-spacing: 0.04em;
}

.m306-hb-guest-fields {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 14px;
}

.m306-hb-field label {
	display: block;
	font-size: 12px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	margin-bottom: 6px;
}

.m306-hb-input {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--m306-line);
	background: var(--m306-cream);
	font-family: var(--m306-font);
	font-size: 15px;
}

.m306-hb-honeypot {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.m306-hb-consents {
	margin-top: 16px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.m306-hb-checkbox {
	display: flex;
	gap: 10px;
	font-size: 13px;
	color: var(--m306-muted);
	cursor: pointer;
}

.m306-hb-checkbox a {
	color: var(--m306-green);
}

.m306-hb-summary-list {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 14px;
	margin: 0 0 18px;
}

.m306-hb-summary-list dt {
	font-size: 12px;
	color: var(--m306-muted);
	margin-bottom: 4px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.m306-hb-summary-list dd {
	margin: 0;
	font-weight: 600;
}

.m306-hb-card-element {
	margin-bottom: 18px;
}

.m306-hb-card-element-mount {
	padding: 12px;
	border: 1px solid var(--m306-line);
	background: #fff;
}

.m306-hb-cta {
	width: 100%;
	background: var(--m306-green);
	color: #fff;
	border: none;
	padding: 14px 20px;
	font-family: var(--m306-font);
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
}

.m306-hb-cta:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.m306-hb-spinner {
	width: 16px;
	height: 16px;
	border-radius: 50%;
	border: 2px solid rgba(255, 255, 255, 0.5);
	border-top-color: #fff;
	display: inline-block;
	animation: m306-hb-spin 0.7s linear infinite;
}

.m306-hb-spinner--lg {
	width: 34px;
	height: 34px;
	border-width: 3px;
	border-color: rgba(24, 34, 32, 0.2);
	border-top-color: var(--m306-green);
	margin: 0 auto 16px;
}

.m306-hb-overlay__footer {
	flex: 0 0 auto;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 24px;
	background: var(--m306-green);
	color: #fff;
	padding: 18px 28px;
	font-size: 13px;
}

.m306-hb-overlay__footer a {
	color: #fff;
	text-decoration: none;
}

.m306-hb-overlay__footer-contact {
	flex: 1 1 auto;
	text-align: center;
}

.m306-hb-processing,
.m306-hb-confirmation {
	text-align: center;
	padding: 40px 20px;
	background: var(--m306-cream);
	min-height: 40vh;
}

.m306-hb-confirmation-icon {
	width: 56px;
	height: 56px;
	line-height: 56px;
	border-radius: 50%;
	background: var(--m306-ok);
	color: #fff;
	font-size: 28px;
	margin: 0 auto 14px;
}

.m306-hb-fineprint {
	margin: 12px 0 0;
	font-size: 12px;
	color: var(--m306-muted);
}

body.m306-hb-lock {
	overflow: hidden;
}

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

@keyframes m306-hb-slide {
	from {
		opacity: 0;
		transform: translateY(-10px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

@keyframes m306-hb-fade {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

@media (max-width: 900px) {
	.m306-hb-property,
	.m306-hb-offer {
		grid-template-columns: 1fr;
	}

	.m306-hb-offer__right {
		text-align: left;
	}
}

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

	.m306-hb-datepicker__months {
		grid-template-columns: 1fr;
	}

	.m306-hb-guest-fields,
	.m306-hb-summary-list {
		grid-template-columns: 1fr;
	}

	.m306-hb-overlay__footer {
		flex-direction: column;
		text-align: center;
	}
}
