/* ==========================================================================
   Reembolsos de servicios básicos (CF7 #11926)
   Wizard de 3 pasos en la pestaña "Reembolso" de /post-venta-galilea-sa/.
   Basado en la propuesta B2 del diseñador (galilea-reembolso/index.html).
   Los breakpoints son container queries sobre el ancho real del wizard, porque
   la pestaña de Elementor es más angosta que el layout original del diseño.
   ========================================================================== */

.rb-section,
.rb {
	--rb-red: #cf2730;
	--rb-red-dark: #a91d25;
	--rb-ink: #242323;
	--rb-muted: #686565;
	--rb-line: #dedbd8;
	--rb-canvas: #f4f2ef;
	--rb-paper: #fff;
	--rb-soft: #f7f5f3;
	--rb-soft-red: #fff5f5;
	--rb-soft-green: #eef7f1;
	--rb-green: #236b45;
	--rb-rail: #302e2d;
	--rb-shadow: 0 18px 50px rgba(39, 31, 28, .09);
	--rb-focus: 0 0 0 3px rgba(207, 39, 48, .42);
	font-family: Lato, Arial, sans-serif;
	font-size: 16px;
	line-height: 1.55;
	color: var(--rb-ink);
}

/* Reset de estilos heredados del tema y de los <style> de las otras pestañas. */
.rb-section *,
.rb-section *::before,
.rb-section *::after {
	box-sizing: border-box;
	letter-spacing: normal;
}

.rb [hidden] {
	display: none !important;
}

.rb p,
.rb ul,
.rb ol {
	margin: 0;
	line-height: 1.55;
}

.rb h3,
.rb h4 {
	margin: 0;
	font-family: inherit;
	font-weight: 700;
	text-transform: none;
	color: var(--rb-ink);
}

.rb strong {
	font-weight: 800;
}

.rb button {
	font: inherit;
	cursor: pointer;
}

.rb :focus-visible {
	outline: 3px solid rgba(207, 39, 48, .42);
	outline-offset: 3px;
}

.rb-section .wpcf7 form {
	margin: 0;
	padding: 0;
	border-radius: 0;
	background: none;
}

/* Contenedor de la pestaña ---------------------------------------------- */
.rb-section {
	padding: 48px 24px 64px;
	background: var(--rb-canvas);
}

.rb-section .rb-intro {
	margin-bottom: 28px;
}

.rb-section .rb-intro h2 {
	margin: 0 0 9px;
	font-size: clamp(29px, 4vw, 42px);
	font-weight: 700;
	line-height: 1.12;
	letter-spacing: -.025em;
	text-align: left;
	text-transform: none;
	color: var(--rb-ink);
}

.rb-section .rb-intro p {
	margin: 0;
	font-size: 17px;
	line-height: 1.55;
	color: var(--rb-muted);
}

.rb-section .rb-intro p strong {
	color: var(--rb-ink);
}

.rb {
	container: rb / inline-size;
}

/* Progreso compacto (sólo mobile) ---------------------------------------- */
.rb-progress {
	display: none;
	margin-bottom: 22px;
	font-weight: 700;
	color: var(--rb-muted);
}

.rb-progress strong {
	color: var(--rb-ink);
}

.rb-progress__line {
	height: 4px;
	margin-top: 9px;
	overflow: hidden;
	border-radius: 4px;
	background: #e6e2df;
}

.rb-progress__line span {
	display: block;
	width: 33.333%;
	height: 100%;
	background: var(--rb-red);
	transition: width .25s;
}

/* Tarjeta ---------------------------------------------------------------- */
.rb-journey {
	display: grid;
	grid-template-columns: 285px minmax(0, 1fr);
	min-height: 650px;
	background: var(--rb-paper);
	box-shadow: var(--rb-shadow);
	text-align: left;
}

/* Rail ------------------------------------------------------------------- */
.rb-rail {
	display: flex;
	flex-direction: column;
	padding: 36px 28px;
	background: var(--rb-rail);
	color: #fff;
}

.rb .rb-rail__title {
	margin: 0 0 24px;
	font-size: 13px;
	font-weight: 800;
	letter-spacing: .09em;
	text-transform: uppercase;
	color: #ccc7c4;
}

