/* Frontend styles *//* =========================
   BASE GENERAL
========================= */

.formsq-form,
.formsq-form * {
    font-family: 'Poppins', sans-serif !important;
    text-transform: none !important;
}

.formsq-form {
    max-width: 1200px;
    margin: 40px auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    font-family: 'Poppins' !important;
    color: #222;
}

/* Título */
.formsq-title {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 25px;
    text-align: center;
    color: #1f2a44;
}

h2.formsq-title {
    text-transform: none;
    font-weight: 600;
}

/* =========================
   SECCIONES
========================= */


.contenedor-info {
    width: 100%;
    gap: 10px;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
}

.doc-img-cont {
    gap: 10px;
    display: flex;
    width: 100%;
    flex-direction: row;
    align-items: center;
}

.formsq-section {
    margin-bottom: 25px;
    padding: 20px;
    border: 1px solid #eef0f3;
    border-radius: 12px;
    background: #fafbfc;
}

.formsq-section h3 {
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 700;
    color: #2b3a55;
    border-left: 4px solid #4f46e5;
    padding-left: 10px;
}

/* =========================
   INPUTS
========================= */

.contenedor-info input, .formsq-form select, .formsq-form textarea {
    height: 50px !important;
    width: 260px;
}

.formsq-form input,
.formsq-form select,
.formsq-form textarea {
    
    padding: 12px 14px;
    margin-bottom: 12px;
    border: 1px solid #d6dbe3;
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    background: #fff;
    transition: all 0.2s ease;
}

.formsq-form textarea {
    resize: none;
}

/* Focus elegante */
.formsq-form input:focus,
.formsq-form select:focus,
.formsq-form textarea:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79,70,229,0.15);
}

/* =========================
   LABEL CHECKBOX
========================= */

.formsq-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    margin-top: 10px;
}

/* =========================
   TÉRMINOS
========================= */

.formsq-terms {
    background: #fff;
    border: 1px dashed #cbd5e1;
    padding: 15px;
    border-radius: 10px;
    font-size: 13px;
    color: #444;
    margin-bottom: 10px;
}

/* =========================
   FIRMA
========================= */

.formsq-signature {
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    width: 100%;
    max-width: 600px;
    display: block;
    margin-bottom: 10px;
}

#signature-pad {
    touch-action: none;
}

/* =========================
   BOTONES
========================= */

.formsq-btn-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.formsq-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(79,70,229,0.25);
}

.formsq-btn-secondary {
    padding: 10px 14px;
    background: #0654d2;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 13px;
    cursor: pointer;
    transition: 0.2s;
}

.formsq-btn-secondary:hover {
    color: #0654d2;
    background: #e5e7eb;
}

/* =========================
   HR DIVISOR
========================= */

.formsq-form hr {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 25px 0;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 768px) {
    .formsq-form {
        padding: 18px;
        margin: 20px;
    }

    .formsq-title {
        font-size: 22px;
    }

    .formsq-section {
        padding: 15px;
    }
}


/* =========================
   TÉRMINOS PRO (COLLAPSE)
========================= */

.formsq-terms-wrapper {
    position: relative;
}

.formsq-terms-content h2 {
    text-transform: none;
    font-size: 18px;
    font-weight: 700;
}

/* Caja colapsada */
.formsq-terms-box {
    max-height: 180px;
    overflow: hidden;
    position: relative;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 15px;
    transition: max-height 0.4s ease;
}

/* Gradiente de fade al final */
.formsq-terms-box::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to bottom, rgba(255,255,255,0), #fff);
    pointer-events: none;
}

/* Estado expandido */
.formsq-terms-box.expanded {
    max-height: 500px;
    overflow: auto;
}

.formsq-terms-box.expanded::after {
    display: none;
}

/* Contenido */
.formsq-terms-content {
    font-size: 13px;
    line-height: 1.6;
    color: #333;
}

.formsq-terms-content h4 {
    margin-top: 15px;
    font-size: 14px;
    color: #1f2a44;
}

/* Botón ver más */
#toggle-terms {
    margin-top: 10px;
    width: auto;
}



/* =========================
   MOBILE OPTIMIZED (≤768px)
========================= */

@media (max-width: 768px) {

    /* Contenedor general */
    .formsq-form {
        padding: 16px;
        margin: 10px;
        border-radius: 12px;
    }

    /* Título */
    .formsq-title {
        font-size: 20px;
        margin-bottom: 15px;
    }

    /* Secciones más compactas */
    .formsq-section {
        padding: 12px;
        margin-bottom: 15px;
        border-radius: 10px;
    }

    .formsq-section h3 {
        font-size: 14px;
        margin-bottom: 10px;
    }

    /* Inputs full width en móvil */
    .formsq-form input,
    .formsq-form select,
    .formsq-form textarea {
        width: 100% !important;
        height: 44px;
        font-size: 14px;
        padding: 10px 12px;
    }

    .formsq-form textarea {
        min-height: 90px;
        height: auto;
    }

    .doc-img-cont {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

    .doc-img-cont span {
        font-size: 12px;
    }

    /* Contenedor flex → columna */
    .contenedor-info {
        flex-direction: column;
        gap: 8px;
    }

    /* Inputs dentro de contenedor-info */
    .contenedor-info input,
    .contenedor-info select,
    .contenedor-info textarea {
        width: 100% !important;
        height: 44px;
    }

    /* Firma adaptada */
    .formsq-signature {
        max-width: 100%;
        height: auto;
    }

    /* Botones */
    .formsq-btn-primary {
        font-size: 14px;
        padding: 12px;
        border-radius: 10px;
    }

    .formsq-btn-secondary {
        width: 100%;
        font-size: 13px;
        padding: 10px;
    }

    /* Términos */
    .formsq-terms-box {
        max-height: 160px;
        font-size: 12px;
    }

    .formsq-terms-content {
        font-size: 12px;
        line-height: 1.5;
    }

    /* Mejor espaciado general */
    .formsq-form hr {
        margin: 18px 0;
    }
}

/* =========================
   EXTRA SMALL (≤480px)
========================= */

@media (max-width: 480px) {

    .formsq-form {
        padding: 12px;
        margin: 5px;
    }

    .formsq-title {
        font-size: 18px;
    }

    .formsq-section {
        padding: 10px;
    }

    .formsq-section h3 {
        font-size: 13px;
    }

    .formsq-form input,
    .formsq-form select,
    .formsq-form textarea {
        font-size: 13px;
        height: 42px;
    }

    .formsq-btn-primary {
        font-size: 13px;
    }
}