/* SAM Gen5 · configurador en la página, formularios y diálogo de cuenta.
   Usa las variables del tema si existen; si no, valores Barbosa. */

.sam-configurador { position: relative; background: #231F20; }
.sam-configurador__marco {
	display: block; width: 100%; border: 0;
	/* un alto de pantalla menos la cabecera (LEEME de Josep v0.5, punto 3) */
	height: calc(100svh - var(--barra, 58px)); min-height: 560px;
}

/* Formularios */
.sam-form { display: grid; gap: 1rem; }
.sam-form[hidden], .sam-exito[hidden], .sam-dialogo__intro[hidden] { display: none !important; }
.sam-form__fila { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; }
.sam-form p { margin: 0; }
.sam-campo { display: grid; gap: .35rem; }
.sam-campo label { font-weight: 600; font-size: .9375rem; }
.sam-campo input, .sam-campo textarea {
	font: inherit; color: inherit; width: 100%; box-sizing: border-box;
	padding: .8rem .9rem; min-height: 48px;
	background: #fff; border: 1px solid #8C959C; border-radius: 2px;
}
.sam-campo input:focus, .sam-campo textarea:focus { border-color: #231F20; outline: 3px solid #F2C230; outline-offset: 1px; }
.sam-casilla { display: grid; grid-template-columns: 1.4rem 1fr; gap: .6rem; align-items: start; }
.sam-casilla input { width: 1.2rem; height: 1.2rem; margin: .2rem 0 0; accent-color: #9E0B10; }
.sam-form__acciones button { cursor: pointer; border: 0; min-height: 48px; }
.sam-form__acciones button[disabled] { opacity: .6; cursor: progress; }
.sam-form__aviso { min-height: 1.5em; font-weight: 500; }
.sam-form__aviso.es-error { color: #9E0B10; }
.sam-form__enlaces { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; }
.sam-enlace { background: none; border: 0; padding: .25rem 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }
.sam-enlace:hover { color: #9E0B10; }

/* Diálogo de cuenta */
.sam-dialogo {
	width: min(30rem, calc(100vw - 2rem)); max-height: calc(100svh - 2rem); overflow: auto;
	padding: 2rem; border: 0; border-top: 6px solid #9E0B10; border-radius: 2px;
	background: #fff; color: #1B1E21; box-shadow: 0 24px 64px rgba(0,0,0,.35);
}
.sam-dialogo::backdrop { background: rgba(35,31,32,.6); }
.sam-dialogo h2 { margin: 0 0 .5rem; font-size: 1.75rem; }
.sam-dialogo__intro { margin: 0 0 1.25rem; color: #5b6168; font-size: .9375rem; line-height: 1.45; }
.sam-req { color: #9E0B10; font-weight: 700; }
.sam-form__nota { font-size: .8125rem; color: #5b6168; }
.sam-form__otras { margin-top: .5rem; padding-top: 1.1rem; border-top: 1px solid #dfe2e5; display: grid; gap: .4rem; font-size: .9375rem; }
.sam-form__otras p { margin: 0; }
.sam-form__otras span { color: #5b6168; }
.sam-form__otras .sam-enlace { font-weight: 600; color: #9E0B10; }
.sam-exito { text-align: center; }
.sam-exito p { margin: 0 0 1rem; }
.sam-exito__icono { width: 56px; height: 56px; margin: .25rem auto 1rem !important; border-radius: 50%; background: #e8f5ec; color: #1c7a3e; font-size: 30px; line-height: 56px; font-weight: 700; }
.sam-dialogo__cerrar {
	position: absolute; top: .75rem; right: .75rem; width: 44px; height: 44px;
	background: none; border: 0; font-size: 1.75rem; line-height: 1; cursor: pointer; color: inherit;
}
.sam-dialogo .sam-form__aviso { margin: 1rem 0 0; }
