/* =====================================================
   "HABLA CON UN EXPERTO" — LEAD CAPTURE MODAL
   Same visual language as powerbim-tipologias's .pwb-caso__modal-* (itself
   copied from powerbim-roi's .pwb-roi__modal-*), duplicated under its own
   pwb-experto__ prefix — this theme code can't depend on either plugin's
   stylesheet being loaded.
   ===================================================== */

.pwb-experto__btn {
    display: inline-flex;
    align-items: center;
    gap: var(--wp--preset--spacing--px-8);
    padding: var(--wp--preset--spacing--px-8) var(--wp--preset--spacing--px-24);
    border-radius: var(--wp--custom--radius--sm);
    font-family: var(--wp--preset--font-family--inter);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5;
    cursor: pointer;
    border: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    text-decoration: none;
}

.pwb-experto__btn:disabled {
    opacity: 0.35;
    cursor: default;
}

.pwb-experto__btn:active:not(:disabled) {
    transform: scale(0.98);
}

.pwb-experto__btn--primary {
    background: var(--wp--preset--color--custom-pwb-primary-color);
    color: var(--wp--preset--color--custom-pwb-dark-navy-accent);
}

.pwb-experto__btn--primary:hover:not(:disabled) {
    opacity: 0.8;
}

.pwb-experto__btn--ghost {
    background: transparent;
    color: rgba(255, 255, 255, 0.55);
    font-weight: 500;
}

.pwb-experto__btn--ghost:hover {
    color: var(--wp--custom--color--white);
}

.pwb-experto__modal-overlay {
    position: fixed;
    inset: 0;
    z-index: var(--wp--custom--z-index--modal, 9999);
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    padding: var(--wp--preset--spacing--px-20);
    box-sizing: border-box;
}

.pwb-experto__modal {
    background: var(--wp--preset--color--custom-pwb-secondary-background);
    border: 1px solid var(--wp--custom--color--border);
    border-radius: var(--wp--custom--radius--2-xl);
    padding: var(--wp--preset--spacing--px-32);
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    max-height: 90dvh;
    overflow-y: auto;
    box-shadow: var(--wp--preset--shadow--pwb-modal);
}

.pwb-experto__modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--wp--preset--spacing--px-16);
}

.pwb-experto__modal-title {
    font-family: var(--wp--preset--font-family--sora);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--wp--custom--color--text);
}

.pwb-experto__modal-close {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--wp--custom--color--text-muted);
    font-size: 1rem;
    padding: var(--wp--preset--spacing--px-4);
    line-height: 1;
    transition: color 0.15s;
}

.pwb-experto__modal-close:hover {
    color: var(--wp--custom--color--text);
}

.pwb-experto__modal-intro {
    font-size: 0.8125rem;
    color: var(--wp--custom--color--text-soft);
    line-height: 1.5;
    margin: 0 0 var(--wp--preset--spacing--px-20);
}

.pwb-experto__modal-body {
    margin-bottom: var(--wp--preset--spacing--px-24);
}

.pwb-experto__modal-form {
    display: flex;
    flex-direction: column;
    gap: var(--wp--preset--spacing--px-16);
}

.pwb-experto__modal-field {
    display: flex;
    flex-direction: column;
    gap: var(--wp--preset--spacing--px-6);
}

.pwb-experto__modal-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--wp--custom--color--text-soft);
}

.pwb-experto__modal-optional {
    font-weight: 400;
    color: var(--wp--custom--color--text-muted);
}

.pwb-experto__modal-input {
    background: var(--wp--preset--color--custom-pwb-main-background);
    border: 1.5px solid var(--wp--custom--color--border);
    border-radius: var(--wp--custom--radius--md-plus);
    padding: var(--wp--preset--spacing--px-10) var(--wp--preset--spacing--px-14);
    font-family: var(--wp--preset--font-family--inter);
    font-size: 0.9375rem;
    color: var(--wp--custom--color--text);
    outline: none;
    transition: border-color 0.15s;
}

.pwb-experto__modal-textarea {
    resize: vertical;
    font-family: inherit;
    min-height: 96px;
}

.pwb-experto__modal-input::placeholder {
    color: #4A5060;
}

.pwb-experto__modal-input:focus {
    border-color: var(--wp--preset--color--custom-pwb-primary-color);
}

.pwb-experto__modal-input--error {
    border-color: var(--wp--custom--color--danger);
}

.pwb-experto__modal-input--error:focus {
    border-color: var(--wp--custom--color--danger);
}

