/* ============================================================
   CF7 Global Styles - Estandarización de formularios Contact Form 7
   ============================================================
   Uso: añadir .cf7_customize_white o .cf7_customize_black al div
   contenedor del shortcode [contact-form-7].

   Columnas: .formflex.w100 (1) / .w50 (2) / .w33 (3) / .w25 (4)
   Alias:     .flexform = .formflex (usado en CTAs)
   Floating:  label.flot .legend
   ============================================================ */

/* ============================================================
   VARIABLES POR VARIANTE
   ============================================================ */
.cf7_customize_white {
    --cf7-label: var(--color-1-headings-dark);
    --cf7-input-border: var(--boton-4-texto-normal);
    --cf7-input-color: var(--boton-4-texto-normal);
    --cf7-focus: var(--color-boton-1-normal);
    --cf7-check-fill: %23000;
    /* black */
    --cf7-submit-bg: var(--color-boton-1-normal);
    --cf7-submit-c: var(--color-boton-1-texto-normal);
    --cf7-submit-hbg: var(--color-boton-1-hover);
    --cf7-submit-hc: var(--color-boton-1-texto-hover);
    --cf7-response: var(--color-1-headings-dark);
    --cf7-legend-bg: var(--background-1-light);
    --cf7-radio-bg: var(--boton-4-texto-normal);
    --cf7-radio-shadow: var(--background-1-light);
    --cf7-select-arrow: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
}

.cf7_customize_black {
    --cf7-label: var(--color-2-headings-light);
    --cf7-input-border: var(--boton-5-texto-normal);
    --cf7-input-color: var(--boton-5-texto-normal);
    --cf7-focus: var(--color-boton-3-normal);
    --cf7-check-fill: %23fff;
    /* white */
    --cf7-submit-bg: var(--color-boton-3-normal);
    --cf7-submit-c: var(--color-boton-3-texto-normal);
    --cf7-submit-hbg: var(--color-boton-3-hover);
    --cf7-submit-hc: var(--color-boton-3-texto-hover);
    --cf7-response: var(--color-2-headings-light);
    --cf7-legend-bg: var(--background-1-dark);
    --cf7-radio-bg: var(--boton-5-texto-normal);
    --cf7-radio-shadow: var(--background-1-dark);
    --cf7-select-arrow: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
}

/* ============================================================
   REGLAS COMUNES (ambas variantes)
   ============================================================ */

/* --- Labels --- */
.cf7_customize_white label,
.cf7_customize_black label {
    color: var(--cf7-label);
    font-size: var(--tamano-7-mediumcta-font-size);
    font-weight: var(--tamano-7-mediumcta-font-weight);
    line-height: var(--tamano-7-mediumcta-line-height);
    letter-spacing: var(--tamano-7-mediumcta-letter-spacing);
    font-family: var(--tamano-7-mediumcta-font-family);
}

.cf7_customize_white label .wpcf7-form-control-wrap,
.cf7_customize_black label .wpcf7-form-control-wrap {
    display: block;
    padding-top: 5px;
}

.cf7_customize_white .formflex label,
.cf7_customize_white .formflex p,
.cf7_customize_black .formflex label,
.cf7_customize_black .formflex p {
    margin-bottom: 25px;
    display: block;
}

/* --- Inputs, Textareas, Selects --- */
.cf7_customize_white .formflex select,
.cf7_customize_white .formflex textarea,
.cf7_customize_white .formflex input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
.cf7_customize_black .formflex select,
.cf7_customize_black .formflex textarea,
.cf7_customize_black .formflex input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]) {
    padding: 15px 25px;
    border: 1.5px solid var(--cf7-input-border);
    outline: none;
    background: transparent;
    color: var(--cf7-input-color);
    font-size: var(--tamano7-font-size);
    font-weight: var(--tamano7-font-weight);
    line-height: var(--tamano7-line-height);
    letter-spacing: var(--tamano7-letter-spacing);
    font-family: var(--tamano7-font-family);
    border-radius: 3px;
    width: 100%;
}