.rb-steps {
	padding: 0;
	list-style: none;
}

.rb-step {
	position: relative;
	margin: 0;
	padding-bottom: 30px;
}

.rb-step:not(:last-child)::after {
	content: '';
	position: absolute;
	top: 38px;
	bottom: 2px;
	left: 17px;
	width: 1px;
	background: #5a5654;
}

.rb .rb-step__btn {
	display: grid;
	grid-template-columns: 36px 1fr;
	gap: 14px;
	width: 100%;
	min-width: 0;
	height: auto;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.55;
	text-align: left;
	text-transform: none;
	color: #bdb8b5;
}

.rb .rb-step__btn:disabled {
	opacity: .72;
	cursor: default;
}

.rb-step__num {
	position: relative;
	z-index: 1;
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border: 1px solid #6c6764;
	border-radius: 50%;
	background: var(--rb-rail);
	font-size: 13px;
	font-weight: 900;
	color: #fff;
}

.rb-step__name {
	display: block;
	padding-top: 1px;
	font-weight: 800;
	color: #fff;
}

.rb-step__note {
	display: block;
	margin-top: 2px;
	font-size: 13px;
}

.rb-step[data-state="active"] .rb-step__num {
	border-color: var(--rb-red);
	background: var(--rb-red);
}

.rb-step[data-state="complete"] .rb-step__num {
	border-color: #fff;
	background: #fff;
	color: var(--rb-rail);
}

.rb-step[data-state="complete"] .rb-step__btn:hover .rb-step__name {
	text-decoration: underline;
}

.rb-rail__help {
	margin-top: auto;
	padding-top: 24px;
	border-top: 1px solid #55514f;
	font-size: 14px;
	color: #d3cecb;
}

.rb-rail__help strong {
	display: block;
	margin-bottom: 4px;
	font-size: 15px;
	color: #fff;
}

/* Área del formulario ---------------------------------------------------- */
.rb-area {
	min-width: 0;
	padding: 44px 52px 46px;
}

.rb-head {
	display: flex;
	justify-content: space-between;
	gap: 28px;
	margin-bottom: 30px;
	padding-bottom: 26px;
	border-bottom: 1px solid var(--rb-line);
}

.rb .rb-head h3 {
	margin: 0 0 8px;
	font-size: 28px;
	line-height: 1.2;
	letter-spacing: -.018em;
}

.rb .rb-head h3:focus {
	outline: none;
}

.rb-head p {
	max-width: 590px;
	color: var(--rb-muted);
}

.rb-head__count {
	padding-top: 7px;
	font-size: 13px;
	font-weight: 900;
	letter-spacing: .07em;
	text-transform: uppercase;
	white-space: nowrap;
	color: var(--rb-red);
}

/* Campos ----------------------------------------------------------------- */
.rb-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 22px 24px;
}

.rb-field {
	min-width: 0;
	/* Espacio reservado para el mensaje de error, como en el diseño. */
	padding-bottom: 24px;
}

.rb-field--full {
	grid-column: 1 / -1;
}

.rb .rb-field label {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	margin: 0 0 8px;
	font-size: 16px;
	font-weight: 800;
	line-height: 1.55;
	text-transform: none;
	color: var(--rb-ink);
}

.rb .wpcf7-form-control-wrap {
	position: relative;
	display: block;
}

.rb input[type="text"],
.rb input[type="email"],
.rb input[type="tel"],
.rb input[type="rut"],
.rb select {
	display: block;
	width: 100%;
	height: 50px;
	margin: 0;
	padding: 0 14px;
	border: 1px solid #c9c5c2;
	border-radius: 7px;
	background-color: #fff;
	box-shadow: none;
	font-family: inherit;
	font-size: 16px;
	line-height: 48px;
	color: var(--rb-ink);
	transition: border-color .15s, background-color .15s;
}

.rb select {
	padding-right: 40px;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23242323' stroke-width='1.5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 15px center;
	cursor: pointer;
}

.rb select:disabled {
	background-color: var(--rb-soft);
	color: #999491;
	cursor: not-allowed;
}

.rb input::placeholder {
	color: #999491;
	opacity: 1;
}

.rb input:hover,
.rb select:not(:disabled):hover {
	border-color: #8d8885;
}

