/* ========================================
   FORMULARIOS - DENUNCIA
======================================== */

:root {
    --form-blue: #2b6793;
    --form-blue-light: #5b9dd0;
    --form-border: #5b9dd0;
    --form-text: #1f1f1f;
    --form-muted: #7d7d7d;
    --form-danger: #f44336;

    --complaint-body-max: 860px;
    --complaint-content-max: 700px;

    --complaint-body-padding-x: 34px;
    --complaint-body-padding-top: 24px;
    --complaint-body-padding-bottom: 0;

    --form-label-col: 215px;
    --form-field-col: 300px;
    --form-col-gap: 130px;
}

/* ========================================
   WRAPPER GENERAL
======================================== */

.complaint-page {
    width: 100%;
    color: var(--form-text);
}

.complaint-page *,
.complaint-page *::before,
.complaint-page *::after {
    box-sizing: border-box;
}

/* ========================================
   CABECERA AZUL
======================================== */

.complaint-topbar {
    background: var(--form-blue);
    min-height: 66px;
    padding: 0 26px 0 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.complaint-topbar__title {
    margin: 0;
    color: #ffffff;
    font-size: 14px;
    line-height: 1.2;
    font-weight: 700;
    font-family: "Inter", Arial, Helvetica, sans-serif;
}

.complaint-topbar__switch {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.complaint-topbar__switch img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

/* ========================================
   CUERPO
======================================== */

.complaint-body {
    width: min(100%, var(--complaint-body-max));
    margin: 0 auto;
    padding:
        var(--complaint-body-padding-top) var(--complaint-body-padding-x) var(--complaint-body-padding-bottom);
}

.complaint-intro {
    max-width: 900px;
    margin: 0 auto 50px;
}

.complaint-intro p {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: #222;
    font-family: "Inter", Arial, Helvetica, sans-serif;
}

/* ========================================
   FORMULARIO
======================================== */

.complaint-form {
    width: 100%;
}

.form-grid {
    width: min(100%, var(--complaint-content-max));
    margin: 0 auto;
}

.form-row {
    display: grid;
    grid-template-columns: var(--form-label-col) var(--form-field-col);
    justify-content: center;
    column-gap: var(--form-col-gap);
    align-items: start;
    margin-bottom: 32px;
}

.form-row--textarea {
    margin-bottom: 38px;
}

.form-row--upload {
    align-items: center;
    margin-top: 6px;
}

.form-label {
    margin: 0;
    font-size: 13px;
    line-height: 1.35;
    font-weight: 700;
    color: #1f1f1f;
    font-family: "Inter", Arial, Helvetica, sans-serif;
}

.form-label span {
    color: var(--form-danger);
}

.form-field {
    width: 100%;
}

.form-input {
    width: 100%;
    height: 32px;
    border: 1px solid var(--form-border);
    background: #ffffff;
    color: #1f1f1f;
    font-family: "Inter", Arial, Helvetica, sans-serif;
    font-size: 12px;
    padding: 0 10px;
    outline: none;
    border-radius: 0;
    box-shadow: none;
}

.form-input:focus {
    border-color: #2b79b2;
}

.form-select {
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, #3c78a6 50%),
        linear-gradient(135deg, #3c78a6 50%, transparent 50%);
    background-position:
        calc(100% - 18px) calc(50% - 3px),
        calc(100% - 14px) calc(50% - 3px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 34px;
}

.textarea-wrap {
    position: relative;
}

.form-textarea {
    min-height: 118px;
    height: 118px;
    padding: 10px;
    resize: vertical;
}

.textarea-counter {
    position: absolute;
    right: 10px;
    bottom: 8px;
    font-size: 10px;
    color: #8a8a8a;
    font-family: "Inter", Arial, Helvetica, sans-serif;
}

/* ========================================
   SUBIDA DE ARCHIVOS
======================================== */

.upload-box {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.upload-button {
    min-width: 130px;
    height: 30px;
    padding: 0 12px;
    background: #2f73a6;
    color: #ffffff;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    font-family: "Inter", Arial, Helvetica, sans-serif;
    flex: 0 0 auto;
}

.upload-button img {
    width: 14px;
    height: 14px;
    object-fit: contain;
}


.upload-files {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.upload-file-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 28px;
    padding: 4px 10px;
    background: #f1f3f5;
    color: #333;
    border-radius: 999px;
    border: 1px solid #d6d9dc;
    font-family: "Inter", Arial, Helvetica, sans-serif;
    font-size: 11px;
    line-height: 1.2;
}

.upload-file-chip__name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 180px;
}

.upload-file-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    box-shadow: none;
    appearance: none;
    -webkit-appearance: none;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    color: #777;
    cursor: pointer;
}

.upload-file-remove:hover {
    color: #c62828;
}

.upload-file-remove:focus,
.upload-file-remove:active {
    outline: none;
    box-shadow: none;
}

/* ========================================
   DIVISORES Y BLOQUES
======================================== */

.complaint-divider {
    width: calc(100% - 10px);
    max-width: 100%;
    height: 1px;
    background: #4e8fc0;
    margin: 60px auto 36px;
}

.contact-section {
    width: 100%;
    max-width: 100%;
    margin: 0;
}

.section-title {
    margin: 0 0 18px;
    font-size: 14px;
    font-weight: 700;
    color: #1f1f1f;
    font-family: "Inter", Arial, Helvetica, sans-serif;
}

.section-text {
    margin: 0 0 18px;
    font-size: 12px;
    line-height: 1.6;
    color: #222222;
    font-family: "Inter", Arial, Helvetica, sans-serif;
}

/* ========================================
   CHECKBOX
======================================== */

.anonymous-check,
.privacy-check {
    margin-bottom: 28px;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    line-height: 1.4;
    color: #333333;
    cursor: pointer;
    font-family: "Inter", Arial, Helvetica, sans-serif;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--form-blue);
    flex-shrink: 0;
}

.checkbox-label a {
    color: var(--form-blue);
    font-weight: 600;
}

/* ========================================
   NOTIFICACIONES REUTILIZABLES
======================================== */

.alert {
    width: 100%;
    margin: 0 0 20px;
    padding: 12px 14px;
    border-radius: 6px;
    font-family: "Inter", Arial, Helvetica, sans-serif;
    font-size: 13px;
    line-height: 1.4;
}

.alert-error {
    background: #fdecea;
    border: 1px solid #f5c2c0;
    color: #b42318;
}

.alert-success {
    background: #ecfdf3;
    border: 1px solid #a6f4c5;
    color: #067647;
}

.alert-info {
    background: #eef6ff;
    border: 1px solid #b8d7f3;
    color: #1d4f7a;
}

.invalid-feedback {
    display: none;
    margin-top: 6px;
    font-family: "Inter", Arial, Helvetica, sans-serif;
    font-size: 12px;
    line-height: 1.4;
    color: #c62828;
}

.form-label.is-invalid {
    color: #c62828;
}

.form-input.is-invalid,
.form-select.is-invalid,
.form-textarea.is-invalid {
    border-color: #c62828;
}

.checkbox-label.is-invalid input[type="checkbox"] {
    outline: 1px solid #c62828;
    outline-offset: 2px;
}

.form-input.is-invalid+.invalid-feedback,
.form-select.is-invalid+.invalid-feedback,
.form-textarea.is-invalid+.invalid-feedback {
    display: block;
}

#form-alert {
    margin-top: 20px;
}

/* ========================================
   ACCIONES
======================================== */

.complaint-actions {
    width: 100%;
    margin-top: 32px;
}

.complaint-next {
    width: 100%;
    min-height: 42px;
    border: 0;
    background: var(--form-blue);
    color: #ffffff;
    font-family: "Inter", Arial, Helvetica, sans-serif;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    letter-spacing: 0;
}

.complaint-next__arrow {
    font-size: 14px;
    line-height: 1;
}

.is-hidden {
    display: none !important;
}

/* ========================================
   RESPONSIVE
======================================== */

@media (max-width: 1100px) {
    :root {
        --complaint-body-padding-x: 28px;
        --form-label-col: 190px;
        --form-field-col: 270px;
    }
}

@media (max-width: 900px) {
    .complaint-topbar {
        padding: 16px 22px;
        min-height: auto;
    }

    .complaint-topbar__title {
        font-size: 15px;
    }

    .complaint-body {
        padding:
            26px 28px 0;
    }

    .form-grid,
    .contact-section,
    .complaint-divider {
        width: 100%;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 14px;
        margin-bottom: 24px;
    }

    .complaint-actions {
        margin-left: -28px;
        margin-right: -28px;
    }
}

@media (max-width: 640px) {
    .complaint-topbar {
        padding: 14px 18px;
    }

    .complaint-topbar__title {
        font-size: 14px;
        max-width: 220px;
    }

    .complaint-body {
        padding:
            22px 18px 0;
    }

    .complaint-intro p,
    .section-text,
    .form-label,
    .checkbox-label {
        font-size: 12px;
    }

    .section-title {
        font-size: 17px;
    }

    .complaint-actions {
        margin-left: -18px;
        margin-right: -18px;
    }

    .complaint-next {
        font-size: 13px;
        min-height: 50px;
    }

    .complaint-next__arrow {
        font-size: 16px;
    }
}

/* ========================================
   FORMULARIO VOZ
======================================== */

.voice-intro-list {
    margin: 8px 0 0 18px;
    padding: 0;
    font-family: "Inter", Arial, Helvetica, sans-serif;
    font-size: 13px;
    line-height: 1.6;
    color: #222222;
}

.voice-recorder {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.voice-recorder__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.voice-button {
    min-width: 140px;
    height: 32px;
    padding: 0 14px;
    background: #2f73a6;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    font-family: "Inter", Arial, Helvetica, sans-serif;
}

.voice-button img {
    width: 14px;
    height: 14px;
    object-fit: contain;
}

.voice-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.voice-button--secondary {
    background: #6c7f8f;
}

.voice-status {
    font-family: "Inter", Arial, Helvetica, sans-serif;
    font-size: 12px;
    color: #333333;
}

.voice-preview {
    width: 100%;
    max-width: 300px;
}

.voice-upload-note {
    font-family: "Inter", Arial, Helvetica, sans-serif;
    font-size: 10px;
    color: #888888;
    margin-top: 2px;
}

/* ========================================
   MODAL CONSENTIMIENTO VOZ
======================================== */

.voice-modal[hidden] {
    display: none !important;
}

.voice-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.voice-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.38);
}

.voice-modal__dialog {
    position: relative;
    width: min(100%, 520px);
    margin: 0;
    background: #ffffff;
    border-radius: 10px;
    padding: 24px 24px 20px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
    font-family: "Inter", Arial, Helvetica, sans-serif;
}

.voice-modal__close {
    position: absolute;
    top: 10px;
    right: 12px;
    border: none;
    background: transparent;
    font-size: 24px;
    line-height: 1;
    color: #666666;
    cursor: pointer;
}

.voice-modal__title {
    margin: 0 0 14px;
    font-size: 18px;
    line-height: 1.3;
    font-weight: 700;
    color: #111111;
}

.voice-modal__text {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: #222222;
}

.voice-modal__actions {
    margin-top: 22px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.voice-modal__button {
    min-width: 120px;
    height: 36px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    font-family: "Inter", Arial, Helvetica, sans-serif;
    cursor: pointer;
}

.voice-modal__button--secondary {
    background: #e5e7eb;
    color: #111111;
}

.voice-modal__button--primary {
    background: #2f73a6;
    color: #ffffff;
}