/* ==========================================================================
   WSH Alohana — Component Styles
   DO NOT hardcode colors, fonts, or section padding in this file.
   All design values come from wsh-design-tokens.css as CSS custom properties.
   To update the plugin's visual style, edit wsh-design-tokens.css — not this file.
   ========================================================================== */

/*
 * [wsh_property_grid] — Vacation Rentals page styles.
 * Additive on top of wsh-alohana-demo.css (which styles the cards themselves).
 *
 * Scope: .wsh-grid-page wrapper
 */

.wsh-grid-page {
	max-width: 1280px;
	margin: 0 auto;
	padding: 24px 20px 60px;
	font-family: var(--wsh-font-body);
	color: var(--wsh-color-dark);
}

/* ---------- Booking expired notice ---------- */

.wsh-expired-notice { /* TODO: review — semantic status color */
	background: #fff8e1;
	border: 1px solid #ffe082;
	color: #6d4c00;
	padding: 12px 16px;
	border-radius: 8px;
	font-size: 14px;
	margin-bottom: 18px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
}

.wsh-expired-notice__close {
	background: none;
	border: 0;
	font-size: 20px;
	line-height: 1;
	color: #6d4c00;
	cursor: pointer;
	padding: 0 4px;
	flex-shrink: 0;
}

.wsh-expired-notice__close:hover {
	color: #333;
}

/* ---------- Search bar ---------- */

/* v3.2.0: search bar became a stacked wrapper with a primary row and a
   collapsible advanced panel. The old single-row flex now lives on
   .wsh-grid-search__row--primary; the outer block just stacks vertically. */
.wsh-grid-search {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 16px 18px;
	background: var(--wsh-color-white);
	border: 1px solid #e3e6ea;
	border-radius: 10px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
	margin-bottom: 24px;
}

.wsh-grid-search__row {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 12px;
}

.wsh-grid-search__field {
	display: flex;
	flex-direction: column;
	gap: 4px;
	flex: 1 1 180px;
	min-width: 140px;
	font-size: 12px;
	color: #555; /* TODO: review — close but not exact palette match */
}

.wsh-grid-search__field--small {
	flex: 0 0 110px;
}

.wsh-grid-search__field span {
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	font-size: 11px;
	color: #666; /* TODO: review — close but not exact palette match */
}

.wsh-grid-search__field input {
	height: 40px;
	padding: 0 12px;
	border: 1px solid #d5d8dc;
	border-radius: 6px;
	font-size: 14px;
	color: var(--wsh-color-dark);
	background: var(--wsh-color-white);
}

.wsh-grid-search__field input:focus {
	outline: none;
	border-color: var(--wsh-color-green);
	box-shadow: 0 0 0 2px rgba(var(--wsh-color-green-rgb), 0.18);
}

.wsh-grid-search__btn,
.wsh-grid-search__clear {
	height: 40px;
	padding: 0 20px;
	border: 0;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s, color 0.15s;
}

.wsh-grid-search__btn {
	background: var(--wsh-color-green);
	color: var(--wsh-color-white);
}

.wsh-grid-search__btn:hover {
	background: var(--wsh-color-green-dark);
}

.wsh-grid-search__clear {
	background: transparent;
	color: var(--wsh-color-green);
	border: 1px solid var(--wsh-color-green);
}

.wsh-grid-search__clear:hover {
	background: var(--wsh-color-green);
	color: var(--wsh-color-white);
}

/* ---------- Advanced panel toggle ---------- */

.wsh-grid-search__toggle {
	height: 40px;
	padding: 0 16px;
	background: transparent;
	color: var(--wsh-color-green);
	border: 1px dashed var(--wsh-color-green);
	border-radius: 6px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s, color 0.15s;
}

.wsh-grid-search__toggle:hover,
.wsh-grid-search__toggle[aria-expanded="true"] {
	background: var(--wsh-color-green);
	color: var(--wsh-color-white);
	border-style: solid;
}

/* ---------- Advanced panel ---------- */

.wsh-grid-search__panel {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 16px;
	padding: 14px 0 2px;
	border-top: 1px solid #eef0f2;
}

.wsh-grid-search__panel[hidden] {
	display: none;
}

.wsh-grid-search__panel select {
	height: 40px;
	padding: 0 12px;
	border: 1px solid #d5d8dc;
	border-radius: 6px;
	background: var(--wsh-color-white);
	font-size: 14px;
	color: var(--wsh-color-dark);
	cursor: pointer;
}

