/* ==========================================================================
   Satec Brevo – Subscribe Forms
   Usa CSS custom properties del tema (theme.json de AdB_theme).
   ========================================================================== */

/* --------------------------------------------------------------------------
   Variables locales (fallbacks si el tema no está activo)
   -------------------------------------------------------------------------- */
.satec-brevo-wrapper,
.satec-brevo-job-wrapper,
.satec-brevo-job-card {
    --sb-brand-blue:        var(--wp--preset--color--brand-blue,   #0092BA);
    --sb-brand-blue-hover:  #007a9b;
    --sb-iconografia:       var(--wp--preset--color--iconografia,  #1676fc);
    --sb-fondos-a:          var(--wp--preset--color--fondos-a,     #F1F5F9);
    --sb-fondos-b:          var(--wp--preset--color--fondos-b,     #ffffff);
    --sb-border-light:      var(--wp--preset--color--border-light, #D4DBE4);
    --sb-text-dark:         var(--wp--preset--color--text-dark,    #223138);
    --sb-font-body:         var(--wp--preset--font-family--body,   'Inter', sans-serif);
    --sb-font-heading:      var(--wp--preset--font-family--heading,'Outfit', sans-serif);
    --sb-radius-field:      10px;
    --sb-radius-btn:        8px;
    --sb-radius-pill:       9999px;
}

/* ==========================================================================
   FORMULARIO GLOBAL  [satec_brevo_subscribe]
   ========================================================================== */

.satec-brevo-wrapper {
    background-color: var(--sb-fondos-a);
    border-radius: 8px;
    box-sizing: border-box;
}

.satec-brevo-card {
    border-radius: 8px;
    box-sizing: border-box;
}

.satec-brevo-title {
    font-family: var(--sb-font-heading);
    font-weight: 700;
    font-size: 16px !important;
    margin-top: -8px;
    color: var(--sb-text-dark);
    margin: 0 0 20px 0;
    line-height: 1.3;
}

/* Field wrapper */
.satec-brevo-field {
    margin-bottom: 16px;
}

.satec-brevo-field label {
    display: block;
    font-family: var(--sb-font-body);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--sb-text-dark);
    margin-bottom: 6px;
}

/* Input text / email */
.satec-brevo-field input[type="email"] {
    display: block;
    width: 100%;
    padding: 12px 14px;
    font-family: var(--sb-font-body);
    font-size: 0.9375rem;
    color: var(--sb-text-dark);
    background: #ffffff;
    border: 1px solid var(--sb-border-light);
    border-radius: var(--sb-radius-field);
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.15s ease;
    -webkit-appearance: none;
    appearance: none;
}

.satec-brevo-field input[type="email"]:focus {
    border-color: var(--sb-brand-blue);
    box-shadow: 0 0 0 3px rgba(0, 146, 186, 0.15);
}

/* Input del formulario de oferta (Figma: padding 16/24, radius 10px) */
.satec-brevo-job-field input[type="email"] {
    display: block;
    width: 100%;
    padding: 16px 24px;
    font-family: var(--sb-font-body);
    font-size: 0.875rem;
    color: var(--sb-text-dark);
    background: var(--sb-fondos-b);
    border: 1px solid var(--sb-border-light);
    border-radius: var(--sb-radius-field);
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.15s ease;
    -webkit-appearance: none;
    appearance: none;
}

.satec-brevo-job-field input[type="email"]:focus {
    border-color: var(--sb-iconografia);
    box-shadow: 0 0 0 3px rgba(22, 118, 252, 0.15);
}

/* Select + chevron */
.satec-brevo-select-wrapper {
    position: relative;
}

.satec-brevo-select-wrapper select {
    display: block;
    width: 100%;
    padding: 12px 40px 12px 14px;
    font-family: var(--sb-font-body);
    font-size: 0.9375rem;
    color: var(--sb-text-dark);
    background: #ffffff;
    border: 1px solid var(--sb-border-light);
    border-radius: var(--sb-radius-field);
    outline: none;
    box-sizing: border-box;
    cursor: pointer;
    transition: border-color 0.15s ease;
    -webkit-appearance: none;
    appearance: none;
}

.satec-brevo-select-wrapper select:focus {
    border-color: var(--sb-brand-blue);
    box-shadow: 0 0 0 3px rgba(0, 146, 186, 0.15);
}

/* Chevron icon (CSS-only) */
.satec-brevo-select-wrapper::after {
    content: '';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%) rotate(0deg);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid var(--sb-text-dark);
    pointer-events: none;
    opacity: 0.6;
}

/* Primary CTA button (global form) */
.satec-brevo-btn-primary {
    display: block;
    width: 100%;
    padding: 14px 20px;
    font-family: var(--sb-font-body);
    font-size: 0.9375rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #ffffff !important;
    background: var(--sb-brand-blue);
    border: none;
    border-radius: var(--sb-radius-btn);
    cursor: pointer;
    transition: background 0.2s ease, opacity 0.2s ease;
    margin-top: 20px;
    line-height: 1;
}

.satec-brevo-btn-primary:hover {
    background: var(--sb-brand-blue-hover);
}

.satec-brevo-btn-primary:focus-visible {
    outline: 3px solid var(--sb-brand-blue);
    outline-offset: 2px;
}

/* ==========================================================================
   FORMULARIO POR OFERTA  [satec_brevo_job_subscribe] / auto-inject
   ========================================================================== */

/* Card wrapper */
.satec-brevo-job-card {
    background: var(--sb-fondos-a);
    border: 1px solid var(--sb-iconografia);
    border-radius: 64px;
    padding: 48px;
    margin-top: 40px;
    box-sizing: border-box;
    box-shadow: 0 6px 5px rgba(0, 0, 0, 0.15);
}

/* Label row: círculo campana + «SUSCRÍBETE A LA OFERTA» */
.satec-brevo-job-label-row {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--sb-iconografia);
    margin-bottom: 16px;
}

/* Círculo blanco que envuelve la campana */
.satec-brevo-job-label-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--sb-fondos-b);
    border-radius: 50%;
    flex-shrink: 0;
}

.satec-brevo-job-label-text {
    font-family: var(--sb-font-body);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    line-height: 1;
}

/* Heading principal */
.satec-brevo-job-heading {
    font-family: var(--sb-font-heading);
    font-size: 24px !important;
    font-weight: 700;
    color: var(--sb-text-dark);
    margin: 0 0 12px;
    line-height: 1.33;
}

/* Texto descriptivo */
.satec-brevo-job-desc {
    font-family: var(--sb-font-body);
    font-size: 0.875rem;
    color: var(--sb-text-dark);
    margin: 0 0 4px;
    line-height: 1.625;
}

/* Nota asterisco */
.satec-brevo-job-note {
    font-family: var(--sb-font-body);
    font-size: 0.75rem;
    color: var(--sb-text-dark);
    margin: 0 0 24px;
}

/* Form inline dentro del card (wrapper) */
.satec-brevo-job-card .satec-brevo-form {
    margin-top: 0;
}

.satec-brevo-job-wrapper {
    box-sizing: border-box;
}

.satec-brevo-job-row {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    margin-top: -10px;
}

.satec-brevo-job-field {
    flex: 1 1 0;
    min-width: 0;
}

.satec-brevo-job-field label {
    display: block;
    font-family: var(--sb-font-body);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--sb-text-dark);
    margin-bottom: 6px;
}