.rb input:focus,
.rb select:focus {
	border-color: var(--rb-red);
	outline: 2px solid rgba(207, 39, 48, .22);
	outline-offset: 0;
}

.rb .wpcf7-not-valid,
.rb input[aria-invalid="true"],
.rb select[aria-invalid="true"] {
	border-color: var(--rb-red);
	background-color: var(--rb-soft-red);
}

.rb .wpcf7-not-valid-tip {
	position: absolute;
	top: calc(100% + 5px);
	left: 0;
	right: 0;
	margin: 0;
	font-size: 13px;
	font-weight: 400;
	line-height: 1.45;
	color: var(--rb-red-dark);
}

/* Notas ------------------------------------------------------------------ */
.rb-note,
.rb-sensitive {
	display: flex;
	gap: 14px;
	margin-top: 28px;
	padding: 18px 20px;
	border-radius: 8px;
	background: var(--rb-soft);
	color: #514e4c;
}

.rb-note strong,
.rb-sensitive strong {
	display: block;
	margin-bottom: 2px;
	color: var(--rb-ink);
}

.rb-sensitive {
	margin-top: 22px;
	padding: 19px 20px;
	background: var(--rb-soft-red);
	color: var(--rb-ink);
}

/* Botones ---------------------------------------------------------------- */
.rb-actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-top: 34px;
	padding-top: 26px;
	border-top: 1px solid var(--rb-line);
}

.rb-actions--end {
	justify-content: flex-end;
}

/* CF7 agrega un spinner junto al submit: se saca del flujo para no romper el layout. */
.rb-actions {
	position: relative;
}

.rb .rb-actions .wpcf7-spinner {
	position: absolute;
	top: calc(100% + 10px);
	right: 0;
	margin: 0;
}

.rb-section .rb .rb-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	min-width: 0;
	height: auto;
	min-height: 48px;
	margin: 0;
	padding: 0 22px;
	border: 1px solid transparent;
	border-radius: 6px;
	box-shadow: none;
	font-family: inherit;
	font-size: 16px;
	font-weight: 900;
	line-height: 1.2;
	letter-spacing: normal;
	text-transform: none;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color .15s, border-color .15s;
}

.rb-section .rb .rb-button--primary {
	min-width: 190px;
	border-color: var(--rb-red);
	background-color: var(--rb-red);
	color: #fff;
}

.rb-section .rb .rb-button--primary:hover {
	border-color: var(--rb-red-dark);
	background-color: var(--rb-red-dark);
	color: #fff;
}

.rb-section .rb .rb-button--secondary {
	border-color: #aaa5a1;
	background-color: #fff;
	color: var(--rb-ink);
}

.rb-section .rb .rb-button--secondary:hover {
	background-color: #f5f3f1;
	color: var(--rb-ink);
}

/* El submit es un <input>: el ícono va como fondo. */
.rb-section .rb input.rb-button--submit {
	padding-right: 52px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24'%3E%3Cpath d='m5 12 4 4 10-10' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 22px center;
}

.rb-section .rb input.rb-button--submit:disabled {
	opacity: .65;
	cursor: wait;
}

.rb-icon--chevron {
	width: 18px;
	height: 18px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24'%3E%3Cpath d='m9 18 6-6-6-6' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
}

.rb .wpcf7-spinner {
	margin: 0 0 0 4px;
}

/* Documentos ------------------------------------------------------------- */
.rb-uploads {
	display: grid;
	gap: 14px;
}

.rb-upload {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: center;
	gap: 22px;
	padding: 18px 20px;
	border: 1px solid var(--rb-line);
	border-radius: 8px;
	transition: border-color .2s, background-color .2s;
}

.rb-upload.is-dragging {
	border-color: var(--rb-red);
	background: var(--rb-soft-red);
}

.rb-upload.has-file {
	border-color: #8cb39b;
	background: var(--rb-soft-green);
}

.rb-upload.is-invalid {
	border-color: var(--rb-red);
}

.rb-upload__title {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	min-width: 0;
}

.rb-upload__title > div {
	min-width: 0;
}

