.required {
    color: red;
}

textarea {
    resize: vertical;
    height: 120px;
}

fieldset {
    background-color: #FFF;
    margin-bottom: 24px;
    padding: 24px;
    border-color: #dee2e6;
}

fieldset legend {
    font-size: 16px;
    margin-bottom: 0;
}

legend,
label,
.label {
    color: var(--ast-global-color-2, #111827);
    font-size: 14px;
    font-style: normal;
    font-weight: 700;
    line-height: 20px;
    font-family: 'Roboto', sans-serif !important;
}

select.form-control {
    padding: 0.5em 0.75em;
}

.privacidad {
    display: flex;
    justify-content: flex-end;
}

.privacidad label {
    font-weight: normal;
}

.privacidad .wpcf7-list-item {
    margin-left: 0;
}

input[type="file"],
.wpcf7 input[type=file].wpcf7-form-control {
    padding: 7px 16px;
}

small {
    display: block;
    margin-top: -16px;
}

.form-inscripcion-iniciativa small {
    margin-top: 0;
}

.coib-form-error,
.wpcf7-not-valid-tip {
    display: block;
    margin-top: 8px;
    color: #dc3545;
    font-size: 0.9em;
    line-height: 1.4em;
}

.coib-field-invalid,
.wpcf7-not-valid,
.form-inscripcion-iniciativa .coib-field-invalid,
.form-inscripcion-iniciativa .wpcf7-not-valid {
    border-color: #dc3545 !important;
    box-shadow: none !important;
}

input[type="checkbox"].coib-field-invalid,
input[type="radio"].coib-field-invalid {
    outline: 2px solid #dc3545;
    outline-offset: 2px;
}

.coib-group-invalid {
    position: relative;
}

form p {
    font-size: 14px;
}

.form-row .form-group .form-control {
    box-shadow: none;
    border-color: #ced4da;
}

.file-upload-item.is-hidden {
    display: none;
}

a.boton-descarga {
    display: inline-block;
    margin-top: 8px;
    color: var(--ast-global-color-0);

}

a.boton-descarga:hover {
    color: #004447;
}

.recerca-documentacio-lista {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
}

.recerca-documentacio-item p {
    margin-bottom: 0;
}

.recerca-documentacio .boton-descarga {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background: #fff;
    text-decoration: none !important;
}

.recerca-documentacio .boton-descarga:hover {
    border-color: var(--ast-global-color-0);
    background: #f8f9fa;
}

.recerca-documentacio .boton-descarga i {
    margin-left: 0;
}

.box-submit {
    text-align: right;
}

.box-submit>p {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

input[type="submit"],
button[type="submit"],
.button-reset {
    background-color: #00b1bb;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 700;
    transition: 0.2s;
    color: #FFF;
    border-radius: 30px;
}

input[type="submit"]:hover,
button[type="submit"]:hover,
.button-reset {
    background-color: #000;
    color: #FFF;
}

input[type="submit"]:disabled,
.wpcf7-submit:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.button-reset {
    background-color: transparent;
    color: #000;
    border: 1px solid #000;
    transition: 0.2s;
}

.button-reset:hover {
    background-color: transparent;
    color: #00b1bb;
    border-color: #00b1bb;
    transition: 0.2s;
}

/* Tablas añadir más de un registro Titulo__c, Especialidad__c e Historial_Laboral__c */
button.btn-eliminar-fila.btn.btn-sm.btn-danger {
    box-shadow: none;
}

button.btn-añadir {
    box-shadow: none;
    border: 1px solid black;
    border-radius: 30px;
    line-height: 2px;
    transition: 0.2s;
}

button.btn-añadir:hover {
    background-color: var(--ast-global-color-0);
    border-color: var(--ast-global-color-0);
    color: #FFF;
}

/* Campos readonly autocompletados */
.wpcf7-form input[readonly],
.wpcf7-form input[readonly]:focus {
    background: #f5f5f5 !important;
    border-left: 3px solid #999 !important;
    cursor: not-allowed;
    color: #666;
}

.preferencias-comunicacion .wpcf7-list-item-label,
.centre .wpcf7-list-item-label {
    font-weight: 400;
}

.ambitos-multipicklist {
    min-height: 480px;
    background-image: none;
}

/* ===== TABLAS REPETIDORAS RESPONSIVE ===== */

.tabla-repetidor th {
    background-color: #f8f9fa;
    font-weight: 600;
    font-size: 14px;
}

.tabla-repetidor td input,
.tabla-repetidor td select {
    width: 100%;
    min-width: 0;
    margin: 0;
}


.tabla-repetidor .btn-eliminar-fila {
    white-space: nowrap;
    padding: 6px 12px;
}

/* Responsive: Mobile */
@media screen and (max-width: 768px) {

    .tabla-repetidor {
        border: 0;
    }

    .tabla-repetidor thead {
        display: none;
    }

    .tabla-repetidor tbody {
        display: block;
    }

    .tabla-repetidor tr {
        display: block;
        margin-bottom: 24px;
        border: 1px solid #ddd;
        border-radius: 4px;
        padding: 10px;
        background: #fff;
    }

    .tabla-repetidor td {
        display: block;
        border: none;
        padding: 8px 0;
        text-align: left;
        position: relative;
        min-height: 40px;
    }

    .tabla-repetidor td::before {
        content: attr(data-label);
        padding-right: 8px;
        font-weight: 600;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .tabla-repetidor td:last-child {
        text-align: center;
        padding-left: 0;
        padding-top: 16px;
        border-top: 1px solid #eee;
        margin-top: 8px;
    }

    .tabla-repetidor td:last-child::before {
        display: none;
    }

    .tabla-repetidor .btn-eliminar-fila {
        width: 100%;
        max-width: 200px;
    }

    button.btn-añadir {
        width: 100%;
        margin-bottom: 24px;
    }
}

.seccion-especialidades,
.seccion-historial {
    margin-top: 40px;
}

/* Mejorar espaciado en móvil */
@media screen and (max-width: 768px) {

    .seccion-titulos,
    .seccion-especialidades,
    .seccion-historial {
        margin-bottom: 30px;
    }

    fieldset {
        padding: 16px;
    }
}

/* ESTILOS FIELDSET DATOS DE PAGO */
.fieldset-cuotas-salesforce {
    background: #fff;
    border-radius: 4px;
    padding: 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.fieldset-cuotas-salesforce legend {
    background: none;
    color: #00b1bb;
    padding: 0 10px;
    font-weight: 700;
    font-size: 20px;
    border: none;
}

.cuotas-tabla {
    /* No necesita padding adicional */
}

.cuota-fila {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 0;
    border-bottom: 1px dashed #ddd;
}

.cuota-fila:last-child {
    border-bottom: none;
}

.cuota-info {
    flex: 1;
}

.cuota-label {
    font-size: 16px;
    margin-bottom: 4px;
}

.cuota-nota-inline {
    display: block;
    font-size: 14px;
    font-style: italic;
    margin-top: 2px;
}

.cuota-valor {
    font-size: 26px;
    color: #00b1bb;
    font-weight: 700;
    white-space: nowrap;
}

.cuota-total {
    background: #00b1bb;
    margin: 24px -32px -32px;
    padding: 20px 28px;
    border-radius: 0 0 4px 4px;
}

.cuota-total .cuota-label,
.cuota-total .cuota-valor {
    color: white;
    font-weight: 700;
}

.cuota-total .cuota-valor {
    font-size: 32px;
}

.cuotas-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 15px;
    border-radius: 4px;
    text-align: center;
    margin: 20px 0;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .fieldset-cuotas-salesforce {
        padding: 20px;
    }

    .cuota-fila {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 15px 0;
    }

    .cuota-valor {
        font-size: 24px;
    }

    .cuota-total {
        margin: 20px -20px -20px;
        padding: 16px 20px;
    }

    .cuota-total .cuota-valor {
        font-size: 28px;
    }
}

/*Form Recerca step1 documento1 tabla bugget presupost sol-licitat*/
.budget-wrap table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.budget-wrap th,
.budget-wrap td {
    border: 1px solid #ccc;
    padding: 8px 10px;
    text-align: right;
    font-size: 13px;
}

.budget-wrap th:first-child,
.budget-wrap td:first-child {
    text-align: left;
    width: 36%;
}

.budget-wrap th {
    background: #f5f5f5;
    font-weight: bold;
}

.budget-wrap input[type=number] {
    width: 100%;
    border: none;
    background: #dce9f8;
    border-radius: 4px;
    padding: 4px 6px;
    font-size: 13px;
    text-align: right;
    box-sizing: border-box;
}

.budget-wrap input[type=number]:disabled {
    background: #ebebeb;
    color: #aaa;
    cursor: not-allowed;
}

.budget-wrap .auto-cell {
    color: #888;
    font-style: italic;
}

.budget-wrap .total-row td {
    font-weight: bold;
    background: #f5f5f5;
}

.budget-wrap .grand-total {
    margin-top: 16px;
    font-size: 15px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
}

.budget-wrap .grand-total-number {
    font-size: 22px;
}

/*Form Recerca step2 documento2 */
.textarea-small {
    min-height: 80px;
}

.textarea-medium {
    min-height: 200px;
}

.textarea-large {
    min-height: 500px;
}

.textarea-extralarge {
    min-height: 1024px;
}

.nota {
    font-style: normal;
    font-weight: 400;
    font-size: 12px;
}

.wpcf7-previous {
    box-shadow: none !important;
    border: 1px solid black !important;
    border-radius: 30px !important;
    transition: 0.2s !important;
    color: var(--ast-global-color-2) !important;
    background-color: transparent !important;
    width: auto !important;
}

.wpcf7-previous:hover {
    border: 1px solid var(--ast-global-color-0) !important;
    color: #FFF !important;
    background-color: var(--ast-global-color-0) !important;
}

.box-submit {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

/* ===================================================
   Barra de progrés · Sol·licitud de recerca
   Afegeix aquest fitxer al teu tema o a Elementor > Custom CSS
   =================================================== */

/*.block-progress {
    margin-bottom: 2rem;
    padding: 1rem 1.25rem;
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-family: inherit;
}
.block-progress h3 {
	border-bottom: 2px solid var( --e-global-color-astglobalcolor2 );
	padding-bottom: 1rem;
}*/

.cf7-progress {
    margin-bottom: 2rem;
    padding: 1rem 1.25rem;
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-family: inherit;
}

/* Fila superior: títol del pas + comptador */
.cf7p-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 10px;
    gap: 8px;
}

.cf7p-step-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--ast-global-color-2, #111827);
}

.cf7p-counter {
    font-size: 12px;
    color: var(--ast-global-color-2, #111827);
    white-space: nowrap;
    flex-shrink: 0;
}

/* Barra de progrés */
.cf7p-track {
    width: 100%;
    height: 5px;
    background: #efefef;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 8px;
}

.cf7p-fill {
    height: 100%;
    background: var(--e-global-color-astglobalcolor0);
    border-radius: 999px;
    transition: width 0.35s ease;
}

/* Fila inferior: document + apartat */
.cf7p-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.cf7p-section {
    font-size: 12px;
    color: var(--ast-global-color-2, #111827);
}

.cf7p-section b {
    color: var(--e-global-color-astglobalcolor0);
    font-weight: 500;
}

.cf7p-sublabel {
    font-size: 12px;
    color: var(--ast-global-color-2, #111827);
    white-space: nowrap;
}

/* Puntets de subapartats (Doc. 2 i Doc. 3) */
.cf7p-dots {
    display: flex;
    gap: 4px;
    margin-top: 6px;
}

.cf7p-dot {
    height: 4px;
    flex: 1;
    border-radius: 999px;
    background: #efefef;
}

.cf7p-dot--done {
    background: var(--e-global-color-astglobalcolor0);
    opacity: 0.45;
}

.cf7p-dot--active {
    background: var(--e-global-color-astglobalcolor0);
}

/* Responsive */
@media (max-width: 480px) {
    .cf7p-step-title {
        font-size: 13px;
    }

    .cf7p-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }
}

/* Enlaces en el formulario - Doc 5*/
.form-enlace {
    text-decoration: none !important;
}

.fom-enlace:hover {
    color: var(--e-global-color-astglobalcolor0);
    fill: var(--e-global-color-astglobalcolor0);

}

.form-enlace-icon {
    display: flex;
    flex-direction: row;
    gap: 5px;
    justify-content: flex-start;
}

.form-enlace-icon .elementor-button-icon .e-font-icon-svg:hover {
    fill: var(--e-global-color-astglobalcolor0);
}

/* ===================================================
   Formulario Añadir nueva cuenta bancaria
   /templates/mis-datos-tabs/datos-economicos.php
   =================================================== */
.form-alta-cuenta-bancaria {
    padding: 16px;
    background-color: #fff;
    border-radius: 16px;
    margin-top: 24px;
}