.wsh-grid-search__panel select:focus {
	outline: none;
	border-color: var(--wsh-color-green);
	box-shadow: 0 0 0 2px rgba(var(--wsh-color-green-rgb), 0.18);
}

/* ---------- Price range (paired number inputs, v3.2.0 Phase 3A) ---------- */

.wsh-grid-search__field--price {
	flex: 1 1 240px;
	min-width: 220px;
}

/* Top-align so the "to" separator lines up with the input's top edge; its
   line-height: 40px then vertically centers the text against the 40px input,
   not against the sub-labels beneath. */
.wsh-grid-search__price-inputs {
	display: flex;
	align-items: flex-start;
	gap: 8px;
}

.wsh-grid-search__price-input {
	display: flex;
	flex-direction: column;
	flex: 1 1 0;
	min-width: 0;
}

/* Selector bumped to (0,2,0) to beat the generic `.wsh-grid-search__field span`
   rule (0,1,1) — otherwise the generic font-size/letter-spacing/color win. */
.wsh-grid-search__price-input .wsh-grid-search__price-input-label {
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #888;
	text-align: center;
	margin-top: 4px;
}

/* Match the bedrooms/bathrooms select visually — same height, border, radius. */
.wsh-grid-search__price-input input[type="number"] {
	height: 40px;
	padding: 0 12px;
	border: 1px solid #d5d8dc;
	border-radius: 6px;
	background: var(--wsh-color-white);
	font-size: 14px;
	color: var(--wsh-color-dark);
	width: 100%;
	box-sizing: border-box;
}

.wsh-grid-search__price-input input[type="number"]::placeholder {
	color: #999;
	opacity: 1;
}

.wsh-grid-search__price-input input[type="number"]:focus {
	outline: none;
	border-color: var(--wsh-color-green);
	box-shadow: 0 0 0 2px rgba(var(--wsh-color-green-rgb), 0.18);
}

.wsh-grid-search__price-separator {
	padding: 0 16px;
	font-size: 12px;
	color: #666;
	line-height: 40px;   /* vertical-center against the 40px inputs */
	flex: 0 0 auto;
	white-space: nowrap;
}

/* ---------- Amenity chips ---------- */

.wsh-grid-search__amenities {
	flex: 1 1 100%;
	border: 0;
	padding: 0;
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}

.wsh-grid-search__amenities legend {
	flex: 1 1 100%;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: #666;
	margin-bottom: 6px;
	padding: 0;
}

.wsh-grid-search__amenity {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	border: 1px solid #d5d8dc;
	border-radius: 999px;
	background: var(--wsh-color-white);
	font-size: 12px;
	color: var(--wsh-color-dark);
	cursor: pointer;
	transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.wsh-grid-search__amenity input[type="checkbox"] {
	width: 14px;
	height: 14px;
	accent-color: var(--wsh-color-green);
	margin: 0;
}

.wsh-grid-search__amenity:has(input:checked) {
	background: var(--wsh-color-green);
	border-color: var(--wsh-color-green);
	color: var(--wsh-color-white);
}

/* Mobile: advanced panel collapses to stacked rows. */
@media (max-width: 768px) {
	.wsh-grid-search__row {
		gap: 10px;
	}
	.wsh-grid-search__field,
	.wsh-grid-search__field--small,
	.wsh-grid-search__field--price {
		flex: 1 1 100%;
		min-width: 0;
	}
	.wsh-grid-search__btn,
	.wsh-grid-search__clear,
	.wsh-grid-search__toggle {
		flex: 1 1 100%;
	}
	.wsh-grid-search__panel {
		gap: 12px;
	}
	.wsh-grid-search__amenity {
		flex: 0 0 auto;
	}
	.wsh-grid-search__price-inputs {
		flex-direction: column;
		align-items: stretch;
		gap: 10px;
	}
	.wsh-grid-search__price-separator {
		display: none;
	}
	.wsh-grid-search__price-input {
		flex: 1 1 100%;
	}
}

/* ---------- Results header ---------- */

.wsh-grid-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 18px;
}

.wsh-grid-count {
	margin: 0;
	font-size: 14px;
	color: #555; /* TODO: review — close but not exact palette match */
}

.wsh-grid-count strong {
	color: var(--wsh-color-dark);
}

.wsh-grid-sort {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: #555; /* TODO: review — close but not exact palette match */
}