.rb-upload__icon {
	flex: 0 0 auto;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: #f2eeeb url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='19' height='19' viewBox='0 0 24 24'%3E%3Cpath d='M12 16V4m0 0L7 9m5-5 5 5M5 15v4h14v-4' fill='none' stroke='%23cf2730' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center;
}

.rb-upload.has-file .rb-upload__icon {
	background: #dcecdf url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='19' height='19' viewBox='0 0 24 24'%3E%3Cpath d='m5 12 4 4 10-10' fill='none' stroke='%23236b45' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center;
}

.rb-upload__title strong {
	display: block;
}

.rb-upload__title small {
	display: block;
	font-size: 13px;
	color: var(--rb-muted);
}

.rb-upload__result {
	margin-top: 5px;
	font-size: 13px;
	font-weight: 700;
	overflow-wrap: anywhere;
	color: var(--rb-green);
}

/* Error del archivo: en el flujo, bajo la descripción. */
.rb-upload .wpcf7-form-control-wrap {
	position: static;
}

.rb-upload .wpcf7-not-valid-tip {
	position: static;
	margin-top: 5px;
}

.rb-upload input[type="file"] {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	border: 0;
	white-space: nowrap;
}

.rb-upload__control {
	display: flex;
	align-items: center;
	gap: 10px;
}

.rb .rb-upload__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	margin: 0;
	padding: 0 15px;
	border: 1px solid #aaa5a1;
	border-radius: 6px;
	background: #fff;
	font-size: 16px;
	font-weight: 800;
	white-space: nowrap;
	color: var(--rb-ink);
	cursor: pointer;
}

.rb .rb-upload__button:hover {
	border-color: var(--rb-red);
	color: var(--rb-red);
}

.rb-upload:has(input[type="file"]:focus-visible) .rb-upload__button {
	box-shadow: var(--rb-focus);
}

.rb .rb-upload__remove {
	min-width: 0;
	height: auto;
	margin: 0;
	padding: 8px;
	border: 0;
	background: none;
	box-shadow: none;
	font-size: 16px;
	font-weight: 800;
	text-transform: none;
	color: var(--rb-red-dark);
}

.rb-requirements {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 12px;
	margin-top: 22px;
}

.rb-requirement {
	padding: 16px;
	border-radius: 7px;
	background: var(--rb-soft);
	font-size: 14px;
	color: var(--rb-muted);
}

.rb-requirement strong {
	display: block;
	margin-bottom: 3px;
	font-size: 15px;
	color: var(--rb-ink);
}

.rb-guide {
	margin-top: 22px;
	padding: 22px 24px;
	border: 1px solid #efcecf;
	border-radius: 8px;
	background: var(--rb-soft-red);
}

.rb .rb-guide h4 {
	margin: 0 0 13px;
	font-size: 18px;
}

.rb-guide ul {
	display: grid;
	gap: 8px;
	padding: 0;
	list-style: none;
}

.rb-guide li {
	position: relative;
	margin: 0;
	padding-left: 24px;
	color: #514e4c;
}

.rb-guide li::before {
	content: '✓';
	position: absolute;
	left: 0;
	font-weight: 900;
	color: var(--rb-red);
}

.rb .rb-guide p {
	margin: 16px 0 0;
	padding-top: 15px;
	border-top: 1px solid #e7bfc1;
	color: #514e4c;
}

/* Datos bancarios -------------------------------------------------------- */
.rb-bank {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 250px;
	gap: 30px;
}

.rb-tip {
	align-self: start;
	padding: 24px;
	border-radius: 8px;
	background: var(--rb-rail);
	color: #e9e5e2;
}

.rb .rb-tip h4 {
	margin: 0 0 12px;
	font-size: 18px;
	color: #fff;
}

.rb-tip p {
	font-size: 14px;
}

.rb-tip strong {
	color: #fff;
}

.rb-review {
	margin-top: 4px;
	padding-top: 28px;
	border-top: 1px solid var(--rb-line);
}

.rb .rb-review h4 {
	margin: 0 0 15px;
	font-size: 20px;
}

.rb-review__list {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	overflow: hidden;
	border: 1px solid var(--rb-line);
	border-radius: 8px;
}

.rb-review__item {
	min-width: 0;
	padding: 17px 18px;
}

.rb-review__item:not(:last-child) {
	border-right: 1px solid var(--rb-line);
}