.cf7_customize_white .formflex select:focus,
.cf7_customize_white .formflex textarea:focus,
.cf7_customize_white .formflex input:focus,
.cf7_customize_black .formflex select:focus,
.cf7_customize_black .formflex textarea:focus,
.cf7_customize_black .formflex input:focus {
    border-color: var(--cf7-focus);
}

.cf7_customize_white .formflex textarea,
.cf7_customize_black .formflex textarea {
    max-height: 125px;
    resize: vertical;
}

/* --- Select --- */
.cf7_customize_white .formflex select,
.cf7_customize_black .formflex select {
    appearance: none;
    background-image: var(--cf7-select-arrow);
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px 12px;
    padding-right: 40px;
}

/* --- Placeholders --- */
.cf7_customize_white textarea::placeholder,
.cf7_customize_white input::placeholder,
.cf7_customize_white select::placeholder,
.cf7_customize_black textarea::placeholder,
.cf7_customize_black input::placeholder,
.cf7_customize_black select::placeholder {
    color: inherit;
    opacity: 0.7;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    letter-spacing: inherit;
    font-family: inherit;
}

/* ============================================================
   SISTEMA DE COLUMNAS (.formflex.wXX y .flexform)
   ============================================================ */
.cf7_customize_white .formflex.w100 p,
.cf7_customize_black .formflex.w100 p {
    display: block;
}

.cf7_customize_white .formflex.w100 p label,
.cf7_customize_black .formflex.w100 p label {
    width: 100%;
    display: block;
}

.cf7_customize_white .formflex.w50 p,
.cf7_customize_black .formflex.w50 p {
    display: flex;
    gap: 30px;
}

.cf7_customize_white .formflex.w50 p label,
.cf7_customize_black .formflex.w50 p label {
    width: calc(50% - 15px);
}

.cf7_customize_white .formflex.w50 p .wpcf7-form-control-wrap,
.cf7_customize_black .formflex.w50 p .wpcf7-form-control-wrap {
    width: 100%;
}

.cf7_customize_white .formflex.w33 p,
.cf7_customize_black .formflex.w33 p {
    display: flex;
    gap: 25px;
}

.cf7_customize_white .formflex.w33 p label,
.cf7_customize_black .formflex.w33 p label {
    width: calc(33.333% - 17px);
}

.cf7_customize_white .formflex.w33 p .wpcf7-form-control-wrap,
.cf7_customize_black .formflex.w33 p .wpcf7-form-control-wrap {
    width: 100%;
}

.cf7_customize_white .formflex.w25 p,
.cf7_customize_black .formflex.w25 p {
    display: flex;
    gap: 20px;
}

.cf7_customize_white .formflex.w25 p label,
.cf7_customize_black .formflex.w25 p label {
    width: calc(25% - 15px);
}

.cf7_customize_white .formflex.w25 p .wpcf7-form-control-wrap,
.cf7_customize_black .formflex.w25 p .wpcf7-form-control-wrap {
    width: 100%;
}

/* --- flexout --- */
.cf7_customize_white .flexout,
.cf7_customize_black .flexout {
    display: flex;
    gap: 30px;
}

.cf7_customize_white .flexout>div,
.cf7_customize_black .flexout>div {
    flex: 1;
}

/* --- flexform (alias) --- */
.cf7_customize_white .flexform,
.cf7_customize_black .flexform {
    display: flex;
    gap: 50px;
}

.cf7_customize_white .flexform>div,
.cf7_customize_black .flexform>div {
    flex: 1;
}

.cf7_customize_white .flexform .aceptacion,
.cf7_customize_black .flexform .aceptacion {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: space-between;
}

/* ============================================================
   FLOATING LABEL (label.flot)
   ============================================================ */
.cf7_customize_white label.flot,
.cf7_customize_black label.flot {
    position: relative;
    display: block;
    color: var(--cf7-label);
    font-size: var(--tamano8-font-size);
    font-weight: var(--tamano8-font-weight);
    line-height: var(--tamano8-line-height);
    letter-spacing: var(--tamano8-letter-spacing);
    font-family: var(--tamano8-font-family);
}

