/*
 * La Huella · Selector de fechas (MotoPress / jQuery datepick)
 * Paleta: Oro #B4894A · Oro claro #CFA968 · Oro suave #E4CE9E · Oliva #333A24
 *         Crema #F5F0E4 · Arena #E7DECB · Papel #FCFAF3 · Tinta #22241B · Apagado #807D6E
 */

/* ---------- Contenedor ---------- */

html body .datepick-popup {
	z-index: 99999 !important;
	background: transparent !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	overflow: visible !important;
}

html body :is(.datepick-popup, .mphb-calendar) .datepick {
	position: relative !important;
	width: auto !important;
	height: auto !important;
	padding: 18px 18px 10px !important;
	background: #FCFAF3 !important;
	border: 1px solid rgba(34, 36, 27, .10) !important;
	border-radius: 18px !important;
	box-shadow: 0 28px 60px -28px rgba(24, 26, 16, .45) !important;
	font-family: Archivo, system-ui, sans-serif !important;
	color: #22241B !important;
	overflow: hidden !important;
}

html body .datepick-popup .datepick {
	box-sizing: border-box !important;
	width: 700px !important;
	max-width: calc(100vw - 24px) !important;
	max-height: calc(100vh - 24px) !important;
	max-height: calc(100dvh - 24px) !important;
	padding: 24px !important;
	border-color: #DDD5C5 !important;
	border-radius: 20px !important;
	overflow-x: hidden !important;
	overflow-y: auto !important;
	overscroll-behavior: contain;
	scrollbar-width: thin;
}

html body .mphb-calendar .datepick {
	box-shadow: none !important;
}

html body .datepick-popup.mphb-loading .datepick {
	opacity: .75;
}

/* El contexto de llegada/salida permanece en el flujo: las flechas se adaptan
 * a la altura real de la cabecera, incluso cuando el texto ocupa dos líneas. */
html body .datepick-popup .lh-cal-head {
	display: grid;
	gap: 6px;
	margin: 0 0 20px;
	padding: 0 0 18px;
	border-bottom: 1px solid #E7DECB;
}

html body .datepick-popup .lh-cal-title {
	color: #333A24;
	font-family: Fraunces, Georgia, serif;
	font-size: 25px;
	font-weight: 400;
	line-height: 1.25;
}

html body .datepick-popup .lh-cal-hint {
	color: #625F53;
	font-size: 13px;
	font-weight: 400;
	line-height: 1.5;
}

/* ---------- Navegación: flechas en vez de "<Ant · Hoy · Sig>" ---------- */

html body :is(.datepick-popup, .mphb-calendar) .datepick-nav {
	position: absolute !important;
	top: 18px !important;
	left: 14px !important;
	right: 14px !important;
	width: auto !important;
	margin: 0 !important;
	padding: 0 !important;
	height: 0 !important;
	display: flex !important;
	justify-content: space-between;
	background: transparent !important;
	border: 0 !important;
	z-index: 2;
	pointer-events: none;
}

html body :is(.datepick-popup, .mphb-calendar) .datepick-nav .datepick-cmd {
	pointer-events: auto;
	position: static !important;
	float: none !important;
	display: flex !important;
	align-items: center;
	justify-content: center;
	width: 36px !important;
	height: 36px !important;
	padding: 0 !important;
	border-radius: 50% !important;
	background: transparent !important;
	color: #333A24 !important;
	font-size: 0 !important;
	text-decoration: none !important;
	transition: background .15s;
}

html body :is(.datepick-popup, .mphb-calendar) .datepick-nav .datepick-cmd::before {
	font-family: Georgia, 'Times New Roman', serif;
	font-size: 26px;
	line-height: 1;
	margin-top: -3px;
}

html body :is(.datepick-popup, .mphb-calendar) .datepick-nav .datepick-cmd-prev::before { content: '\2039'; }
html body :is(.datepick-popup, .mphb-calendar) .datepick-nav .datepick-cmd-next::before { content: '\203A'; }

