/*
 * HiveStays front-end styles.
 * These are neutral defaults. Fonts and colours come from the theme, and
 * every widget can be restyled in Elementor's Style tab.
 */
.hivestays-search,
.hivestays-results,
.hivestays-gallery,
.hivestays-details,
.hivestays-calendar {
	--hivestays-accent: #1f2937;
	--hivestays-accent-text: #fff;
	--hivestays-border: rgba(0, 0, 0, 0.15);
	--hivestays-muted: rgba(0, 0, 0, 0.6);
	--hivestays-surface: #fff;
	--hivestays-available: #e8f5e9;
	--hivestays-booked: #f3f4f6;
	--hivestays-radius: 6px;
	box-sizing: border-box;
}

.hivestays-search *,
.hivestays-results *,
.hivestays-calendar * {
	box-sizing: border-box;
}

.hivestays-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 22px;
	border: 0;
	border-radius: var(--hivestays-radius);
	background: var(--hivestays-accent);
	color: var(--hivestays-accent-text);
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: opacity 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.hivestays-button:hover,
.hivestays-button:focus-visible {
	opacity: 0.88;
	color: var(--hivestays-accent-text);
}

/* Search form */
.hivestays-search {
	display: grid;
	gap: 12px;
	align-items: end;
}

.hivestays-search--inline {
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.hivestays-search--stacked {
	grid-template-columns: 1fr;
}

.hivestays-search__field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}

.hivestays-search__label {
	font-size: 0.875em;
	font-weight: 600;
}

.hivestays-search__input {
	width: 100%;
	height: 46px;
	line-height: 1.2;
	padding: 10px 12px;
	border: 1px solid var(--hivestays-border);
	border-radius: var(--hivestays-radius);
	background: var(--hivestays-surface);
	color: inherit;
	font: inherit;
}

.hivestays-search__button {
	width: 100%;
	height: 46px;
}