.rb-review__item span {
	display: block;
	margin-bottom: 3px;
	font-size: 13px;
	color: var(--rb-muted);
}

.rb-review__item strong {
	display: block;
	overflow-wrap: anywhere;
}

.rb-captcha {
	margin-top: 22px;
}

/* Confirmación ----------------------------------------------------------- */
.rb-success {
	padding: 30px;
	border: 1px solid #9fc3ac;
	border-radius: 8px;
	background: var(--rb-soft-green);
	text-align: center;
}

.rb-success__icon {
	display: block;
	width: 52px;
	height: 52px;
	margin: 0 auto 15px;
	border-radius: 50%;
	background: var(--rb-green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='27' height='27' viewBox='0 0 24 24'%3E%3Cpath d='m5 12 4 4 10-10' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center;
}

.rb .rb-success h4 {
	margin: 0 0 7px;
	font-size: 22px;
}

.rb .rb-success h4:focus {
	outline: none;
}

.rb-success p {
	color: #3d614c;
}

/* Respuesta de CF7: el wizard muestra sus propios estados; sólo se ven los errores de envío. */
.rb-section .wpcf7 form .wpcf7-response-output {
	margin: 16px 0 0;
	padding: 14px 18px;
	border: 1px solid var(--rb-red);
	border-radius: 8px;
	background: var(--rb-soft-red);
	font-size: 15px;
	color: var(--rb-ink);
}

.rb-section .wpcf7 form .wpcf7-response-output:empty,
.rb-section .wpcf7 form.init .wpcf7-response-output,
.rb-section .wpcf7 form.sent .wpcf7-response-output,
.rb-section .wpcf7 form.invalid .wpcf7-response-output,
.rb-section .wpcf7 form.resetting .wpcf7-response-output,
.rb-section .wpcf7 form.submitting .wpcf7-response-output {
	display: none;
}

/* Tarjeta mediana (la pestaña en desktop mide ~930px) ---------------------- */
@container rb (max-width: 1040px) {
	.rb-journey {
		grid-template-columns: 240px minmax(0, 1fr);
	}

	.rb-rail {
		padding: 32px 22px;
	}

	.rb-area {
		padding: 40px 40px 42px;
	}

	.rb-bank {
		grid-template-columns: 1fr;
		gap: 24px;
	}

	.rb-tip {
		order: -1;
	}
}

/* Equivale al breakpoint de 900px del diseño --------------------------------- */
@container rb (max-width: 860px) {
	.rb-journey {
		grid-template-columns: 225px minmax(0, 1fr);
	}

	.rb-rail {
		padding: 30px 20px;
	}

	.rb-area {
		padding: 36px 30px;
	}

	.rb-requirements,
	.rb-review__list {
		grid-template-columns: 1fr;
	}

	.rb-review__item:not(:last-child) {
		border-right: 0;
		border-bottom: 1px solid var(--rb-line);
	}
}

/* Equivale al breakpoint de 680px del diseño --------------------------------- */
@container rb (max-width: 660px) {
	.rb-progress {
		display: block;
	}

	.rb-journey {
		display: block;
		min-height: 0;
	}

	.rb-rail,
	.rb-head__count {
		display: none;
	}

	.rb-area {
		padding: 28px 20px 24px;
	}

	.rb-head {
		display: block;
		margin-bottom: 24px;
	}

	.rb .rb-head h3 {
		font-size: 25px;
	}

	.rb-grid {
		grid-template-columns: 1fr;
		gap: 16px;
	}

	.rb-field--full {
		grid-column: auto;
	}

	.rb-actions {
		flex-direction: column-reverse;
		align-items: stretch;
	}

	.rb-section .rb .rb-button {
		width: 100%;
	}

	.rb-upload {
		grid-template-columns: 1fr;
		padding: 16px;
	}

	.rb-upload__control {
		flex-wrap: wrap;
		padding-left: 52px;
	}

	.rb .rb-upload__button {
		flex: 1;
	}

	.rb-captcha .g-recaptcha {
		transform: scale(.9);
		transform-origin: left top;
	}
}

@media (max-width: 767px) {
	.rb-section {
		padding: 32px 0 48px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.rb * {
		transition: none !important;
	}
}