html body :is(.datepick-popup, .mphb-calendar) .datepick-nav .datepick-cmd-today {
	display: none !important;
}

html body :is(.datepick-popup, .mphb-calendar) .datepick-nav .datepick-cmd:hover {
	background: #F5F0E4 !important;
	color: #22241B !important;
}

html body :is(.datepick-popup, .mphb-calendar) .datepick-nav .datepick-disabled {
	opacity: .4;
	pointer-events: none;
}

html body .datepick-popup .datepick-nav {
	position: relative !important;
	top: auto !important;
	left: auto !important;
	right: auto !important;
	height: 44px !important;
}

html body .datepick-popup .datepick-nav .datepick-cmd {
	width: 44px !important;
	height: 44px !important;
	border: 1px solid #E7DECB !important;
	background: #FCFAF3 !important;
}

html body .datepick-popup .datepick .datepick-month-row {
	margin-top: -44px !important;
	gap: 20px;
}

/* ---------- Meses ---------- */

html body :is(.datepick-popup, .mphb-calendar) .datepick .datepick-month-row {
	display: flex !important;
	gap: 28px;
}

html body :is(.datepick-popup, .mphb-calendar) .datepick .datepick-month {
	float: none !important;
	flex: 1 1 0;
	width: auto !important;
	min-width: 252px;
	margin: 0 !important;
	border: 0 !important;
	background: transparent !important;
}

html body :is(.datepick-popup, .mphb-calendar) .datepick .datepick-month-header {
	height: 44px !important;
	line-height: 44px !important;
	padding: 0 46px !important;
	background: transparent !important;
	border: 0 !important;
	color: #22241B !important;
	font-family: Fraunces, Georgia, serif !important;
	font-size: 19px !important;
	font-weight: 400 !important;
	text-align: center;
	text-transform: capitalize;
	white-space: nowrap; /* «Octubre 2026» en una línea: no se encima con los días de la semana. */
}

/* Los desplegables de mes/año se ven como texto, pero siguen funcionando. */
html body :is(.datepick-popup, .mphb-calendar) .datepick .datepick-month-header select {
	-webkit-appearance: none !important;
	appearance: none !important;
	width: auto !important;
	height: auto !important;
	margin: 0 !important;
	padding: 0 2px !important;
	background: transparent !important;
	border: 0 !important;
	border-radius: 6px !important;
	box-shadow: none !important;
	color: inherit !important;
	font: inherit !important;
	text-transform: capitalize;
	cursor: pointer;
	field-sizing: content;
}

html body :is(.datepick-popup, .mphb-calendar) .datepick .datepick-month-header select:hover {
	background: #F5F0E4 !important;
}

html body :is(.datepick-popup, .mphb-calendar) .datepick .datepick-month-header select option {
	font-family: Archivo, system-ui, sans-serif;
	font-size: 14px;
	color: #22241B;
	background: #FCFAF3;
}

/* ---------- Grilla ---------- */

html body :is(.datepick-popup, .mphb-calendar) .datepick .datepick-month table {
	width: 100% !important;
	margin: 8px 0 0 !important;
	border: 0 !important;
	border-collapse: separate !important;
	border-spacing: 0 4px !important;
	background: transparent !important;
	table-layout: fixed;
}

html body :is(.datepick-popup, .mphb-calendar) .datepick .datepick-month th,
html body :is(.datepick-popup, .mphb-calendar) .datepick .datepick-month th * {
	padding: 6px 0 !important;
	background: transparent !important;
	border: 0 !important;
	color: #625F53 !important;
	font-size: 11px !important;
	font-weight: 500 !important;
	letter-spacing: 1px;
	text-transform: uppercase;
	text-align: center;
}

html body :is(.datepick-popup, .mphb-calendar) .datepick .datepick-month th * {
	padding: 0 !important;
}

html body :is(.datepick-popup, .mphb-calendar) .datepick .datepick-month td {
	padding: 0 !important;
	background: transparent !important;
	border: 0 !important;
	text-align: center;
}

