/*
 | Formulario de peticiones, quejas, sugerencias y reclamaciones
 | (/{idioma}/aviso-legal-formulario y su acuse).
 |
 | Hoja propia de estas dos páginas: complementa a output.css (Tailwind) con lo
 | que el formulario necesita y no existe allí. Todo va bajo el prefijo .rcl.
 | Se enlaza solo desde resources/views/front/reclamaciones/*.blade.php.
 */

/* Antes de que arranque Alpine solo se ve el paso inicial (sin JavaScript se ven los tres). */
.rcl-js [data-rcl-oculto] {
    display: none;
}

.rcl-ancla {
    scroll-margin-top: 7rem;
}

/* --- Indicador de progreso (barra + «1/3») ------------------------------- */
.rcl-progreso {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.rcl-progreso-barra {
    flex: 1 1 auto;
    height: 0.375rem;
    border-radius: 9999px;
    background: #ffffff;
    overflow: hidden;
}

.rcl-progreso-relleno {
    display: block;
    height: 100%;
    border-radius: 9999px;
    background: #18A0FB;
    transition: width 0.3s ease;
}

.rcl-progreso-numero {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: baseline;
    gap: 0.25rem;
    font-size: 0.875rem;
    line-height: 1.75rem;
    color: #282828;
    font-variant-numeric: tabular-nums;
}

.rcl-progreso-numero b {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.75rem;
    height: 1.75rem;
    border-radius: 9999px;
    background: #18A0FB;
    color: #ffffff;
    font-weight: 500;
}

.rcl-pasos {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.5rem;
    margin: 0.75rem 0 0;
    padding: 0;
    list-style: none;
    font-size: 0.875rem;
    line-height: 1.5rem;
    color: #52525b;
    text-align: left;
}

.rcl-pasos [aria-current="step"] {
    color: #282828;
    font-weight: 500;
}

/* --- Pasos y campos ------------------------------------------------------- */
.rcl-paso {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    text-align: left;
}

.rcl-paso[hidden] {
    display: none;
}

.rcl-paso-titulo {
    margin: 0;
    font-size: 1.5rem;
    line-height: 2.125rem;
    color: #282828;
}

.rcl-paso-titulo:focus {
    outline: none;
}

.rcl-paso-titulo:focus-visible {
    outline: 2px solid #18A0FB;
    outline-offset: 4px;
    border-radius: 0.25rem;
}

.rcl-nota {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.5rem;
    color: #3f3f46;
}

.rcl-campo {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    min-width: 0;
}

.rcl-fila {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .rcl-fila {
        flex-direction: row;
        gap: 2rem;
    }

    .rcl-fila > .rcl-campo-corto {
        flex: 0 0 14rem;
        width: 14rem;
    }
}

/* Las etiquetas del formulario de contacto son zinc-500; aquí un tono más para llegar a contraste AA sobre el azul. */
.contenedor-formulario form.rcl-form label {
    color: #3f3f46;
}

.rcl-form select,
.rcl-form textarea {
    width: 100%;
    padding: 1rem;
    border-radius: 1rem;
    font-size: 1.125rem;
    line-height: 1.75rem;
    color: #282828;
    background-color: #ffffff;
}

.rcl-form select {
    padding-right: 2.75rem;
}

.rcl-form textarea {
    min-height: 12rem;
    resize: vertical;
}

.rcl-form textarea::placeholder {
    color: #71717a;
}

.rcl-form input[type="file"] {
    font-size: 1rem;
    line-height: 1.5rem;
    background-color: #ffffff;
    border: 1px solid #6b7280;
    max-width: 100%;
}

.rcl-form input[type="file"]::file-selector-button {
    margin-right: 1rem;
    padding: 0.5rem 1rem;
    border: 1px solid #18A0FB;
    border-radius: 9999px;
    background: #ffffff;
    color: #18A0FB;
    font: inherit;
    cursor: pointer;
}

.rcl-form [aria-invalid="true"] {
    border-color: #b91c1c;
    box-shadow: 0 0 0 1px #b91c1c;
}

.rcl-contador {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.25rem;
    color: #3f3f46;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* Casilla de privacidad: mismo marcado que el formulario de contacto. */
.contenedor-formulario form.rcl-form .rcl-privacidad input[type="checkbox"] {
    width: 1.5rem;
    padding: 0;
    flex: 0 0 auto;
}

.rcl-privacidad .texto-legal {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

/* --- Errores ---------------------------------------------------------------- */
.rcl-form .alerta-formulario {
    margin-top: 0;
    background-color: #fef2f2;
    text-align: left;
}

.rcl-form .alerta-formulario .texto-alerta {
    font-size: 0.875rem;
    line-height: 1.25rem;
    font-weight: 500;
    color: #991b1b;
}

.rcl-aviso {
    margin: 0;
    padding: 1rem;
    border-radius: 1rem;
    background: #FCF6E6;
    border: 1px solid #EED484;
    color: #282828;
    font-size: 0.875rem;
    line-height: 1.375rem;
    text-align: left;
}

/* --- Adjuntos ---------------------------------------------------------------- */
.rcl-ficheros {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rcl-ficheros li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 0.75rem;
    background: #ffffff;
    font-size: 0.9375rem;
    line-height: 1.5rem;
}

.rcl-ficheros li span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.rcl-ficheros small {
    color: #52525b;
    white-space: nowrap;
}

.rcl-quitar {
    flex: 0 0 auto;
    padding: 0.25rem 0.75rem;
    border: 1px solid #18A0FB;
    border-radius: 9999px;
    background: #ffffff;
    color: #0b6fb8;
    font-size: 0.8125rem;
    line-height: 1.25rem;
    cursor: pointer;
}

.rcl-quitar:hover {
    background: #18A0FB;
    color: #ffffff;
}

/* --- Botones ---------------------------------------------------------------- */
.rcl-botones {
    display: flex;
    flex-direction: column-reverse;
    gap: 1rem;
    margin-top: 1rem;
}

.rcl-botones .boton-azul-1 {
    margin-top: 0;
}

.rcl-botones button[disabled] {
    opacity: 0.6;
    cursor: wait;
}

@media (min-width: 768px) {
    .rcl-botones {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .rcl-botones-fin {
        justify-content: flex-end;
    }

    .rcl-botones .boton-azul-2 {
        width: fit-content;
    }
}

/* --- Resumen (paso 3) y acuse ------------------------------------------------ */
.rcl-resumen {
    padding: 1.5rem;
    border-radius: 1rem;
    background: #ffffff;
    text-align: left;
}

.rcl-resumen h3 {
    margin: 0 0 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #D4D4D4;
    font-size: 1.125rem;
    line-height: 1.75rem;
    font-weight: 500;
    color: #282828;
}

.rcl-datos {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem 2rem;
    margin: 0;
}

@media (min-width: 640px) {
    .rcl-datos {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .rcl-datos .rcl-dato-ancho {
        grid-column: 1 / -1;
    }
}

.rcl-datos > div {
    min-width: 0;
}

.rcl-datos dt {
    font-size: 0.75rem;
    line-height: 1.25rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #52525b;
}

.rcl-datos dd {
    margin: 0;
    font-size: 1.0625rem;
    line-height: 1.625rem;
    color: #282828;
    overflow-wrap: anywhere;
}

.rcl-datos dd.rcl-multilinea {
    white-space: pre-line;
}

.rcl-datos dd ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.rcl-acuse {
    max-width: 44rem;
    margin: 0 auto;
    text-align: center;
}

.rcl-acuse-icono {
    width: 5.5rem;
    height: 5.5rem;
    margin: 0 auto 1.5rem;
    color: #18A0FB;
}

.rcl-acuse .rcl-resumen {
    margin-top: 2rem;
}

.rcl-codigo {
    display: block;
    margin-top: 0.25rem;
    font-size: 1.75rem;
    line-height: 2.25rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: #282828;
    overflow-wrap: anywhere;
}

.rcl-acuse-botones {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 2.5rem;
}

.rcl-acuse-botones .boton-azul-1 {
    margin-top: 0;
}

@media (min-width: 768px) {
    .rcl-acuse-botones {
        flex-direction: row;
        justify-content: center;
    }

    .rcl-acuse-botones .boton-azul-2 {
        width: fit-content;
    }
}

/* Comprobante impreso: solo el acuse. */
@media print {
    body > header,
    body > footer,
    body > div.sticky,
    #cookie-consent-float,
    #cookie-consent-overlay,
    .rcl-no-imprimir {
        display: none !important;
    }

    .rcl-acuse {
        padding-top: 0 !important;
    }

    .rcl-resumen {
        border: 1px solid #D4D4D4;
    }
}