/* Labels switched off in Elementor stay readable by screen readers. */
[class*="hivestays-labels-"]:not(.hivestays-labels-yes) .hivestays-search__label {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/*
 * Elementor 4 atomic elements. Every rule is wrapped in :where() so it has no
 * weight: anything set in Elementor's V4 Style tab wins.
 */
:where(.hivestays-search-v4) {
	--hivestays-accent: #1f2937;
	--hivestays-accent-text: #fff;
	box-sizing: border-box;
}

:where(.hivestays-search-v4) *,
:where(.hivestays-search-v4) *::before,
:where(.hivestays-search-v4) *::after {
	box-sizing: border-box;
}

/* Search Field box (0.4.1): label and input inside. */
:where(.hivestays-field-box) {
	cursor: pointer;
}

/* Field Input: takes the font and colour of the page unless set in the Style tab. */
:where(.hivestays-field-input) {
	font-family: inherit;
	font-weight: inherit;
	color: inherit;
	outline: 0;
	box-shadow: none;
}

:where(input.hivestays-field-input) {
	-webkit-appearance: none;
	appearance: none;
}

:where(.hivestays-field-input::-webkit-calendar-picker-indicator) {
	cursor: pointer;
	opacity: 0.6;
}

:where(.hivestays-submit) {
	font-family: inherit;
	white-space: nowrap;
	transition: opacity 0.15s ease;
}

:where(.hivestays-submit:hover, .hivestays-submit:focus-visible) {
	opacity: 0.88;
}

/* Date picker (0.5.0). Hidden until a date box is clicked; always shown,
 * in the page flow, inside the Elementor editor so it can be styled. */
body:not(.elementor-editor-active) .hivestays-picker:not([data-open]),
body:not(.elementor-editor-active) .hivestays-picker-samples {
	display: none;
}

body.elementor-editor-active .hivestays-picker {
	position: static;
	flex-basis: 100%;
}

:where(.hivestays-picker) {
	box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
	box-sizing: border-box;
}

:where(.hivestays-picker-month) {
	flex: 1 1 0;
	min-width: 0;
}

:where(.hivestays-picker-grid) {
	display: grid;
	grid-template-columns: repeat(7, minmax(0, 1fr));
	justify-items: center;
	align-items: center;
	row-gap: 6px;
}

:where(.hivestays-picker-day[role="button"]) {
	cursor: pointer;
}

:where(.hivestays-picker-button, .hivestays-picker-day) {
	user-select: none;
}

:where(input.hivestays-field-input[readonly]) {
	cursor: pointer;
}

/* Single-element Search Field from 0.4.0, kept for pages that use it. */
:where(.hivestays-search-v4) > :where(.hivestays-field, .hivestays-submit) {
	flex: 1 1 150px;
}

:where(.hivestays-field) {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 2px;
	min-width: 0;
	padding: 8px 12px;
	cursor: pointer;
}

:where(.hivestays-field__label) {
	font-size: 0.75em;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	opacity: 0.75;
}

:where(.hivestays-field__input) {
	width: 100%;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	outline: 0;
}

.hivestays-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* Search results */
.hivestays-results__message {
	padding: 16px;
	border: 1px solid var(--hivestays-border);
	border-radius: var(--hivestays-radius);
}

.hivestays-results__summary {
	margin: 0 0 16px;
	color: var(--hivestays-muted);
}

.hivestays-results__list {
	display: grid;
	gap: 20px;
}

.hivestays-card {
	display: grid;
	grid-template-columns: minmax(0, var(--hivestays-image-width, 280px)) minmax(0, 1fr) auto;
	gap: 20px;
	padding: 16px;
	border: 1px solid var(--hivestays-border);
	border-radius: var(--hivestays-radius);
	background: var(--hivestays-surface);
}

.hivestays-card__image img {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 160px;
	object-fit: cover;
	border-radius: calc(var(--hivestays-radius) - 2px);
}

.hivestays-card__title {
	margin: 0 0 6px;
}

.hivestays-card__title a {
	color: inherit;
	text-decoration: none;
}

.hivestays-card__meta,
.hivestays-card__per {
	margin: 0 0 8px;
	color: var(--hivestays-muted);
	font-size: 0.9em;
}

.hivestays-card__excerpt p {
	margin: 0 0 8px;
}

.hivestays-card__free {
	margin: 0;
	font-size: 0.9em;
	font-weight: 600;
}

.hivestays-card__aside {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	justify-content: space-between;
	gap: 12px;
	text-align: right;
	min-width: 160px;
}

.hivestays-card__price {
	display: flex;
	flex-direction: column;
	margin: 0;
}

.hivestays-card__total {
	font-size: 1.5em;
	font-weight: 700;
	line-height: 1.2;
}

.hivestays-card__breakdown {
	font-size: 0.875em;
}

.hivestays-card__breakdown summary {
	cursor: pointer;
}

.hivestays-card__breakdown ul {
	margin: 6px 0 0;
	padding: 0;
	list-style: none;
}

.hivestays-card__breakdown li {
	display: flex;
	justify-content: space-between;
	gap: 16px;
}

.hivestays-cards-column .hivestays-card {
	grid-template-columns: 1fr;
}

.hivestays-cards-column .hivestays-card__aside {
	align-items: stretch;
	text-align: left;
}

@media (max-width: 767px) {
	.hivestays-card {
		grid-template-columns: 1fr;
	}

	.hivestays-card__aside {
		align-items: stretch;
		text-align: left;
	}
}

/* Gallery */
.hivestays-gallery {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 8px;
}

.hivestays-gallery__item {
	margin: 0;
	overflow: hidden;
	border-radius: var(--hivestays-radius);
}

.hivestays-gallery__item--first {
	grid-column: 1 / -1;
}

.hivestays-gallery__image {
	display: block;
	width: 100%;
	height: 100%;
	aspect-ratio: 3 / 2;
	object-fit: cover;
}

[class*="hivestays-gallery-first-"]:not(.hivestays-gallery-first-yes) .hivestays-gallery__item--first {
	grid-column: auto;
}

/* Details */
.hivestays-details__list {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 12px 24px;
	margin: 0 0 16px;
}

.hivestays-details__item {
	margin: 0;
}

.hivestays-details__label {
	color: var(--hivestays-muted);
	font-size: 0.875em;
}

.hivestays-details__value {
	margin: 0;
	font-weight: 600;
}

.hivestays-details__amenities {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.hivestays-details__amenity {
	padding: 6px 12px;
	border: 1px solid var(--hivestays-border);
	border-radius: 999px;
	font-size: 0.9em;
}

/* Calendar */
.hivestays-calendar {
	position: relative;
}

.hivestays-calendar__nav {
	display: flex;
	justify-content: space-between;
	margin-bottom: 8px;
}

.hivestays-calendar__prev,
.hivestays-calendar__next {
	width: 36px;
	height: 36px;
	padding: 0;
	border: 1px solid var(--hivestays-border);
	border-radius: var(--hivestays-radius);
	background: var(--hivestays-surface);
	color: inherit;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}

.hivestays-calendar__prev:disabled {
	opacity: 0.35;
	cursor: default;
}

.hivestays-calendar__months {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 24px;
	min-height: 260px;
}

.hivestays-calendar.is-loading .hivestays-calendar__months {
	opacity: 0.5;
}

.hivestays-calendar__title {
	margin-bottom: 8px;
	font-weight: 700;
	text-align: center;
}

.hivestays-calendar__grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 4px;
}

.hivestays-calendar__weekday {
	padding: 4px 0;
	color: var(--hivestays-muted);
	font-size: 0.75em;
	text-align: center;
}

.hivestays-calendar__day {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	border-radius: 4px;
	font-size: 0.875em;
	line-height: 1.1;
}

.hivestays-calendar__day--available {
	background: var(--hivestays-available);
}

.hivestays-calendar__day--booked {
	background: var(--hivestays-booked);
	color: var(--hivestays-muted);
	text-decoration: line-through;
}

.hivestays-calendar__day--past,
.hivestays-calendar__day--no-price {
	color: var(--hivestays-muted);
	opacity: 0.5;
}

.hivestays-calendar__price {
	margin-top: 2px;
	font-size: 0.7em;
}

.hivestays-calendar__legend {
	display: flex;
	gap: 16px;
	margin: 12px 0 0;
	padding: 0;
	list-style: none;
	font-size: 0.875em;
}

.hivestays-calendar__legend li {
	display: flex;
	align-items: center;
	gap: 6px;
}

.hivestays-calendar__swatch {
	display: inline-block;
	width: 14px;
	height: 14px;
	border-radius: 3px;
}

.hivestays-calendar__swatch--available {
	background: var(--hivestays-available);
}

.hivestays-calendar__swatch--booked {
	background: var(--hivestays-booked);
}
