.cr {
	--cr-ink: #23201c;
	--cr-muted: #7b746a;
	--cr-line: #ddd6cb;
	--cr-busy: #f0ebe3;
	--cr-accent: #2f6b5a;
	--cr-accent-soft: #dcebe4;

	font: inherit;
	color: var(--cr-ink);
	max-width: 46rem;
}

/* Sin esto, el padding y el borde de los campos (width:100%) se suman al
   100% del ancho en vez de repartirse dentro de él, y eso es justo lo que
   provocaba el desplazamiento lateral de unos pocos píxeles en móvil. */
.cr, .cr *, .cr *::before, .cr *::after {
	box-sizing: border-box;
}

/* Varios bloques del motor fijan su propio "display" (grid, flex...), lo que
   por cascada gana al [hidden] del navegador. Esta regla se asegura de que
   "hidden" siempre oculte de verdad, sin depender de qué clase lleve el bloque. */
.cr [hidden] {
	display: none !important;
}

.cr__picker {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	margin-bottom: 1.5rem;
}

/* ---------------------------------------------------------------
 * Formulario de datos (paso 2): bloques apilados en orden fijo.
 * Dentro de cada bloque, rejilla de 2 columnas (1 en móvil).
 * --------------------------------------------------------------- */
.cr__form {
	display: flex;
	flex-direction: column;
	gap: 1.4rem;
	margin-bottom: 1.5rem;
}

.cr__section {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem;
	margin: 0;
	padding: 0;
	border: 0;
	min-width: 0;
}

.cr__section legend {
	float: left; /* hace que la leyenda se comporte como un hijo más de la rejilla */
	grid-column: 1 / -1;
	width: 100%;
	margin: 0 0 .1rem;
	padding: 0 0 .4rem;
	font-weight: 600;
	font-size: 1rem;
	border-bottom: 1px solid var(--cr-line);
}

.cr__section .cr__field--wide { grid-column: 1 / -1; }

@media (max-width: 560px) {
	.cr__section { grid-template-columns: minmax(0, 1fr); }
}

