/**
 * Staydeck Booking — STRUCTURAL styles only.
 *
 * The theme owns all visual styling (colours, typography, borders, spacing
 * polish). This file only provides the layout skeleton the widget needs to
 * function: the calendar grid, honeypot hiding and the loading spinner.
 * Class names follow the SPEC DOM contract (prefix hc-).
 */

/* Calendar layout ------------------------------------------------------ */

.hc-cal {
	position: relative;
}

.hc-cal__nav {
	display: flex;
	justify-content: space-between;
}

.hc-cal__months {
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem;
}

.hc-cal__month {
	flex: 1 1 16rem;
	min-width: 15rem;
}

.hc-cal__grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
}

.hc-cal__weekday {
	text-align: center;
}

.hc-cal__day {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 2.75rem;
	padding: 0.25rem 0.125rem;
	cursor: pointer;
	background: transparent;
	border: 0;
	font: inherit;
}

.hc-cal__day--blank {
	cursor: default;
	pointer-events: none;
}

.hc-cal__day:disabled {
	cursor: default;
}

.hc-cal__price {
	display: block;
	font-size: 0.7em;
	line-height: 1.2;
	min-height: 1.2em;
}

/* Quote summary rows --------------------------------------------------- */

.hc-quote__rows > div,
.hc-quote__total {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
}

/* Honeypot — visually removed, still in the accessibility-hidden DOM ---- */

.hc-hp {
	position: absolute !important;
	left: -9999px !important;
	top: auto !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}

/* Status regions ------------------------------------------------------- */

.hc-widget__status[hidden],
.hc-subscribe__status[hidden],
.hc-enquire__status[hidden],
.hc-modal__hint[hidden],
.hc-widget__fx-note[hidden],
.hc-modal__fx-note[hidden] {
	display: none;
}

/* Approximate converted price ("≈ €123") — a line under the rate -------- */

.hc-approx {
	display: block;
}

.hc-approx:empty {
	display: none;
}

/* Book-online modal (structural only — theme owns the look) ------------ */

.hc-modal {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
}

.hc-modal[hidden] {
	display: none;
}

.hc-modal__overlay {
	position: absolute;
	inset: 0;
	cursor: pointer;
}

.hc-modal__panel {
	position: relative;
	width: calc(100% - 2rem);
	max-width: 44rem;
	max-height: calc(100vh - 2rem);
	overflow-y: auto;
}

.hc-modal__close {
	position: absolute;
	top: 0.5rem;
	right: 0.5rem;
	cursor: pointer;
}

.hc-modal__cal {
	position: relative; /* anchors the .hc-spinner while loading */
}

.hc-modal__rate {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
}

.hc-modal__total {
	display: flex;
	align-items: baseline;
	gap: 0.5rem;
}

.hc-modal__total[hidden] {
	display: none;
}

.hc-modal__cta[disabled] {
	cursor: not-allowed;
}

body.hc-modal-open {
	overflow: hidden;
}

/* Loading spinner ------------------------------------------------------ */

.hc-spinner {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 1.5rem;
	height: 1.5rem;
	margin: -0.75rem 0 0 -0.75rem;
	border: 2px solid currentColor;
	border-top-color: transparent;
	border-radius: 50%;
	animation: hc-spin 0.8s linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {
	.hc-spinner {
		animation-duration: 2.4s;
	}
}
