/**
 * Vivasa Availability — base styles
 * ---------------------------------------------------------------------------
 * @since 1.3.0
 * @updated 1.6.0 - Redesigned the search widget to match the client's
 *   reference (vivasavillas.com/book): icon INSIDE each field box (not
 *   beside it), uppercase letter-spaced labels above each box, dark brown
 *   pill-style button, cream/beige card background, fully responsive
 *   (stacks vertically on narrow screens instead of overflowing).
 *
 * This is a genuine visual attempt at the reference design, but still a
 * starting point — the team knows CSS and will refine colors/spacing to
 * exactly match the brand once this is tested live.
 * ---------------------------------------------------------------------------
 */

.vivasa-search-card {
	background: #f7f1e8;
	border-radius: 16px;
	padding: 20px;
	max-width: 900px;
}

.vivasa-paused-message {
	background: #f7f1e8;
	border-radius: 12px;
	padding: 16px 20px;
	text-align: center;
	color: #4a3826;
	margin-top: 14px;
}

.vivasa-search-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	background: #4a2f1c;
}

.vivasa-search-btn:disabled:hover {
	background: #4a2f1c;
}

.vivasa-search-row {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 16px;
	background: #fdfaf5;
	border: none;
	border-radius: 12px;
	padding: 16px;
}

.vivasa-field-group {
	display: flex;
	flex-direction: column;
	flex: 1 1 150px;
	min-width: 140px;
}

.vivasa-field-label {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: #8a6d4a;
	margin-bottom: 6px;
}

.vivasa-field-box {
	display: flex;
	align-items: center;
	gap: 10px;
	background: #ead9bd;
	border-radius: 8px;
	padding: 12px 14px;
	color: #8a6d4a; /* Icon color — SVGs use stroke="currentColor" so this controls them */
}

.vivasa-field-box .vivasa-icon {
	flex-shrink: 0;
	color: #8a6d4a;
}

.vivasa-field-box input,
.vivasa-field-box input[type="text"],
.vivasa-field-box input.form-control,
.vivasa-field-box .flatpickr-input {
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
	outline: none !important;
	width: 100%;
	font-size: 15px;
	color: #4a3826;
	padding: 0;
}

.vivasa-field-box input::placeholder {
	color: #7a6650;
}

/* Guests dropdown (Adults/Children stepper) */
.vivasa-guests-group {
	position: relative;
}

.vivasa-guests-toggle {
	cursor: pointer;
	user-select: none;
}

.vivasa-guests-display {
	font-size: 15px;
	color: #4a3826;
}

.vivasa-guests-dropdown {
	display: none;
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	z-index: 20;
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
	padding: 14px 18px;
	min-width: 220px;
}

.vivasa-guests-dropdown.open {
	display: block;
}

.vivasa-guests-dropdown-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 8px 0;
	font-size: 15px;
	color: #4a3826;
}

.vivasa-stepper {
	display: flex;
	align-items: center;
	gap: 12px;
}

.vivasa-step-btn {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	border: 1px solid #d9c7ae;
	background: #fff;
	color: #4a3826;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

.vivasa-step-btn:hover {
	background: #f7f1e8;
}

.vivasa-adults-count,
.vivasa-children-count {
	min-width: 16px;
	text-align: center;
	font-size: 15px;
}

.vivasa-search-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: #4a2f1c;
	color: #fff;
	border: none;
	border-radius: 8px;
	padding: 14px 24px;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	cursor: pointer;
	white-space: nowrap;
	flex: 0 0 auto;
	height: 46px;
	align-self: flex-end;
}

.vivasa-search-btn .vivasa-icon {
	color: #fff;
}

.vivasa-icon {
	display: inline-block;
	vertical-align: middle;
}

.vivasa-search-btn:hover {
	background: #3a2415;
}

/* Responsive: stack vertically on narrow screens instead of overflowing */
@media (max-width: 640px) {
	.vivasa-search-card {
		padding: 14px;
	}
	.vivasa-search-row {
		flex-direction: column;
		align-items: stretch;
		gap: 10px;
		padding: 12px;
	}
	.vivasa-field-group {
		min-width: 0;
	}
	.vivasa-field-box {
		padding: 10px 12px;
	}
	.vivasa-field-label {
		margin-bottom: 4px;
	}
	.vivasa-search-btn {
		width: 100%;
	}
	.vivasa-guests-dropdown {
		left: 0;
		right: 0;
		width: 100%;
		min-width: 0;
		box-sizing: border-box;
	}
}

/* Calendar tabs */
.vivasa-cal-tab.active {
	font-weight: bold;
	text-decoration: underline;
}

.vivasa-cal-tab {
	background: none;
	border: none;
	padding: 6px 10px;
	cursor: pointer;
}

/* View-only calendar (used inside the [vivasa_villa_booking] alias):
   dates are for reference only, clicking doesn't select anything. */
.vivasa-view-only .flatpickr-day {
	cursor: default;
}

/* [vivasa_booking_summary] — the "middle dynamic layer" table on the
   two-column booking page. */