.cr__label { color: var(--cr-ink); }
.cr__req { color: #b4472f; text-decoration: none; border: 0; cursor: help; }
.cr__opt, .cr__hint { color: var(--cr-muted); font-size: .8rem; }

.cr__field--invalid input,
.cr__field--invalid textarea { border-color: #b4472f; box-shadow: 0 0 0 1px #b4472f; }

.cr__check {
	display: flex;
	align-items: flex-start;
	gap: .6rem;
	font-size: .92rem;
	cursor: pointer;
}

.cr__check label { cursor: pointer; }

.cr__link {
	font: inherit;
	padding: 0;
	border: 0;
	background: none;
	color: var(--cr-accent);
	text-decoration: underline;
	text-underline-offset: 2px;
	cursor: pointer;
}

.cr__link:focus-visible { outline: 2px solid var(--cr-accent); outline-offset: 2px; }

/* Ventana emergente (política de cancelación). Va fuera de .cr, en <body>. */
.cr-modal {
	--cr-ink: #23201c;
	--cr-muted: #7b746a;
	--cr-accent: #2f6b5a;
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(20, 18, 15, .55);
}

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

html.cr-modal-open { overflow: hidden; }

.cr-modal__box {
	position: relative;
	width: 100%;
	max-width: 32rem;
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	padding: 1.6rem 1.6rem 1.3rem;
	background: #fff;
	color: var(--cr-ink);
	border-radius: 8px;
	box-shadow: 0 18px 50px rgba(0, 0, 0, .25);
	box-sizing: border-box;
}

.cr-modal__title { margin: 0 2rem .8rem 0; font-size: 1.15rem; line-height: 1.3; }
.cr-modal__text { white-space: pre-line; font-size: .95rem; line-height: 1.55; color: var(--cr-ink); }
.cr-modal__actions { display: flex; justify-content: flex-end; margin-top: 1.3rem; }

.cr-modal__close {
	position: absolute;
	top: .6rem;
	right: .7rem;
	width: 2rem;
	height: 2rem;
	border: 0;
	background: none;
	font-size: 1.5rem;
	line-height: 1;
	color: var(--cr-muted);
	cursor: pointer;
}

.cr-modal .cr__submit {
	font: inherit;
	padding: .6rem 1.3rem;
	border: 0;
	border-radius: 3px;
	background: var(--cr-accent);
	color: #fff;
	cursor: pointer;
}

.cr__check input {
	width: 1.15rem;
	height: 1.15rem;
	margin: .15rem 0 0;
	flex: 0 0 auto;
	accent-color: var(--cr-accent);
}

.cr__hp {
	position: absolute !important;
	left: -10000px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.cr__turnstile { min-height: 65px; }

.cr__actions {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: .8rem;
	flex-wrap: wrap;
}

@media (max-width: 560px) {
	.cr__actions { flex-direction: column-reverse; align-items: stretch; }
	.cr__actions .cr__submit, .cr__actions .cr__back { width: 100%; margin: 0; }
}

.cr__field {
	display: flex;
	flex-direction: column;
	gap: .3rem;
	flex: 1 1 11rem;
	font-size: .9rem;
}

.cr__field--wide { flex-basis: 100%; }

.cr__field > span { color: var(--cr-muted); }

.cr__field input,
.cr__field select,
.cr__field textarea {
	font: inherit;
	padding: .55rem .7rem;
	border: 1px solid var(--cr-line);
	border-radius: 3px;
	background: #fff;
	color: inherit;
	width: 100%;
}

.cr__field :focus-visible,
.cr__day:focus-visible,
.cr__submit:focus-visible {
	outline: 2px solid var(--cr-accent);
	outline-offset: 2px;
}

.cr__nav {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1rem;
}

.cr__nav-btn {
	font: inherit;
	font-size: .85rem;
	padding: .45rem .8rem;
	border: 1px solid var(--cr-line);
	border-radius: 3px;
	background: transparent;
	color: inherit;
	cursor: pointer;
}

.cr__nav-btn[disabled] {
	opacity: .35;
	cursor: not-allowed;
}

.cr__months {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2rem;
}

@media (min-width: 640px) {
	.cr__months {
		grid-template-columns: 1fr 1fr;
	}
}

.cr__month h3 {
	margin: 0 0 .6rem;
	font-size: 1rem;
	font-weight: 600;
}

.cr__grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 2px;
}

.cr__dow {
	font-size: .72rem;
	color: var(--cr-muted);
	text-align: center;
	padding-bottom: .3rem;
}

.cr__day {
	font: inherit;
	font-size: .85rem;
	aspect-ratio: 1;
	border: 0;
	border-radius: 2px;
	background: transparent;
	color: inherit;
	cursor: pointer;
}

.cr__day:hover:not([disabled]) { background: var(--cr-accent-soft); }

.cr__day[disabled] {
	background: var(--cr-busy);
	color: var(--cr-muted);
	cursor: not-allowed;
	text-decoration: line-through;
}

.cr__day--empty { visibility: hidden; }

.cr__day--in-range { background: var(--cr-accent-soft); }

.cr__day--edge {
	background: var(--cr-accent);
	color: #fff;
}

.cr__results {
	display: grid;
	gap: .8rem;
	margin: 1.5rem 0;
}

.cr__room {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: .8rem;
	padding: .9rem 1rem;
	border: 1px solid var(--cr-line);
	border-radius: 3px;
}

.cr__room--selected {
	border-color: var(--cr-accent);
	background: var(--cr-accent-soft);
}

.cr__room h4 {
	margin: 0 0 .2rem;
	font-size: 1rem;
}

.cr__room small {
	color: var(--cr-muted);
}

.cr__room-price {
	font-weight: 600;
	white-space: nowrap;
	margin: 0 40px 0 auto;
}

/* El nowrap + margen fijo de arriba es correcto en escritorio, pero en una
   tarjeta estrecha de móvil no deja sitio y provoca scroll lateral. Aquí
   se relaja solo por debajo de 480px. */
@media (max-width: 480px) {
	.cr__room-price {
		margin: 0;
		white-space: normal;
	}
}

.cr__room a.cr__submit {
	text-decoration: none;
	display: inline-block;
}

.cr__pillgroup {
	display: flex;
	gap: .5rem;
}

.cr__pill {
	font: inherit;
	font-size: .9rem;
	min-width: 2.6rem;
	padding: .5rem .7rem;
	border: 1px solid var(--cr-line);
	border-radius: 3px;
	background: #fff;
	color: inherit;
	cursor: pointer;
}

.cr__pill:hover:not(.cr__pill--selected) { background: var(--cr-accent-soft); }

.cr__pill--selected {
	background: var(--cr-accent);
	border-color: var(--cr-accent);
	color: #fff;
}

.cr__note {
	font-size: .85rem;
	color: var(--cr-muted);
	margin: .2rem 0 .6rem;
}

.cr__policy {
	font-size: .85rem;
	color: var(--cr-muted);
	white-space: pre-line;
	padding: .8rem 1rem;
	border: 1px solid var(--cr-line);
	border-radius: 3px;
	margin-bottom: .6rem;
}

.cr__summary {
	padding: .8rem 1rem;
	border-left: 3px solid var(--cr-accent);
	background: var(--cr-accent-soft);
	font-size: .92rem;
	line-height: 1.5;
}

.cr__quote {
	margin: 1rem 0 1.5rem;
	padding: .9rem 1rem;
	border-left: 3px solid var(--cr-accent);
	background: var(--cr-accent-soft);
}

.cr__quote-head {
	margin: 0 0 .8rem;
	font-size: 1rem;
	font-weight: 600;
}

.cr__quote .cr__field { margin-bottom: .2rem; }

.cr__submit {
	font: inherit;
	padding: .7rem 1.4rem;
	border: 0;
	border-radius: 3px;
	background: var(--cr-accent);
	color: #fff;
	cursor: pointer;
}

.cr__submit[disabled] { opacity: .5; cursor: wait; }

.cr__back {
	font: inherit;
	padding: .7rem 1.2rem;
	border: 1px solid var(--cr-line);
	border-radius: 3px;
	background: transparent;
	color: inherit;
	cursor: pointer;
}

.cr__msg:empty { display: none; }

.cr__msg {
	margin-top: 1rem;
	padding: .8rem 1rem;
	border: 1px solid var(--cr-line);
	border-radius: 3px;
}

.cr__msg--error {
	border-color: #b4472f;
	color: #8d3722;
}