.wsh-grid-sort select {
	height: 34px;
	padding: 0 10px;
	border: 1px solid #d5d8dc;
	border-radius: 6px;
	background: var(--wsh-color-white);
	font-size: 13px;
	color: var(--wsh-color-dark);
	cursor: pointer;
}

/* ---------- Grid ---------- */

.wsh-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
	align-items: start;
}

@media (max-width: 900px) {
	.wsh-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
}

@media (max-width: 600px) {
	.wsh-grid { grid-template-columns: 1fr; gap: 18px; }
}

/* Grid-specific tweaks on the (demo-styled) card */
.wsh-grid-card {
	display: flex;
	flex-direction: column;
	background: var(--wsh-color-sky);
	box-shadow: 0 0 0 6px var(--wsh-color-sky);
	border-radius: 16px;
	overflow: hidden;
}

/* Card body — vertical flex so the actions block can push to the bottom.
   min-height reserves shared vertical space for name/location/stats/desc so
   action buttons align across cards regardless of actual content length. */
.wsh-grid-card .alohana-card-body {
	padding: 20px;
	display: flex;
	flex-direction: column;
	flex-grow: 1;
	text-align: center;
	min-height: 280px;
}

.wsh-grid-card h4 {
	font-family: var(--wsh-font-heading);
	font-size: 22px;
	font-weight: 600;
	line-height: 1.3;
	margin: 0 0 8px;
	color: var(--wsh-color-dark);
}

.wsh-grid-card h4 a {
	color: inherit;
	text-decoration: none;
}

.wsh-grid-card h4 a:hover {
	color: var(--wsh-color-green);
}

/* ---------- Card body ---------- */