/* Pill CTA button (job form) */
.satec-brevo-btn-job {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 0 24px;
    height: 48px;
    font-family: var(--sb-font-body);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #ffffff !important;
    background: var(--sb-brand-blue);
    border: none;
    border-radius: var(--sb-radius-pill);
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: 0 25px 27.5px rgba(37, 56, 70, 0.3);
    transition: background 0.2s ease, box-shadow 0.2s ease;
    line-height: 1;
}

.satec-brevo-btn-job:hover {
    background: var(--sb-brand-blue-hover);
    box-shadow: 0 25px 27.5px rgba(37, 56, 70, 0.45);
}

.satec-brevo-btn-job:focus-visible {
    outline: 3px solid var(--sb-brand-blue);
    outline-offset: 2px;
}

.satec-brevo-btn-job svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* ==========================================================================
   RGPD checkbox (compartido)
   ========================================================================== */

.satec-brevo-rgpd {
    margin-top: 14px;
}

.satec-brevo-rgpd label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    font-family: var(--sb-font-body);
    font-size: 0.8125rem;
    color: var(--sb-text-dark);
    opacity: 0.75;
    line-height: 1.45;
}

.satec-brevo-rgpd input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: var(--sb-brand-blue);
}

.satec-brevo-rgpd a {
    color: var(--sb-brand-blue);
    text-decoration: underline;
}

/* Bloque informativo de protección de datos (siempre visible) */
.satec-brevo-privacy-details {
    margin-top: 10px;
    font-family: var(--sb-font-body);
    font-size: 0.8125rem;
    color: var(--sb-text-dark);
}

.satec-brevo-privacy-title {
    font-weight: 900;
    font-size: 0.8125rem;
    color: 000;
    margin: 0 0 6px;
    padding-top:1.2rem;
}

.satec-brevo-privacy-body {
    margin-top: 10px;
    border-radius: 8px;
    font-size: 0.8125rem;
    line-height: 1.55;
    color: 000;
    opacity: 0.9;
}

.satec-brevo-privacy-body p {
    margin: 0 0 8px;
    padding-bottom: .5rem;
}

.satec-brevo-privacy-body p:last-child {
    margin-bottom: 0;
}

.satec-brevo-privacy-body a {
    color: var(--sb-brand-blue);
    text-decoration: underline;
    word-break: break-all;
}

/* ==========================================================================
   Feedback message
   ========================================================================== */

.satec-brevo-message {
    margin-top: 12px;
    font-family: var(--sb-font-body);
    font-size: 0.875rem;
    min-height: 1.2em;
    line-height: 1.4;
}

.satec-brevo-job-card .satec-brevo-message {
    margin-top: 24px;
}

.satec-brevo-message.success {
    color: #16a34a;
}

.satec-brevo-message.error {
    color: #dc2626;
}

/* Loading state */
.satec-brevo-form.is-loading button[type="submit"] {
    opacity: 0.65;
    pointer-events: none;
    cursor: not-allowed;
}

.job-suscription .gap-20{
    gap: 6rem;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 480px) {
    .satec-brevo-job-row {
        flex-direction: column;
        align-items: stretch;
    }

    .satec-brevo-btn-job {
        justify-content: center;
        border-radius: var(--sb-radius-btn);
        width: 100%;
    }
}