.pwb-experto__modal-hint {
    font-size: 0.75rem;
    color: var(--wp--custom--color--text-muted);
}

.pwb-experto__modal-hint--error {
    color: var(--wp--custom--color--danger);
}

.pwb-experto__modal-checkbox-field {
    display: flex;
    align-items: flex-start;
    gap: var(--wp--preset--spacing--px-10);
    cursor: pointer;
}

.pwb-experto__modal-field + .pwb-experto__modal-checkbox-field {
    margin-top: var(--wp--preset--spacing--px-4);
}

.pwb-experto__modal-checkbox {
    margin-top: var(--wp--preset--spacing--px-2);
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    accent-color: var(--wp--preset--color--custom-pwb-primary-color);
    cursor: pointer;
}

.pwb-experto__modal-checkbox-label {
    font-size: 0.75rem;
    line-height: 1.5;
    color: var(--wp--custom--color--text-soft);
}

.pwb-experto__modal-actions {
    display: flex;
    gap: var(--wp--preset--spacing--px-10);
    justify-content: flex-end;
    flex-wrap: wrap;
}

.pwb-experto__modal-thanks {
    text-align: center;
    padding: var(--wp--preset--spacing--px-24) 0;
}

.pwb-experto__modal-thanks-icon {
    font-size: 2.25rem;
    margin-bottom: var(--wp--preset--spacing--px-12);
    color: var(--wp--preset--color--custom-pwb-primary-color);
}

.pwb-experto__modal-thanks-title {
    font-weight: 700;
    font-size: 1rem;
    color: var(--wp--custom--color--text);
    margin-bottom: var(--wp--preset--spacing--px-6);
}

.pwb-experto__modal-thanks-text {
    font-size: 0.8125rem;
    color: var(--wp--custom--color--text-soft);
    line-height: 1.5;
}

/* Same fix as the other two modals: fields stacked in a single 420px-wide
   column made this taller than needed on desktop. Widening the modal and
   pairing fields two-per-row on non-mobile viewports shortens it. */
@media (min-width: 640px) {
    .pwb-experto__modal {
        max-width: 640px;
    }

    .pwb-experto__modal-form {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: var(--wp--preset--spacing--px-16) var(--wp--preset--spacing--px-20);
    }

    .pwb-experto__modal-field--full,
    .pwb-experto__modal-checkbox-field,
    .pwb-experto__modal-hint--error,
    .pwb-experto__modal-actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 420px) {
    .pwb-experto__modal-actions {
        flex-direction: column;
    }

    .pwb-experto__modal-actions .pwb-experto__btn {
        width: 100%;
        justify-content: center;
    }
}

/* =====================================================
   Newsletter subscription modal
   Same visual language as .pwb-experto__modal (overlay, card, inputs,
   buttons), duplicated under its own prefix rather than shared classes —
   same convention already used per-CTA (experto, ROI, casos de éxito).
   Single field, no desktop two-column grid needed. */

.pwb-newsletter__modal-overlay {
    position: fixed;
    inset: 0;
    z-index: var(--wp--custom--z-index--modal, 9999);
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    padding: var(--wp--preset--spacing--px-20);
    box-sizing: border-box;
}

.pwb-newsletter__modal {
    background: var(--wp--preset--color--custom-pwb-secondary-background);
    border: 1px solid var(--wp--custom--color--border);
    border-radius: var(--wp--custom--radius--2-xl);
    padding: var(--wp--preset--spacing--px-32);
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    max-height: 90dvh;
    overflow-y: auto;
    box-shadow: var(--wp--preset--shadow--pwb-modal);
}

.pwb-newsletter__modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--wp--preset--spacing--px-16);
}

.pwb-newsletter__modal-title {
    font-family: var(--wp--preset--font-family--sora);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--wp--custom--color--text);
}

.pwb-newsletter__modal-close {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--wp--custom--color--text-muted);
    font-size: 1rem;
    padding: var(--wp--preset--spacing--px-4);
    line-height: 1;
    transition: color 0.15s;
}

.pwb-newsletter__modal-close:hover {
    color: var(--wp--custom--color--text);
}

.pwb-newsletter__modal-intro {
    font-size: 0.8125rem;
    color: var(--wp--custom--color--text-soft);
    line-height: 1.5;
    margin: 0 0 var(--wp--preset--spacing--px-20);
}

.pwb-newsletter__modal-body {
    margin-bottom: var(--wp--preset--spacing--px-24);
}