.cf7_customize_white label.flot .legend,
.cf7_customize_black label.flot .legend {
    position: absolute;
    top: 0;
    transform: translateY(-50%);
    left: 20px;
    padding: 0 10px;
    z-index: 1;
    background: var(--cf7-legend-bg);
}

.cf7_customize_white label.flot textarea,
.cf7_customize_white label.flot input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="file"]),
.cf7_customize_black label.flot textarea,
.cf7_customize_black label.flot input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="file"]) {
    background: transparent;
    padding: 10px;
    outline: none;
    border: 1.5px solid var(--cf7-label);
    width: 100%;
    color: var(--cf7-label);
    font-size: var(--tamano7-font-size);
    font-weight: var(--tamano7-font-weight);
    line-height: var(--tamano7-line-height);
    letter-spacing: var(--tamano7-letter-spacing);
    font-family: var(--tamano7-font-family);
    border-radius: 5px;
    max-height: 108px;
}

.cf7_customize_white label.flot textarea,
.cf7_customize_black label.flot textarea {
    max-height: 108px;
}

/* --- File input --- */
.cf7_customize_white .wpcf7-file,
.cf7_customize_black .wpcf7-file {
    display: none;
}

/* ============================================================
   CHECKBOX / RADIO / ACEPTACIÓN
   ============================================================ */
.cf7_customize_white .wpcf7-list-item,
.cf7_customize_black .wpcf7-list-item {
    margin: 0;
}