.wsh-grid-card__location {
	font-family: var(--wsh-font-body);
	font-size: 13px;
	color: #666; /* TODO: review — close but not exact palette match */
	margin: 0 0 12px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.wsh-grid-card__stats {
	font-family: var(--wsh-font-body);
	font-size: 14px;
	color: var(--wsh-color-grey);
	margin: 0 0 12px;
	line-height: 1.4;
}

/* Description — clamped to 2 lines on grid cards */
.wsh-grid-card .alohana-card-desc {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-overflow: ellipsis;
	font-family: var(--wsh-font-body);
	font-size: 14px;
	line-height: 1.5;
	color: var(--wsh-color-grey);
	margin: 0 0 16px;
}

/* .wsh-grid-card__times removed in v3.5.9 — its markup (the admin
   check-in/check-out diagnostic line) was dropped from property-card.php. */

.wsh-grid-card__unitcode {
	font-size: 11px;
	color: #999;
	margin: 0 0 8px;
}

/* Push the actions block to the bottom of the card body so buttons line up
   on the same horizontal baseline across every card in the grid */
.wsh-grid-card__actions {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-top: auto;
}

.wsh-grid-card__actions-row {
	display: flex;
	gap: 6px;
}

/* Grid card action buttons — pill shape, generous padding.
   Prefixed with .wsh-grid-page to raise specificity above Elementor kit selectors. */
.wsh-grid-page .wsh-grid-card button.alohana-btn,
.wsh-grid-page .wsh-grid-card a.alohana-btn {
	padding: 12px 20px;
	border-radius: 999px;
	font-family: var(--wsh-font-button);
	font-size: 14px;
	font-weight: 500;
	letter-spacing: 0.02em;
	border: 1px solid transparent;
	transition: background 0.2s, color 0.2s, border-color 0.2s;
	text-decoration: none;
}

/* Check Dates & Availability — filled sage, full width */
.wsh-grid-page .wsh-grid-card button.wsh-grid-card__checkbtn,
.wsh-grid-page .wsh-grid-card button.wsh-grid-card__checkbtn:hover,
.wsh-grid-page .wsh-grid-card button.wsh-grid-card__checkbtn:focus {
	background: var(--wsh-color-green);
	color: var(--wsh-color-white);
	width: 100%;
	border-color: var(--wsh-color-green);
}

.wsh-grid-page .wsh-grid-card button.wsh-grid-card__checkbtn:hover,
.wsh-grid-page .wsh-grid-card button.wsh-grid-card__checkbtn:focus {
	background: var(--wsh-color-green-dark);
	border-color: var(--wsh-color-green-dark);
}

/* Property Details — filled sage secondary */
.wsh-grid-page .wsh-grid-card a.wsh-grid-card__detailsbtn,
.wsh-grid-page .wsh-grid-card a.wsh-grid-card__detailsbtn:link,
.wsh-grid-page .wsh-grid-card a.wsh-grid-card__detailsbtn:visited {
	flex: 1;
	text-align: center;
	text-decoration: none;
	background: var(--wsh-color-green);
	color: var(--wsh-color-white);
	white-space: nowrap;
	border-color: var(--wsh-color-green);
}

.wsh-grid-page .wsh-grid-card a.wsh-grid-card__detailsbtn:hover,
.wsh-grid-page .wsh-grid-card a.wsh-grid-card__detailsbtn:focus,
.wsh-grid-page .wsh-grid-card a.wsh-grid-card__detailsbtn:active {
	background: var(--wsh-color-green-dark);
	color: var(--wsh-color-white);
	text-decoration: none;
	border-color: var(--wsh-color-green-dark);
}

/* Ask a Question — outlined sage */
.wsh-grid-page .wsh-grid-card button.wsh-grid-card__askbtn {
	flex: 1;
	background: var(--wsh-color-white);
	color: var(--wsh-color-green);
	border-color: var(--wsh-color-green);
	white-space: nowrap;
}

.wsh-grid-page .wsh-grid-card button.wsh-grid-card__askbtn:hover,
.wsh-grid-page .wsh-grid-card button.wsh-grid-card__askbtn:focus {
	background: var(--wsh-color-green);
	color: var(--wsh-color-white);
	border-color: var(--wsh-color-green);
}

/* Mobile — stack all three card action buttons full-width (v3.5.9).
   Above 768px, Property Details + Ask a Question stay side-by-side via
   .wsh-grid-card__actions-row's default flex row. At/below 768px the row
   becomes a column; flex:0 0 auto cancels the children's row-mode flex:1
   so they keep natural (matching) heights instead of stretching. */
@media (max-width: 768px) {
	.wsh-grid-card__actions-row {
		flex-direction: column;
	}
	.wsh-grid-page .wsh-grid-card a.wsh-grid-card__detailsbtn,
	.wsh-grid-page .wsh-grid-card button.wsh-grid-card__askbtn {
		flex: 0 0 auto;
		width: 100%;
	}
}

/* Photo wrapper — position context for the price badge */
.wsh-grid-card__photo {
	position: relative;
	display: block;
	overflow: hidden;
}

.wsh-grid-card__photo img {
	transition: transform 0.3s ease;
}

.wsh-grid-card__photo:hover img {
	transform: scale(1.03);
}

/* "From $X / night" line on card body — replaces the v3.1.x photo-overlay
   price badge (removed v3.5.0 per punch-list item 3). Mirrors the detail-
   page sidebar copy at templates/property-detail.php for visual consistency. */
.wsh-grid-card__from-price {
	margin: 4px 0 8px;
	font-family: var(--wsh-font-button);
	font-size: 14px;
	color: var(--wsh-color-dark);
	letter-spacing: 0.01em;
}

.wsh-grid-card__from-price strong {
	font-size: 18px;
	font-weight: 700;
}

.wsh-grid-card__from-price-suffix {
	font-size: 12px;
	color: #666;
	margin-left: 2px;
}

/* "plus taxes & fees" footnote under the seasonal price range (v3.5.14). */
.wsh-grid-card__from-price-note {
	margin: -4px 0 8px;
	font-size: 11px;
	color: #888;
}

.wsh-grid-card__titlelink {
	color: inherit;
	text-decoration: none;
}

.wsh-grid-card__titlelink:hover,
.wsh-grid-card__titlelink:focus {
	text-decoration: none;
	color: var(--wsh-color-green);
}

/* ---------- Empty state ---------- */

.wsh-grid-empty {
	text-align: center;
	padding: 60px 20px;
	color: #555; /* TODO: review — close but not exact palette match */
}

.wsh-linkbtn {
	background: none;
	border: 0;
	color: var(--wsh-color-green);
	text-decoration: underline;
	cursor: pointer;
	font: inherit;
	padding: 0;
}

.wsh-linkbtn:hover {
	color: var(--wsh-color-green-dark);
}

/* ---------- Inline rate quote panel ---------- */

.wsh-grid-quote__loading {
	font-size: 12px;
	color: #666; /* TODO: review — close but not exact palette match */
	font-style: italic;
	padding: 8px;
	margin: 0;
}

.wsh-grid-quote__panel {
	padding: 12px;
	background: #f5fbf8;
	border: 1px solid #cde9de;
	border-radius: 6px;
}

.wsh-grid-quote__row {
	display: flex;
	justify-content: space-between;
	padding: 3px 0;
	font-size: 12px;
	color: #333;
}

.wsh-grid-quote__row--total {
	font-weight: 700;
	font-size: 13px;
	color: var(--wsh-color-green);
	border-top: 1px solid #cde9de;
	margin-top: 4px;
	padding-top: 6px;
}

.wsh-grid-quote__demo {
	font-size: 11px;
	color: #888;
	margin: 4px 0 0;
}

.wsh-grid-quote__book {
	display: block;
	width: 100%;
	margin-top: 10px;
	padding: 9px 12px;
	background: var(--wsh-color-green);
	color: var(--wsh-color-white);
	border: 0;
	border-radius: 5px;
	font-size: 13px;
	font-weight: 600;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.15s;
}

.wsh-grid-quote__book:hover {
	background: var(--wsh-color-green-dark);
	color: var(--wsh-color-white);
}

.wsh-grid-quote__error { /* TODO: review — semantic status color */
	padding: 8px 10px;
	font-size: 12px;
	color: #a02020;
	background: #fef2f2;
	border: 1px solid #fecaca;
	border-radius: 5px;
}

/* ---------- Inline inquiry form ---------- */

.wsh-grid-card__inquiry-slot {
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid #eef0f2;
}

.wsh-inquiry-form {
	display: flex;
	flex-direction: column;
	gap: 10px;
	background: #f5fbf8;
	border: 1px solid #cde9de;
	border-radius: 8px;
	padding: 14px 16px;
}

.wsh-inquiry-form__header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin: 0 0 4px;
}