/* Cada día (un <a> si se puede elegir, un <span> si no). */
html body :is(.datepick-popup, .mphb-calendar) .datepick .datepick-month td > * {
	display: flex !important;
	align-items: center;
	justify-content: center;
	width: 100% !important;
	height: 44px !important;
	margin: 0 !important;
	padding: 0 !important;
	background: transparent !important;
	border: 0 !important;
	border-radius: 10px !important;
	color: #22241B !important;
	font-size: 14px !important;
	font-weight: 400 !important;
	font-variant-numeric: tabular-nums;
	text-decoration: none !important;
	box-shadow: none !important;
	opacity: 1 !important;
	transition: background .15s, color .15s;
}

/* Casilleros vacíos de otros meses. */
html body :is(.datepick-popup, .mphb-calendar) .datepick .datepick-month td > :is(.datepick-other-month, .mphb-extra-date) {
	visibility: hidden;
}

/* Días que se pueden elegir. */
html body :is(.datepick-popup, .mphb-calendar) .datepick .datepick-month td > :is(a, .mphb-selectable-date) {
	cursor: pointer;
}

html body :is(.datepick-popup, .mphb-calendar) .datepick .datepick-month td > :is(a, .mphb-selectable-date):hover {
	background: #E7DECB !important;
	color: #22241B !important;
}

/* Hoy. */
html body :is(.datepick-popup, .mphb-calendar) .datepick .datepick-month td > .datepick-today {
	box-shadow: inset 0 0 0 1px #CFA968 !important;
	font-weight: 600 !important;
}

/* Días pasados o fuera de temporada. */
html body :is(.datepick-popup, .mphb-calendar) .datepick .datepick-month td > :is(.mphb-past-date, .mphb-earlier-min-date, .mphb-later-max-date, .mphb-out-of-season-date) {
	background: transparent !important;
	color: #A8A294 !important;
	cursor: default;
}

/* Libres pero no válidos para empezar o terminar (estadía mínima, reglas de check-in/out). */
html body :is(.datepick-popup, .mphb-calendar) .datepick .datepick-month td > .mphb-unselectable-date {
	background: transparent !important;
	color: #928C7D !important;
	cursor: default;
}

html body :is(.datepick-popup, .mphb-calendar) .datepick .datepick-month td > .mphb-unselectable-date:hover {
	background: transparent !important;
}

/* Ocupados: tachado suave. */
html body :is(.datepick-popup, .mphb-calendar) .datepick .datepick-month td > :is(.mphb-booked-date, .mphb-not-available-date):not(.mphb-selectable-date) {
	background: #F3EFE6 !important;
	color: #807B6D !important;
	text-decoration: line-through !important;
	text-decoration-color: rgba(128, 125, 110, .55) !important;
	text-decoration-thickness: 1px !important;
}

/* ---------- Rango elegido ---------- */

/* Noches del medio: dorado suave y sin cortes entre días. */
html body :is(.datepick-popup, .mphb-calendar) .datepick .datepick-month td > .mphb-selected-date {
	background: #F1E6D2 !important;
	color: #333A24 !important;
	border-radius: 0 !important;
	text-decoration: none !important;
}

/* Hover en el calendario de salida: muestra hasta dónde llegaría la estadía. */
html body :is(.datepick-popup, .mphb-calendar) .datepick .datepick-month td > .datepick-highlight {
	background: #E4CE9E !important;
	color: #22241B !important;
}

/* Noches entre la llegada y la salida (o el día señalado), pintadas por datepicker.js. */
html body :is(.datepick-popup, .mphb-calendar) .datepick .datepick-month td > .lh-in-range {
	background: #F1E6D2 !important;
	color: #333A24 !important;
	border-radius: 0 !important;
	text-decoration: none !important;
}

html body .datepick-popup .mphb-check-out-datepick .datepick-month td > .datepick-highlight {
	border-radius: 0 10px 10px 0 !important;
}

