/* =========================
   LIBRO DE RECLAMACIONES (formulario)
========================= */

.complaints-form {
    max-width: 860px;
    margin: 0 auto;
}

/* ----- Tarjeta por sección ----- */
.form-card {
    background: var(--white);
    border: 1px solid var(--black-50);
    border-radius: 20px;
    padding: 32px;
    margin-bottom: 26px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .06);
}

.form-card h2 {
    display: flex;
    align-items: center;
    gap: 12px;

    font-size: clamp(1.15rem, 2vw, 1.4rem);
    font-weight: 800;
    color: var(--black-900);
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--black-50);
}

.form-card__num {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: grid;
    place-items: center;

    background: var(--gold-400);
    color: var(--black-900);
    font-size: 1rem;
    font-weight: 800;
}

/* ----- Grillas ----- */
.grid-2,
.grid-3 {
    display: grid;
    gap: 18px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

/* ----- Campos ----- */
.field {
    display: flex;
    flex-direction: column;
    margin-bottom: 18px;
}

.grid-2 .field,
.grid-3 .field {
    margin-bottom: 0;
}

.field label {
    margin-bottom: 8px;
    font-size: .9rem;
    font-weight: 600;
    color: var(--black-800);
}

.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 13px 15px;
    border: 1.5px solid var(--black-100);
    border-radius: 12px;

    background: var(--white);
    font-family: inherit;
    font-size: .98rem;
    color: var(--black-900);

    transition: var(--transition);
}

.field textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.5;
}

.field select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%237A7A7A' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

.field input::placeholder,
.field textarea::placeholder {
    color: var(--black-300);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--gold-400);
    box-shadow: 0 0 0 4px rgba(249, 180, 16, .15);
}

.field-help {
    margin-top: 6px;
    font-size: .8rem;
    color: var(--black-400);
}

/* ----- Estado de error ----- */
.field.error input,
.field.error select,
.field.error textarea {
    border-color: #E5484D;
    box-shadow: 0 0 0 4px rgba(229, 72, 77, .12);
}

.error-message {
    margin-top: 6px;
    font-size: .82rem;
    font-weight: 600;
    color: #E5484D;
}

/* ----- Cajas informativas ----- */
.info-box,
.warning-box,
.response-box {
    border-radius: 14px;
    padding: 18px 20px;
    margin-bottom: 22px;
    font-size: .92rem;
    line-height: 1.55;
}

.info-box p,
.warning-box p,
.response-box p {
    margin-bottom: 8px;
}

.info-box p:last-child,
.warning-box p:last-child,
.response-box p:last-child {
    margin-bottom: 0;
}

.info-box {
    background: var(--gold-50);
    border-left: 4px solid var(--gold-400);
    color: var(--black-700);
}

.warning-box {
    background: #FFF8E6;
    border-left: 4px solid var(--gold-500);
    color: var(--black-700);
}

.warning-box a {
    color: var(--gold-600);
    font-weight: 700;
}

.response-box {
    background: var(--green-50);
    border-left: 4px solid var(--green-400);
    color: var(--black-700);
}

/* ----- Checkbox declaración ----- */
.checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;

    padding: 16px 18px;
    border: 1.5px solid var(--black-100);
    border-radius: 14px;
    background: var(--black-50);

    font-size: .9rem;
    line-height: 1.5;
    color: var(--black-700);
    transition: var(--transition);
}

.checkbox:hover {
    border-color: var(--gold-300);
}

.checkbox input {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 1px;
    accent-color: var(--gold-500);
    cursor: pointer;
}

/* ----- Botón enviar ----- */
.submit-area {
    margin-top: 24px;
    text-align: right;
}

.submit-btn {
    border: none;
    cursor: pointer;
    padding: 15px 40px;
    border-radius: 12px;

    background: var(--gold-400);
    color: var(--black-900);
    font-family: inherit;
    font-weight: 800;
    font-size: 1.02rem;

    box-shadow: 0 12px 26px rgba(249, 180, 16, .4);
    transition: var(--transition);
}

.submit-btn:hover:not(:disabled) {
    background: var(--gold-500);
    transform: translateY(-2px);
}

.submit-btn:disabled {
    opacity: .65;
    cursor: progress;
}

/* ----- Alerta global del formulario ----- */
.form-alert {
    display: none;
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 26px;
    font-size: .95rem;
    font-weight: 600;
    border-left: 4px solid;
}

.form-alert.error {
    background: #FDECEC;
    border-color: #E5484D;
    color: #B42318;
}

.form-alert.success {
    background: var(--green-50);
    border-color: var(--green-500);
    color: var(--green-700);
}

/* ----- Responsive ----- */

@media (max-width: 680px) {
    .form-card {
        padding: 22px;
    }

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .grid-2 .field,
    .grid-3 .field {
        margin-bottom: 18px;
    }

    .submit-area {
        text-align: stretch;
    }

    .submit-btn {
        width: 100%;
    }
}

/* =========================
   MODAL DE CONFIRMACIÓN
========================= */

body.modal-open {
    overflow: hidden;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 20px;
}

.modal[hidden] {
    display: none;
}

.modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

.modal__dialog {
    position: relative;
    width: 100%;
    max-width: 420px;
    padding: 40px 34px;

    background: var(--white);
    border-radius: 22px;
    text-align: center;

    box-shadow: 0 30px 70px rgba(0, 0, 0, .3);
    animation: modalIn .25s ease;
}

.modal__icon {
    width: 74px;
    height: 74px;
    margin: 0 auto 20px;
    border-radius: 50%;
    display: grid;
    place-items: center;

    background: var(--green-400);
    color: var(--white);
    font-size: 32px;
}

.modal__title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--black-900);
    margin-bottom: 12px;
}

.modal__text {
    color: var(--black-500);
    line-height: 1.6;
    margin-bottom: 26px;
}

.modal__btn {
    border: none;
    cursor: pointer;
    padding: 13px 38px;
    border-radius: 12px;

    background: var(--gold-400);
    color: var(--black-900);
    font-family: inherit;
    font-weight: 800;
    font-size: 1rem;

    transition: var(--transition);
}

.modal__btn:hover {
    background: var(--gold-500);
    transform: translateY(-2px);
}

@keyframes modalIn {
    from { opacity: 0; transform: translateY(14px) scale(.96); }
    to   { opacity: 1; transform: none; }
}