.cf7_customize_white .wpcf7-list-item label,
.cf7_customize_black .wpcf7-list-item label {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.cf7_customize_white .wpcf7-list-item-label,
.cf7_customize_black .wpcf7-list-item-label {
    color: var(--cf7-label);
    font-size: var(--tamano7-font-size);
    font-weight: var(--tamano7-font-weight);
    line-height: var(--tamano7-line-height);
    letter-spacing: var(--tamano7-letter-spacing);
    font-family: var(--tamano7-font-family);
}

.cf7_customize_white .aceptacion input,
.cf7_customize_white .wpcf7-list-item input[type="checkbox"],
.cf7_customize_white .wpcf7-list-item input[type="radio"],
.cf7_customize_black .aceptacion input,
.cf7_customize_black .wpcf7-list-item input[type="checkbox"],
.cf7_customize_black .wpcf7-list-item input[type="radio"] {
    cursor: pointer;
    background-color: transparent;
    position: relative;
    width: 15px;
    height: 15px;
    appearance: none;
    flex-shrink: 0;
    border: 1.5px solid var(--cf7-input-border);
    border-radius: 3px;
}

.cf7_customize_white .wpcf7-list-item input[type="radio"],
.cf7_customize_black .wpcf7-list-item input[type="radio"] {
    border-radius: 50%;
}

.cf7_customize_white .wpcf7-list-item input[type="radio"]:checked,
.cf7_customize_black .wpcf7-list-item input[type="radio"]:checked {
    background-image: none;
    background-color: var(--cf7-radio-bg);
    box-shadow: inset 0 0 0 3px var(--cf7-radio-shadow);
}

/* Checkmark (SVG fill difiere: white=black, black=white) */
.cf7_customize_white .wpcf7-list-item :checked {
    background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='black' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e");
}

.cf7_customize_black .wpcf7-list-item :checked {
    background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e");
}

.cf7_customize_white .aceptacion br,
.cf7_customize_black .aceptacion br {
    display: none;
}

.cf7_customize_white .aceptacion p,
.cf7_customize_black .aceptacion p {
    display: flex;
    flex-direction: column;
}

.cf7_customize_white .aceptacion .wpcf7-form-control-wrap,
.cf7_customize_black .aceptacion .wpcf7-form-control-wrap {
    display: block;
}

/* ============================================================
   SUBMIT BUTTON
   ============================================================ */
.cf7_customize_white .wpcf7-submit,
.cf7_customize_black .wpcf7-submit {
    background: var(--cf7-submit-bg);
    border: none;
    cursor: pointer;
    transition: all ease .3s;
    border-radius: 60px;
    color: var(--cf7-submit-c);
    height: 51px;
    width: 210px;
    max-width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 25px;
    font-size: var(--tamano6-boldcta-font-size);
    font-weight: var(--tamano6-boldcta-font-weight);
    line-height: var(--tamano6-boldcta-line-height);
    letter-spacing: var(--tamano6-boldcta-letter-spacing);
    font-family: var(--tamano6-boldcta-font-family);
}

.cf7_customize_white .wpcf7-submit:hover,
.cf7_customize_black .wpcf7-submit:hover {
    background-color: var(--cf7-submit-hbg);
    color: var(--cf7-submit-hc);
}

/* ============================================================
   RESPONSE OUTPUT / VALIDATION
   ============================================================ */
.cf7_customize_white .wpcf7 form .wpcf7-response-output,
.cf7_customize_black .wpcf7 form .wpcf7-response-output {
    color: var(--cf7-response);
    margin: 15px 0 0 0;
    padding: 10px 15px;
    border-radius: 3px;
}

.cf7_customize_white .wpcf7 form.sent .wpcf7-response-output,
.cf7_customize_black .wpcf7 form.sent .wpcf7-response-output {
    border-color: #46b450;
}

.cf7_customize_white .wpcf7 form.sent .wpcf7-response-output {
    background: rgba(70, 180, 80, 0.1);
}

.cf7_customize_white .wpcf7 form.failed .wpcf7-response-output,
.cf7_customize_white .wpcf7 form.invalid .wpcf7-response-output,
.cf7_customize_white .wpcf7 form.unaccepted .wpcf7-response-output,
.cf7_customize_black .wpcf7 form.failed .wpcf7-response-output,
.cf7_customize_black .wpcf7 form.invalid .wpcf7-response-output,
.cf7_customize_black .wpcf7 form.unaccepted .wpcf7-response-output {
    color: #dc3232;
    border-color: #dc3232;
}

.cf7_customize_white .wpcf7 form .wpcf7-response-output,
.cf7_customize_white .wpcf7-not-valid-tip,
.cf7_customize_black .wpcf7 form .wpcf7-response-output,
.cf7_customize_black .wpcf7-not-valid-tip {
    font-size: var(--tamano8-font-size);
    font-weight: var(--tamano8-font-weight);
    line-height: var(--tamano8-line-height);
    letter-spacing: var(--tamano8-letter-spacing);
    font-family: var(--tamano8-font-family);
}

.cf7_customize_white .wpcf7-not-valid-tip,
.cf7_customize_black .wpcf7-not-valid-tip {
    color: #dc3232;
    margin-top: 5px;
}

/* --- Spinner --- */
.cf7_customize_white .wpcf7-spinner,
.cf7_customize_black .wpcf7-spinner {
    position: absolute;
}


/* ###########################################################################
   MEDIA QUERIES
   ########################################################################### */

@media (max-width: 1200px) {

    .cf7_customize_white label,
    .cf7_customize_black label {
        font-size: var(--tamano-7-mediumcta-font-size-tablet);
    }

    .cf7_customize_white .wpcf7-list-item-label,
    .cf7_customize_black .wpcf7-list-item-label,
    .cf7_customize_white .wpcf7 form .wpcf7-response-output,
    .cf7_customize_white .wpcf7-not-valid-tip,
    .cf7_customize_black .wpcf7 form .wpcf7-response-output,
    .cf7_customize_black .wpcf7-not-valid-tip {
        font-size: var(--tamano8-font-size-tablet);
    }

    .cf7_customize_white .formflex select,
    .cf7_customize_white .formflex textarea,
    .cf7_customize_white .formflex input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
    .cf7_customize_black .formflex select,
    .cf7_customize_black .formflex textarea,
    .cf7_customize_black .formflex input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]) {
        font-size: var(--tamano7-font-size-tablet);
    }

    .cf7_customize_white .wpcf7-submit,
    .cf7_customize_black .wpcf7-submit {
        font-size: var(--tamano6-boldcta-font-size-tablet);
    }
}

