/**
 * GMoney Canal de Denuncias (Línea Ética) - Custom CSS
 * Estilo visual con personalización de mensaje de confirmación y agradecimiento.
 */

/* ==========================================================================
   1. CONTENEDOR Y REGLAS GENERALES
   ========================================================================== */
.form-denuncia-wrapper {
    width: 100%;
    max-width: 920px;
    margin: 0 auto;
    background-color: #ffffff;
    padding: 20px 10px;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #111827;
}

.form-section-wrapper {
    margin-bottom: 36px;
}

.form-section-title {
    font-size: 22px;
    font-weight: 500;
    color: #111827;
    margin: 0 0 16px 0;
    line-height: 1.3;
    border: none;
    padding: 0;
}

.form-section-guidance {
    font-size: 15px;
    font-weight: 400;
    color: #111827;
    line-height: 1.5;
    margin: 0 0 20px 0;
}

/* ==========================================================================
   2. SISTEMA DE GRID DESKTOP
   ========================================================================== */
.form-grid-row {
    display: flex;
    flex-wrap: wrap;
    margin-left: -8px;
    margin-right: -8px;
    margin-bottom: 12px;
}

.form-grid-row:last-child {
    margin-bottom: 0;
}

.form-col {
    padding-left: 8px;
    padding-right: 8px;
    box-sizing: border-box;
    margin-bottom: 8px;
}

.col-12 { width: 100%; }
.col-6  { width: 50%; }
.col-4  { width: 33.3333%; }

/* ==========================================================================
   3. ESTILOS DE CAMPOS: BORDE DE 1PX, FONDO BLANCO Y PLACEHOLDER #333
   ========================================================================== */
.form-input-field,
.form-select-field,
.form-textarea-field,
.file-upload-box {
    width: 100%;
    height: 48px;
    padding: 12px 16px;
    border: 1px solid #d1d5db !important;
    border-radius: 10px !important;
    font-size: 14px;
    color: #111827;
    background-color: #ffffff !important;
    box-sizing: border-box;
    font-family: inherit;
    font-weight: 400;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
}

.form-select-field {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%20333333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
    padding-right: 40px;
}

/* Placeholders #333 */
.form-input-field::placeholder,
.form-select-field::placeholder,
.form-textarea-field::placeholder,
::-webkit-input-placeholder,
::-moz-placeholder,
:-ms-input-placeholder,
:-moz-placeholder {
    color: #333333 !important;
    opacity: 1 !important;
    font-size: 14px;
}

.form-select-field option:disabled {
    color: #333333 !important;
}

.form-textarea-field {
    height: auto;
    min-height: 140px;
    resize: vertical;
    line-height: 1.5;
}

.form-input-field:focus,
.form-select-field:focus,
.form-textarea-field:focus {
    border-color: #111827 !important;
    outline: none;
}

/* ==========================================================================
   4. CAMPO DE ADJUNTO PERSONALIZADO & MENSAJE DE PDF MÁX 5MB
   ========================================================================== */
.file-upload-box {
    padding: 5px 6px;
    display: flex;
    align-items: center;
}

.custom-file-btn {
    background-color: #e5e7eb;
    color: #111827;
    border-radius: 8px;
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    white-space: nowrap;
    user-select: none;
    transition: background-color 0.2s ease;
}

.custom-file-btn:hover {
    background-color: #d1d5db;
    color: #111827;
}

.file-name-display {
    margin-left: 14px;
    font-size: 14px;
    color: #333333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-name-display.file-selected {
    color: #111827;
    font-weight: 500;
}

.file-upload-hint {
    font-size: 13px;
    color: #4b5563;
    margin-top: 6px;
    line-height: 1.4;
}

.form-file-input {
    display: none !important;
}

/* ==========================================================================
   5. CHECKBOX CIRCULAR DE POLÍTICAS
   ========================================================================== */
.custom-circular-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    user-select: none;
    font-size: 15px;
    color: #111827;
}

.custom-circular-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark-circle {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border: 1.5px solid #d1d5db;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.custom-circular-checkbox:hover input ~ .checkmark-circle {
    border-color: #9ca3af;
}

.custom-circular-checkbox input:checked ~ .checkmark-circle {
    background-color: #1c2836;
    border-color: #1c2836;
}

.checkmark-circle:after {
    content: "";
    display: none;
    width: 6px;
    height: 11px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-bottom: 2px;
}

.custom-circular-checkbox input:checked ~ .checkmark-circle:after {
    display: block;
}

.checkbox-text {
    font-size: 15px;
    color: #111827;
    line-height: 1.4;
}

.privacy-link {
    color: #0075f4;
    text-decoration: none;
    font-weight: 400;
}

.privacy-link:hover {
    text-decoration: underline;
}

/* ==========================================================================
   6. BOTÓN DE ENVÍO PÍLDORA (DARK NAVY / ANTRACITA)
   ========================================================================== */
.form-submit-wrapper {
    text-align: center;
    margin-top: 36px;
}

.form-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background-color: #1c2836;
    color: #ffffff;
    padding: 14px 64px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(28, 40, 54, 0.15);
    margin: 0 auto;
}

.form-submit-btn:hover {
    background-color: #0f172a;
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.25);
}

.form-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-spinner {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner-icon {
    animation: rotate 1.5s linear infinite;
    width: 22px;
    height: 22px;
}

.spinner-icon .path {
    stroke: #ffffff;
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

@keyframes rotate { 100% { transform: rotate(360deg); } }
@keyframes dash {
    0% { stroke-dasharray: 1, 150; stroke-dashoffset: 0; }
    50% { stroke-dasharray: 90, 150; stroke-dashoffset: -35; }
    100% { stroke-dasharray: 90, 150; stroke-dashoffset: -124; }
}

/* ==========================================================================
   7. CUADRO DE MENSAJE DE ÉXITO Y AGRADECIMIENTO PERSONALIZABLE
   ========================================================================== */
.form-response-msg {
    margin-top: 28px;
    padding: 24px;
    border-radius: 12px;
    font-size: 15px;
    line-height: 1.6;
    text-align: center;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.form-response-msg.success {
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
}

.form-response-msg.error {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.form-response-msg-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #166534;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.form-response-msg-desc {
    font-size: 1rem;
    color: #334155;
    margin: 0 0 16px 0;
    line-height: 1.5;
}

.code-badge {
    display: inline-block;
    background-color: #1c2836;
    color: #ffffff;
    padding: 6px 16px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 0.95rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   8. RESPONSIVE DESIGN (MÓVIL < 768px)
   ========================================================================== */
@media (max-width: 767px) {
    .form-denuncia-wrapper {
        padding: 16px 8px;
    }

    .form-section-title {
        font-size: 19px;
        margin-bottom: 12px;
    }

    .form-section-guidance {
        font-size: 14px;
        margin-bottom: 16px;
    }

    .form-grid-row {
        flex-direction: column !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        margin-bottom: 0 !important;
    }

    .form-col,
    .col-12,
    .col-6,
    .col-4 {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-bottom: 12px !important;
    }

    .form-input-field,
    .form-select-field,
    .file-upload-box {
        width: 100% !important;
        height: 48px;
        font-size: 14px;
        border: 1px solid #d1d5db !important;
        border-radius: 10px !important;
        background-color: #ffffff !important;
    }

    .custom-file-btn {
        padding: 8px 14px;
        font-size: 13px;
    }

    .form-submit-btn {
        width: 100% !important;
        padding: 16px 20px;
    }

    .form-response-msg-title {
        font-size: 1.15rem;
    }

    .form-response-msg-desc {
        font-size: 0.9rem;
    }
}