.vivasa-booking-summary-empty {
	background: #f7f1e8;
	border-radius: 10px;
	padding: 16px;
	color: #4a3826;
	font-size: 14px;
}

.vivasa-booking-summary-table {
	width: 100%;
	border-collapse: collapse;
	background: #fdfaf5;
	border: 1px solid #e8ddc8;
	border-radius: 10px;
	overflow: hidden;
	font-size: 15px;
	color: #4a3826;
}

.vivasa-booking-summary-table td {
	padding: 10px 14px;
	border-bottom: 1px solid #e8ddc8;
}

.vivasa-booking-summary-table td:last-child {
	text-align: right;
}

.vivasa-bs-duration td {
	font-weight: 600;
	background: #f7f1e8;
}

.vivasa-bs-total td {
	border-bottom: none;
	background: #f0e6d2;
	font-size: 17px;
}

.vivasa-booking-summary-table tr.vivasa-bs-header td {
	background: #f0e6d2;
	font-size: 13px;
	color: #4a3826;
	text-align: left;
}

.vivasa-booking-summary-table tr.vivasa-bs-status td {
	font-weight: 700;
	text-align: center;
	padding: 12px 14px;
}

.vivasa-bs-status-ok td {
	color: #2e7d32;
	background: #eaf5ea;
}

.vivasa-bs-status-error td {
	color: #b3261e;
	background: #fdecea;
}

/* Discount code field (single-villa mode only) */
.vivasa-discount-group {
	margin-top: 14px;
	max-width: 300px;
}

.vivasa-discount-code {
	width: 100%;
	box-sizing: border-box;
	padding: 10px 12px;
	border: 1px solid #d9c7ae;
	border-radius: 8px;
	font-size: 14px;
}

/* Dynamic price display ([vivasa_price]) */
.vivasa-price-display {
	display: inline-block;
}

.vivasa-price-label {
	font-size: 13px;
	color: #8a6d4a;
	text-transform: uppercase;
	letter-spacing: 1px;
}

.vivasa-price-amount {
	font-size: 28px;
	font-weight: 700;
	color: #4a2f1c;
}

.vivasa-price-unit {
	font-size: 14px;
	color: #8a6d4a;
}

/* ---------------------------------------------------------------------
   [vivasa_booking_card] — sidebar-card style, per client reference.
   Scoped entirely under .vivasa-booking-card so it never affects the
   general [vivasa_search] / [vivasa_villa_search] layouts elsewhere.
   Internal field elements (.vivasa-checkin, .vivasa-guests-toggle, etc.)
   are the SAME ones the general widgets use — only the surrounding
   grouping/boxes differ here, which is why no JS changes were needed.
   --------------------------------------------------------------------- */
.vivasa-booking-card {
	background: #f7f1e8;
	border-radius: 16px;
	padding: 20px;
	max-width: 380px;
}

.vivasa-booking-card .vivasa-bc-price {
	margin-bottom: 16px;
}

.vivasa-booking-card .vivasa-price-amount {
	font-size: 32px;
}

/* Check-in + Check-out combined into ONE bordered box, two columns. */
.vivasa-bc-dates-box {
	display: flex;
	align-items: stretch;
	background: #fdfaf5;
	border: 1px solid #e8ddc8;
	border-radius: 10px;
	margin-bottom: 12px;
	overflow: hidden;
}

.vivasa-bc-date-col {
	flex: 1;
	padding: 12px 14px;
	min-width: 0;
}

.vivasa-bc-date-col .vivasa-checkin,
.vivasa-bc-date-col .vivasa-checkout {
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
	outline: none !important;
	width: 100%;
	font-size: 15px;
	font-weight: 600;
	color: #4a3826;
	padding: 0;
	margin-top: 4px;
}

.vivasa-bc-date-divider {
	width: 1px;
	background: #e8ddc8;
	flex-shrink: 0;
}

/* Guests in its own separate box below the dates box. */
.vivasa-bc-guests-box {
	background: #fdfaf5;
	border: 1px solid #e8ddc8;
	border-radius: 10px;
	padding: 12px 14px;
	margin-bottom: 16px;
}

.vivasa-bc-guests-box .vivasa-field-box {
	background: transparent;
	padding: 4px 0 0;
}

.vivasa-bc-guests-box .vivasa-guests-display {
	font-weight: 600;
}

/* One large, full-width, fully rounded (pill) button. */
.vivasa-bc-button {
	width: 100%;
	border-radius: 999px;
	padding: 16px 24px;
	font-size: 14px;
}

.vivasa-booking-card .vivasa-single-result {
	margin-top: 16px;
}

/* Responsive: card already stacks naturally (single column by design),
   just tighten padding/font-size slightly on narrow screens so it never
   feels cramped inside a mobile sidebar/stacked layout. */
@media (max-width: 640px) {
	.vivasa-booking-card {
		max-width: 100%;
		padding: 16px;
	}
	.vivasa-booking-card .vivasa-price-amount {
		font-size: 26px;
	}
	.vivasa-bc-date-col {
		padding: 10px 12px;
	}
}
