/*
 * Libro de Reclamaciones Virtual — formulario paso a paso.
 * La tipografia se hereda del tema activo salvo que se fije una en los ajustes.
 */

.lrv-root {
	--lrv-accent: #c8102e;
	--lrv-on-accent: #fff;
	--lrv-accent-soft: rgba(200, 16, 46, 0.1);
	--lrv-ink: #1f1f24;
	--lrv-ink-soft: #6b6b74;
	--lrv-line: #e3e3e9;
	--lrv-bg: #fff;
	--lrv-radius: 10px;

	font-family: inherit;
	color: var(--lrv-ink);
	box-sizing: border-box;
}

.lrv-root *,
.lrv-root *::before,
.lrv-root *::after {
	box-sizing: inherit;
}

/* ------------------------------------------------------------------ */
/* Disparador                                                         */
/* ------------------------------------------------------------------ */

.lrv-trigger {
	display: inline-block;
	padding: 0;
	margin: 0;
	background: none;
	border: 0;
	cursor: pointer;
	line-height: 1;
	font: inherit;
	color: inherit;
	transition: transform 0.15s ease, opacity 0.15s ease;
}

.lrv-trigger:hover { transform: translateY(-1px); opacity: 0.92; }
.lrv-trigger:focus-visible { outline: 2px solid var(--lrv-accent); outline-offset: 3px; }

.lrv-trigger--boton {
	padding: 12px 22px;
	border-radius: var(--lrv-radius);
	background: var(--lrv-accent);
	color: var(--lrv-on-accent);
	font-weight: 600;
	font-size: 15px;
}

.lrv-trigger--enlace {
	text-decoration: underline;
	color: var(--lrv-accent);
	font-weight: 600;
}

.lrv-aviso {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 12px 18px;
	border: 2px solid var(--lrv-accent);
	border-radius: var(--lrv-radius);
	color: var(--lrv-accent);
	background: #fff;
	font-weight: 700;
	font-size: 14px;
	letter-spacing: 0.01em;
	text-align: left;
}

.lrv-aviso__text { max-width: 9em; line-height: 1.25; }

.lrv-align-center { display: block; margin: 0 auto; }
.lrv-align-right { display: block; margin-left: auto; }

/* ------------------------------------------------------------------ */
/* Modal                                                              */
/* ------------------------------------------------------------------ */

.lrv-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

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

.lrv-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(18, 18, 22, 0.62);
	backdrop-filter: blur(2px);
	animation: lrv-fade 0.2s ease;
}

.lrv-modal__dialog {
	position: relative;
	width: 100%;
	max-width: 660px;
	max-height: calc(100vh - 40px);
	display: flex;
	flex-direction: column;
	background: var(--lrv-bg);
	border-radius: 14px;
	box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
	overflow: hidden;
	animation: lrv-rise 0.24s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.lrv-modal__close {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 2;
	width: 34px;
	height: 34px;
	display: grid;
	place-items: center;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.05);
	color: var(--lrv-ink-soft);
	cursor: pointer;
	transition: background 0.15s ease;
}

.lrv-modal__close:hover { background: rgba(0, 0, 0, 0.1); color: var(--lrv-ink); }

@keyframes lrv-fade { from { opacity: 0; } }
@keyframes lrv-rise { from { opacity: 0; transform: translateY(16px); } }

/* ------------------------------------------------------------------ */
/* Formulario                                                         */
/* ------------------------------------------------------------------ */

.lrv-form {
	display: flex;
	flex-direction: column;
	min-height: 0;
	flex: 1;
	background: var(--lrv-bg);
}

.lrv-form[data-context="inline"] {
	border: 1px solid var(--lrv-line);
	border-radius: 14px;
	overflow: hidden;
	max-width: 660px;
}

.lrv-form__head {
	flex: none;
	padding: 20px 26px 0;
	border-bottom: 1px solid var(--lrv-line);
}

.lrv-brand {
	display: flex;
	align-items: center;
	gap: 12px;
	padding-right: 44px;
	padding-bottom: 16px;
}

.lrv-brand__logo { max-height: 40px; max-width: 130px; width: auto; height: auto; }

.lrv-brand__meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lrv-brand__meta strong { font-size: 14px; line-height: 1.2; }
.lrv-brand__meta span { font-size: 12px; color: var(--lrv-ink-soft); line-height: 1.3; }