.pwb-newsletter__modal-form {
    display: flex;
    flex-direction: column;
    gap: var(--wp--preset--spacing--px-16);
}

.pwb-newsletter__modal-field {
    display: flex;
    flex-direction: column;
    gap: var(--wp--preset--spacing--px-6);
}

.pwb-newsletter__modal-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--wp--custom--color--text-soft);
}

.pwb-newsletter__modal-input {
    background: var(--wp--preset--color--custom-pwb-main-background);
    border: 1.5px solid var(--wp--custom--color--border);
    border-radius: var(--wp--custom--radius--md-plus);
    padding: var(--wp--preset--spacing--px-10) var(--wp--preset--spacing--px-14);
    font-family: var(--wp--preset--font-family--inter);
    font-size: 0.9375rem;
    color: var(--wp--custom--color--text);
    outline: none;
    transition: border-color 0.15s;
}

.pwb-newsletter__modal-input::placeholder {
    color: #4A5060;
}

.pwb-newsletter__modal-input:focus {
    border-color: var(--wp--preset--color--custom-pwb-primary-color);
}

.pwb-newsletter__modal-input--error {
    border-color: var(--wp--custom--color--danger);
}

.pwb-newsletter__modal-hint {
    font-size: 0.75rem;
    color: var(--wp--custom--color--text-muted);
}

.pwb-newsletter__modal-hint--error {
    color: var(--wp--custom--color--danger);
}

.pwb-newsletter__modal-checkbox-field {
    display: flex;
    align-items: flex-start;
    gap: var(--wp--preset--spacing--px-10);
    cursor: pointer;
}

.pwb-newsletter__modal-field + .pwb-newsletter__modal-checkbox-field {
    margin-top: var(--wp--preset--spacing--px-4);
}

.pwb-newsletter__modal-checkbox {
    margin-top: var(--wp--preset--spacing--px-2);
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    accent-color: var(--wp--preset--color--custom-pwb-primary-color);
    cursor: pointer;
}

.pwb-newsletter__modal-checkbox-label {
    font-size: 0.75rem;
    line-height: 1.5;
    color: var(--wp--custom--color--text-soft);
}

.pwb-newsletter__modal-actions {
    display: flex;
    gap: var(--wp--preset--spacing--px-10);
    justify-content: flex-end;
    flex-wrap: wrap;
}

.pwb-newsletter__modal-thanks {
    text-align: center;
    padding: var(--wp--preset--spacing--px-24) 0;
}

.pwb-newsletter__modal-thanks-icon {
    font-size: 2.25rem;
    margin-bottom: var(--wp--preset--spacing--px-12);
    color: var(--wp--preset--color--custom-pwb-primary-color);
}

.pwb-newsletter__modal-thanks-title {
    font-weight: 700;
    font-size: 1rem;
    color: var(--wp--custom--color--text);
    margin-bottom: var(--wp--preset--spacing--px-6);
}

.pwb-newsletter__modal-thanks-text {
    font-size: 0.8125rem;
    color: var(--wp--custom--color--text-soft);
    line-height: 1.5;
}

.pwb-newsletter__btn {
    display: inline-flex;
    align-items: center;
    gap: var(--wp--preset--spacing--px-8);
    padding: var(--wp--preset--spacing--px-8) var(--wp--preset--spacing--px-24);
    border-radius: var(--wp--custom--radius--sm);
    font-family: var(--wp--preset--font-family--inter);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5;
    cursor: pointer;
    border: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    text-decoration: none;
}

.pwb-newsletter__btn:disabled {
    opacity: 0.35;
    cursor: default;
}

.pwb-newsletter__btn:active:not(:disabled) {
    transform: scale(0.98);
}

.pwb-newsletter__btn--primary {
    background: var(--wp--preset--color--custom-pwb-primary-color);
    color: var(--wp--preset--color--custom-pwb-dark-navy-accent);
}

.pwb-newsletter__btn--primary:hover:not(:disabled) {
    opacity: 0.8;
}

.pwb-newsletter__btn--ghost {
    background: transparent;
    color: rgba(255, 255, 255, 0.55);
    font-weight: 500;
}

.pwb-newsletter__btn--ghost:hover {
    color: var(--wp--custom--color--white);
}

@media (max-width: 420px) {
    .pwb-newsletter__modal-actions {
        flex-direction: column;
    }

    .pwb-newsletter__modal-actions .pwb-newsletter__btn {
        width: 100%;
        justify-content: center;
    }
}