/* Llegada y salida: dorado pleno. */
html body :is(.datepick-popup, .mphb-calendar) .datepick .datepick-month td > :is(.datepick-selected, .mphb-check-in-date, .mphb-selected-date--check-in, .mphb-selected-date--check-out) {
	background: #B4894A !important;
	color: #22241B !important;
	font-weight: 700 !important;
	text-decoration: none !important;
	box-shadow: none !important;
}

html body :is(.datepick-popup, .mphb-calendar) .datepick .datepick-month td > :is(.mphb-check-in-date, .mphb-selected-date--check-in) {
	border-radius: 10px 0 0 10px !important;
}

html body :is(.datepick-popup, .mphb-calendar) .datepick .datepick-month td > .mphb-selected-date--check-out,
html body .datepick-popup .mphb-check-out-datepick .datepick-month td > .datepick-selected {
	border-radius: 0 10px 10px 0 !important;
}

/* Hover en la salida: el día señalado toma el corchete de cierre (mismo dorado que la salida elegida). */
html body .datepick-popup .mphb-check-out-datepick .datepick-month td > a.lh-hover-end,
html body .datepick-popup .mphb-check-out-datepick .datepick-month td > a.lh-hover-end:hover {
	background: #B4894A !important;
	color: #22241B !important;
	font-weight: 700 !important;
	border-radius: 0 10px 10px 0 !important;
	box-shadow: none !important;
}

/* La salida elegida antes deja de verse como cierre mientras se señala otra. */
html body .datepick-popup .mphb-check-out-datepick .datepick-month td > .lh-prev-end {
	background: transparent !important;
	color: #333A24 !important;
	font-weight: 400 !important;
	border-radius: 10px !important;
}

html body .datepick-popup .mphb-check-out-datepick .datepick-month td > .lh-prev-end.lh-in-range {
	background: #F1E6D2 !important;
	border-radius: 0 !important;
}

/* ---------- Pie: Limpiar / Cerrar ---------- */

html body :is(.datepick-popup, .mphb-calendar) .datepick-ctrl {
	float: none !important;
	clear: both;
	width: auto !important;
	display: flex !important;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	margin: 14px 0 0 !important;
	padding: 16px 0 0 !important;
	background: transparent !important;
	border: 0 !important;
	border-top: 1px solid #E7DECB !important;
}

html body :is(.datepick-popup, .mphb-calendar) .datepick-ctrl .datepick-cmd {
	float: none !important;
	width: auto !important;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-height: 44px !important;
	padding: 10px 16px !important;
	background: transparent !important;
	border-radius: 24px !important;
	color: #625F53 !important;
	font-size: 13px !important;
	font-weight: 500 !important;
	letter-spacing: .3px;
	text-decoration: none !important;
}

html body :is(.datepick-popup, .mphb-calendar) .datepick-ctrl .datepick-cmd-close {
	min-width: 118px;
	background: #333A24 !important;
	color: #FCFAF3 !important;
	font-weight: 600 !important;
}

html body :is(.datepick-popup, .mphb-calendar) .datepick-ctrl .datepick-cmd:hover {
	background: #F5F0E4 !important;
	color: #333A24 !important;
}

html body :is(.datepick-popup, .mphb-calendar) .datepick-ctrl .datepick-cmd-close:hover {
	background: #20241A !important;
	color: #FCFAF3 !important;
}

html body :is(.datepick-popup, .mphb-calendar) .datepick :is(a, select, button):focus-visible {
	outline: 2px solid #333A24 !important;
	outline-offset: -3px !important;
}

html body :is(.datepick-popup, .mphb-calendar) .datepick .datepick-cmd-close:focus-visible {
	outline-color: #CFA968 !important;
}

html body .datepick-popup .lh-cal-summary {
	margin: 16px 0 0;
	padding: 12px 14px;
	border: 1px solid #E7DECB;
	border-radius: 10px;
	background: #F5F0E4;
	color: #333A24;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.5;
}

html body .datepick-popup .lh-cal-summary:empty {
	display: none;
}