.lrv-progress {
	height: 3px;
	margin: 0 -26px -1px;
	background: var(--lrv-line);
}

.lrv-progress__bar {
	display: block;
	height: 100%;
	width: 0;
	background: var(--lrv-accent);
	transition: width 0.3s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.lrv-steps {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	padding: 30px 26px 34px;
}

.lrv-step { display: none; }
.lrv-step.is-active { display: block; animation: lrv-step-in 0.26s cubic-bezier(0.2, 0.8, 0.3, 1); }

@keyframes lrv-step-in { from { opacity: 0; transform: translateY(14px); } }

.lrv-title { margin: 0 0 10px; font-size: 22px; line-height: 1.25; font-weight: 700; color: var(--lrv-ink); }
.lrv-lede { margin: 0 0 16px; font-size: 15px; line-height: 1.6; color: var(--lrv-ink-soft); }
.lrv-fineprint { margin: 0 0 14px; font-size: 12.5px; line-height: 1.5; color: var(--lrv-ink-soft); }

.lrv-q__label {
	margin: 0 0 6px;
	font-size: 20px;
	line-height: 1.3;
	font-weight: 700;
	color: var(--lrv-ink);
}

.lrv-q__hint { margin: 0 0 18px; font-size: 14px; line-height: 1.55; color: var(--lrv-ink-soft); }
.lrv-q__label + .lrv-input,
.lrv-q__label + .lrv-choices,
.lrv-q__label + .lrv-check { margin-top: 18px; }

.lrv-q__actions {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-top: 22px;
	flex-wrap: wrap;
}

.lrv-enter-hint { font-size: 12px; color: var(--lrv-ink-soft); }

.lrv-notes {
	margin: 18px 0 0;
	padding: 0 0 0 18px;
	font-size: 12.5px;
	line-height: 1.6;
	color: var(--lrv-ink-soft);
}

.lrv-notes li { margin-bottom: 6px; }

/* Campos ------------------------------------------------------------ */

.lrv-input {
	display: block;
	width: 100%;
	margin: 0 0 12px;
	padding: 13px 15px;
	font: inherit;
	font-size: 16px;
	color: var(--lrv-ink);
	background: #fff;
	border: 1px solid var(--lrv-line);
	border-radius: var(--lrv-radius);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
	-webkit-appearance: none;
	appearance: none;
}

.lrv-input:focus {
	outline: 0;
	border-color: var(--lrv-accent);
	box-shadow: 0 0 0 3px var(--lrv-accent-soft);
}

.lrv-input.is-invalid { border-color: #d3302f; box-shadow: 0 0 0 3px rgba(211, 48, 47, 0.12); }

.lrv-textarea { resize: vertical; min-height: 120px; line-height: 1.55; }

.lrv-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lrv-grid-2 .lrv-input { margin-bottom: 12px; }

@media (max-width: 520px) {
	.lrv-grid-2 { grid-template-columns: 1fr; gap: 0; }
}

/* Opciones ---------------------------------------------------------- */

.lrv-choices { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.lrv-choices--inline { flex-direction: row; flex-wrap: wrap; gap: 8px; }

.lrv-choice { position: relative; cursor: pointer; }
.lrv-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }

.lrv-choices--inline .lrv-choice > span {
	display: inline-block;
	padding: 9px 15px;
	font-size: 14px;
	border: 1px solid var(--lrv-line);
	border-radius: 999px;
	transition: all 0.15s ease;
}

.lrv-choices--inline .lrv-choice input:checked + span {
	border-color: var(--lrv-accent);
	background: var(--lrv-accent);
	color: var(--lrv-on-accent);
}

.lrv-choice--card {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 14px 16px;
	border: 1px solid var(--lrv-line);
	border-radius: var(--lrv-radius);
	transition: all 0.15s ease;
}

.lrv-choice--card:hover { border-color: var(--lrv-accent); background: var(--lrv-accent-soft); }

.lrv-choice--card:has(input:checked) {
	border-color: var(--lrv-accent);
	background: var(--lrv-accent-soft);
	box-shadow: 0 0 0 1px var(--lrv-accent);
}

.lrv-choice--card.is-checked {
	border-color: var(--lrv-accent);
	background: var(--lrv-accent-soft);
	box-shadow: 0 0 0 1px var(--lrv-accent);
}

.lrv-choice__key {
	flex: none;
	width: 22px;
	height: 22px;
	display: grid;
	place-items: center;
	border: 1px solid var(--lrv-line);
	border-radius: 5px;
	font-size: 11px;
	font-style: normal;
	font-weight: 700;
	color: var(--lrv-ink-soft);
	background: #fff;
}

.lrv-choice--card > span { font-size: 15px; line-height: 1.4; }
.lrv-choice--card small { display: block; margin-top: 4px; font-size: 12px; line-height: 1.5; color: var(--lrv-ink-soft); }

.lrv-check {
	display: flex;
	align-items: flex-start;
	gap: 11px;
	padding: 14px 16px;
	border: 1px solid var(--lrv-line);
	border-radius: var(--lrv-radius);
	font-size: 13.5px;
	line-height: 1.55;
	color: var(--lrv-ink-soft);
	cursor: pointer;
}

.lrv-check input { flex: none; margin-top: 2px; width: 17px; height: 17px; accent-color: var(--lrv-accent); }

/* Botones ----------------------------------------------------------- */

.lrv-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 24px;
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	border: 0;
	border-radius: var(--lrv-radius);
	cursor: pointer;
	text-decoration: none;
	transition: filter 0.15s ease, transform 0.1s ease;
}

.lrv-btn--primary { background: var(--lrv-accent); color: var(--lrv-on-accent); }
.lrv-btn--primary:hover { filter: brightness(1.08); color: var(--lrv-on-accent); }
.lrv-btn--primary:active { transform: translateY(1px); }
.lrv-btn[disabled] { opacity: 0.6; cursor: default; }

.lrv-form__nav {
	flex: none;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 26px;
	border-top: 1px solid var(--lrv-line);
	background: #fafafb;
}

.lrv-form__nav[hidden] { display: none; }

.lrv-nav-btn {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 7px 12px 7px 8px;
	font: inherit;
	font-size: 13px;
	color: var(--lrv-ink-soft);
	background: none;
	border: 1px solid transparent;
	border-radius: 7px;
	cursor: pointer;
}

.lrv-nav-btn:hover { background: #fff; border-color: var(--lrv-line); color: var(--lrv-ink); }
.lrv-nav-btn[disabled] { opacity: 0.4; cursor: default; }
.lrv-nav-btn[disabled]:hover { background: none; border-color: transparent; }

.lrv-nav-count { font-size: 12px; color: var(--lrv-ink-soft); font-variant-numeric: tabular-nums; }

.lrv-error {
	margin: 16px 0 0;
	padding: 11px 14px;
	font-size: 13.5px;
	line-height: 1.5;
	color: #8f1d1c;
	background: rgba(211, 48, 47, 0.08);
	border-radius: 8px;
}

.lrv-error[hidden] { display: none; }

/* Confirmacion ------------------------------------------------------ */

.lrv-done__icon {
	width: 56px;
	height: 56px;
	margin-bottom: 16px;
	display: grid;
	place-items: center;
	border-radius: 50%;
	background: var(--lrv-accent-soft);
	color: var(--lrv-accent);
}

.lrv-receipt {
	margin: 20px 0 0;
	padding: 4px 0;
	border-top: 1px solid var(--lrv-line);
}

.lrv-receipt > div {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	padding: 10px 0;
	border-bottom: 1px solid var(--lrv-line);
}

.lrv-receipt dt { margin: 0; font-size: 13px; color: var(--lrv-ink-soft); }
.lrv-receipt dd { margin: 0; font-size: 13.5px; font-weight: 700; text-align: right; }

.lrv-done__actions { margin: 22px 0 0; }

.lrv-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

body.lrv-modal-open { overflow: hidden; }

@media (max-width: 600px) {
	.lrv-modal { padding: 0; }
	.lrv-modal__dialog { max-width: none; max-height: 100vh; height: 100vh; border-radius: 0; }
	.lrv-steps { padding: 24px 18px 30px; }
	.lrv-form__head { padding: 18px 18px 0; }
	.lrv-progress { margin: 0 -18px -1px; }
	.lrv-form__nav { padding: 10px 18px; }
	.lrv-q__label { font-size: 18px; }
	.lrv-title { font-size: 20px; }
}
