/*
 * Cromo del wizard de AgencySurvey (MDX + NTIC).
 *
 * NO va en un .razor.css: el aislamiento de CSS de Blazor no cruza componentes, así que las
 * reglas se perderían en cuanto el markup viviera en el envoltorio de la marca en vez de en el
 * componente compartido. Con el honeypot del login eso dejó el campo trampa VISIBLE en
 * pantalla; aquí pasaría lo mismo con .agency-survey-honeypot.
 */

.agency-survey {
    max-width: 62rem;
    margin: 0 auto;
    padding: 1.5rem 1rem 3rem;
}

/*
 * Página pública standalone (/AgencySurvey/Appointment, /AgencySurvey/GeneralInformation):
 * lienzo de fondo + la tarjeta blanca centrada. Van en un wrapper aparte —no en `.agency-survey`
 * mismo— porque ese formulario compartido TAMBIÉN vive embebido en la home de MDX
 * (AppointmentSection), dentro de su propia sección con fondo e imagen; si el fondo/sombra de
 * la tarjeta viviera en `.agency-survey`, ahí saldría una tarjeta dentro de otra tarjeta.
 *
 * `padding-top` deja espacio al header fijo de 100px (IndexLayout: #header-main).
 */
.agency-survey-page {
    min-height: calc(100vh - 100px);
    padding: 132px 1rem 4rem;
    background-color: #f3f5f8;
    display: flex;
    justify-content: center;
}

.agency-survey-panel {
    width: 100%;
    max-width: 42rem;
    background-color: #fff;
    border-radius: 0.75rem;
    border-top: 4px solid var(--brand-primary, #033159);
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 12px 32px -8px rgba(16, 24, 40, 0.12);
    padding: 2.25rem 2.5rem 2.5rem;
}

/* GeneralInformation trae bastantes más secciones (financiero, dueños, mercados,
   referencias): con el mismo ancho que "License and State" el formulario de dos columnas se
   siente apretado. */
.agency-survey-panel-wide {
    max-width: 56rem;
}

@media (max-width: 640px) {
    .agency-survey-page {
        padding: 116px 0.75rem 3rem;
    }

    .agency-survey-panel {
        padding: 1.75rem 1.25rem 2rem;
        border-radius: 0.5rem;
    }
}

.agency-survey-title {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #101828;
    margin-bottom: 0.35rem;
    text-align: center;
}

.agency-survey-subtitle {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #6b7280;
    margin: 1.75rem 0 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid rgba(16, 24, 40, 0.08);
}

.agency-survey-fieldset {
    border: 0;
    margin: 0;
    padding: 0;
    min-width: 0;
}

.agency-survey-fieldset[disabled] {
    opacity: 0.6;
}

.agency-survey-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
    gap: 0.85rem 1rem;
}

.agency-survey-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-bottom: 0.6rem;
}

.agency-survey-field-wide {
    grid-column: 1 / -1;
}

.agency-survey-field label {
    font-size: 0.83rem;
    font-weight: 600;
    color: #344054;
}

.agency-survey-field input,
.agency-survey-field select,
.agency-survey-input {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 1px solid #d0d5dd;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    color: #101828;
    background-color: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.agency-survey-field input:focus,
.agency-survey-field select:focus,
.agency-survey-input:focus {
    outline: none;
    border-color: var(--brand-primary, #033159);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-primary, #033159) 18%, transparent);
}

.agency-survey-field input::placeholder {
    color: #98a2b3;
}

.agency-survey-field input[type="checkbox"] {
    width: auto;
    margin-right: 0.4rem;
}

.agency-survey-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
    margin-top: 1.75rem;
}

.agency-survey-btn,
.agency-survey-btn-secondary {
    display: inline-block;
    padding: 0.65rem 1.5rem;
    border: 0;
    border-radius: 0.5rem;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: filter 0.15s ease, box-shadow 0.15s ease;
}

.agency-survey-btn {
    /* Color de marca. El valor de reserva es el azul de NAI, que comparten MDX, APX, RPL y
       CYGNUM; NTIC define --brand-primary en su brand.css y este botón lo toma. */
    background-color: var(--brand-primary, #033159);
    color: var(--brand-primary-contrast, #fff);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.agency-survey-btn-secondary {
    background-color: #e9ecef;
    color: var(--brand-primary, #033159);
}

.agency-survey-btn:hover:not([disabled]),
.agency-survey-btn-secondary:hover:not([disabled]) {
    filter: brightness(0.92);
}

.agency-survey-btn:focus-visible,
.agency-survey-btn-secondary:focus-visible {
    outline: 2px solid var(--brand-primary, #033159);
    outline-offset: 2px;
}

.agency-survey-btn[disabled],
.agency-survey-btn-secondary[disabled] {
    cursor: not-allowed;
    opacity: 0.65;
}

.agency-survey-spinner {
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: agency-survey-spin 0.7s linear infinite;
}

@keyframes agency-survey-spin {
    to { transform: rotate(360deg); }
}

.agency-survey-alert {
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    border-radius: 0.5rem;
    border: 1px solid #fecdca;
    background-color: #fef3f2;
    color: #b42318;
    font-size: 0.88rem;
    line-height: 1.4;
}

.agency-survey-alert-success {
    border-color: #abefc6;
    background-color: #ecfdf3;
    color: #067647;
}

.agency-survey-empty {
    font-size: 0.9rem;
    opacity: 0.75;
    margin: 0.35rem 0;
}

/* ---------- filas del borrador ---------- */

.agency-survey-rows {
    list-style: none;
    margin: 0 0 0.75rem;
    padding: 0;
}

.agency-survey-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.45rem 0.6rem;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 0.25rem;
    margin-bottom: 0.35rem;
    font-size: 0.9rem;
}

.agency-survey-row-remove {
    border: 0;
    background: transparent;
    color: #b02a37;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.agency-survey-inline-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.agency-survey-inline-form .agency-survey-input {
    flex: 1 1 11rem;
    width: auto;
}

/* ---------- tabla de licencias ---------- */

.agency-survey-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.agency-survey-table th,
.agency-survey-table td {
    padding: 0.45rem 0.6rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
    text-align: left;
}

.agency-survey-table th {
    font-weight: 600;
    background-color: var(--brand-primary-soft, rgba(3, 49, 89, 0.06));
}

/* ---------- trampa anti-bot ----------
 * Fuera de pantalla en vez de display:none: algunos bots omiten los campos ocultos con
 * display, y entonces la trampa no atrapa nada. Un humano tampoco puede enfocarlo por
 * tabindex="-1".
 */
.agency-survey-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