@media (max-width: 768px) {

    .cf7_customize_white label,
    .cf7_customize_black label {
        font-size: var(--tamano-7-mediumcta-font-size-mobile);
    }

    .cf7_customize_white .formflex label,
    .cf7_customize_white .formflex p,
    .cf7_customize_black .formflex label,
    .cf7_customize_black .formflex p {
        margin-bottom: 18px;
    }

    /* Colapsar columnas */
    .cf7_customize_white .formflex.w50 p,
    .cf7_customize_white .formflex.w33 p,
    .cf7_customize_white .formflex.w25 p,
    .cf7_customize_black .formflex.w50 p,
    .cf7_customize_black .formflex.w33 p,
    .cf7_customize_black .formflex.w25 p {
        flex-direction: column;
        gap: 0;
    }

    .cf7_customize_white .formflex.w50 p label,
    .cf7_customize_white .formflex.w33 p label,
    .cf7_customize_white .formflex.w25 p label,
    .cf7_customize_white .formflex.w100 p label,
    .cf7_customize_black .formflex.w50 p label,
    .cf7_customize_black .formflex.w33 p label,
    .cf7_customize_black .formflex.w25 p label,
    .cf7_customize_black .formflex.w100 p label {
        width: 100%;
        margin-bottom: 18px;
        font-size: calc(var(--tamano7-font-size-mobile) - 4px);
    }

    .cf7_customize_white .formflex select,
    .cf7_customize_white .formflex textarea,
    .cf7_customize_white .formflex input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
    .cf7_customize_black .formflex select,
    .cf7_customize_black .formflex textarea,
    .cf7_customize_black .formflex input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]) {
        font-size: calc(var(--tamano7-font-size-mobile) - 4px);
    }

    .cf7_customize_white .formflex textarea,
    .cf7_customize_black .formflex textarea {
        max-height: 125px;
    }

    .cf7_customize_white .wpcf7-list-item-label,
    .cf7_customize_black .wpcf7-list-item-label,
    .cf7_customize_white .wpcf7 form .wpcf7-response-output,
    .cf7_customize_white .wpcf7-not-valid-tip,
    .cf7_customize_black .wpcf7 form .wpcf7-response-output,
    .cf7_customize_black .wpcf7-not-valid-tip {
        font-size: var(--tamano8-font-size-mobile);
    }

    .cf7_customize_white .wpcf7-not-valid-tip,
    .cf7_customize_black .wpcf7-not-valid-tip {
        margin-top: 7px;
    }

    .cf7_customize_white .wpcf7-submit,
    .cf7_customize_black .wpcf7-submit {
        font-size: calc(var(--tamano7-font-size-mobile) - 2px);
        max-width: 131px;
        margin: 25px auto 0;
    }

    .cf7_customize_white .aceptacion br,
    .cf7_customize_black .aceptacion br {
        display: none;
    }

    .cf7_customize_white .flexout,
    .cf7_customize_black .flexout,
    .cf7_customize_white .flexform,
    .cf7_customize_black .flexform {
        flex-direction: column;
        gap: 0;
    }

    .cf7_customize_white .flexout>div,
    .cf7_customize_black .flexout>div,
    .cf7_customize_white .flexform>div,
    .cf7_customize_black .flexform>div {
        width: 100%;
    }

    .cf7_customize_white label.flot .legend,
    .cf7_customize_black label.flot .legend {
        left: 15px;
    }

    .cf7_customize_white label.flot textarea,
    .cf7_customize_white label.flot input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="file"]),
    .cf7_customize_black label.flot textarea,
    .cf7_customize_black label.flot input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="file"]) {
        font-size: calc(var(--tamano7-font-size-mobile) - 2px);
        padding-left: 25px;
    }

    .cf7_customize_white label.flot,
    .cf7_customize_black label.flot {
        font-size: var(--tamano8-font-size-mobile);
    }
}

@media (max-width: 480px) {

    .cf7_customize_white .formflex select,
    .cf7_customize_white .formflex textarea,
    .cf7_customize_white .formflex input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
    .cf7_customize_black .formflex select,
    .cf7_customize_black .formflex textarea,
    .cf7_customize_black .formflex input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]) {
        padding: 12px 18px;
    }

    .cf7_customize_white .wpcf7-submit,
    .cf7_customize_black .wpcf7-submit {
        width: 100%;
        max-width: 100%;
    }
}