html body .datepick-popup .lh-cal-legend {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px 18px;
	margin: 14px 0 0;
	color: #625F53;
	font-size: 11px;
	line-height: 1.5;
}

html body .datepick-popup .lh-cal-legend > span {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

html body .datepick-popup .lh-cal-legend > span::before {
	content: '';
	box-sizing: border-box;
	width: 12px;
	height: 12px;
	flex: 0 0 12px;
	border: 1px solid #ABA28F;
	border-radius: 3px;
	background: #FCFAF3;
}

html body .datepick-popup .lh-cal-legend > [data-kind="unavailable"]::before {
	background: linear-gradient(135deg, transparent 43%, #807B6D 43%, #807B6D 56%, transparent 56%), #F3EFE6;
}

html body .datepick-popup .lh-cal-legend > [data-kind="selected"]::before {
	border-color: #B4894A;
	background: #B4894A;
}

html body :is(.datepick-popup, .mphb-calendar) .datepick-clear-fix {
	display: none !important;
}

/* ---------- Celular: un mes, como panel desde abajo ---------- */

@media (max-width: 600px) {
	html body .datepick-popup {
		position: fixed !important;
		top: auto !important;
		right: 0 !important;
		bottom: 0 !important;
		left: 0 !important;
	}

	html body .datepick-popup .datepick {
		width: 100% !important;
		max-width: none !important;
		padding: 28px 16px calc(16px + env(safe-area-inset-bottom)) !important;
		border: 0 !important;
		border-radius: 22px 22px 0 0 !important;
		/* La sombra gigante oscurece el resto de la página como fondo del panel. */
		box-shadow: 0 0 0 100vmax rgba(20, 22, 14, .45) !important;
		overflow-x: hidden !important;
		overflow-y: auto !important;
	}

	/* Manija del panel. */
	html body .datepick-popup .datepick::before {
		content: '';
		position: absolute;
		top: 9px;
		left: 50%;
		width: 40px;
		height: 4px;
		margin-left: -20px;
		border-radius: 2px;
		background: #E7DECB;
	}

	html body :is(.datepick-popup, .mphb-calendar) .datepick .datepick-month {
		min-width: 0;
	}

	html body :is(.datepick-popup, .mphb-calendar) .datepick .datepick-month td > * {
		height: 46px !important;
		font-size: 16px !important;
	}

	html body :is(.datepick-popup, .mphb-calendar) .datepick-ctrl .datepick-cmd {
		padding: 10px 14px !important;
		font-size: 15px !important;
	}

	html body .datepick-popup .lh-cal-head {
		gap: 5px;
		margin-bottom: 16px;
		padding-bottom: 14px;
	}

	html body .datepick-popup .lh-cal-title {
		font-size: 23px;
	}

	html body .datepick-popup .lh-cal-legend {
		gap: 8px 12px;
		font-size: 11px;
	}
}

/* Aviso mientras el calendario termina de cargar (datepicker.js, T-04). */
html body .lh-cal-estado {
	display: block;
	margin: 6px 0 0;
	font-family: Archivo, system-ui, sans-serif;
	font-size: 13px;
	line-height: 1.4;
	color: #625F53;
}

html body .lh-cal-estado.is-error {
	padding: 9px 11px;
	border: 1px solid #DEC1B7;
	border-radius: 8px;
	background: #FBF0EB;
	color: #8A3324;
}

html body .lh-cal-retry {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	margin: 8px 0 0 10px;
	padding: 8px 14px;
	border: 1px solid #8A3324;
	border-radius: 8px;
	background: #FCFAF3;
	color: #8A3324;
	font: 500 13px/1.4 Archivo, system-ui, sans-serif;
	cursor: pointer;
}

html body .datepick-popup.lh-cal-failed .datepick-month-row,
html body .datepick-popup.mphb-loading .datepick-month-row {
	pointer-events: none;
	opacity: .45;
}

@media (prefers-reduced-motion: reduce) {
	html body :is(.datepick-popup, .mphb-calendar) .datepick * {
		transition: none !important;
		animation: none !important;
	}
}