.wsh-inquiry-form__title {
	margin: 0;
	font-size: 14px;
	font-weight: 600;
	color: var(--wsh-color-green);
}

.wsh-inquiry-form__close {
	background: none;
	border: 0;
	font-size: 22px;
	line-height: 1;
	color: #999;
	cursor: pointer;
	padding: 0 4px;
}

.wsh-inquiry-form__close:hover {
	color: #333;
}

.wsh-inquiry-form__row {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.wsh-inquiry-form__field {
	display: flex;
	flex-direction: column;
	gap: 3px;
	flex: 1 1 140px;
	min-width: 0;
	font-size: 11px;
	color: #555; /* TODO: review — close but not exact palette match */
}

.wsh-inquiry-form__field--full {
	flex: 1 1 100%;
}

.wsh-inquiry-form__field span {
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.wsh-inquiry-form__field input,
.wsh-inquiry-form__field textarea {
	width: 100%;
	padding: 7px 10px;
	border: 1px solid #cde9de;
	border-radius: 5px;
	font-size: 13px;
	background: var(--wsh-color-white);
	color: var(--wsh-color-dark);
	font-family: inherit;
}

.wsh-inquiry-form__field textarea {
	resize: vertical;
	min-height: 80px;
}

.wsh-inquiry-form__field input:focus,
.wsh-inquiry-form__field textarea:focus {
	outline: none;
	border-color: var(--wsh-color-green);
	box-shadow: 0 0 0 2px rgba(var(--wsh-color-green-rgb), 0.15);
}

.wsh-inquiry-form__actions {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 4px;
}

.wsh-inquiry-form__submit {
	background: var(--wsh-color-green);
	color: var(--wsh-color-white);
	border: 0;
	border-radius: 5px;
	padding: 8px 16px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s;
}

.wsh-inquiry-form__submit:hover {
	background: var(--wsh-color-green-dark);
}

.wsh-inquiry-form__submit:disabled {
	background: #9fbeb4; /* TODO: review — disabled state tint of primary accent */
	cursor: not-allowed;
}

.wsh-inquiry-form__status {
	font-size: 12px;
	color: #555; /* TODO: review — close but not exact palette match */
}

.wsh-inquiry-form__status--success { color: var(--wsh-color-green); font-weight: 600; }
.wsh-inquiry-form__status--error   { color: #a02020; font-weight: 600; }

/* ---------- Bookable callout (.alohana-avail-info) ---------- */
/* Patch 3.4.1 — keep "Min stay: N nights" together at narrow widths so
   it never wraps between "Min" and "stay". Other lines in the callout
   (Bookable date range, Check-in days) wrap normally. */
.wsh-min-stay { white-space: nowrap; }
