/* RHF Bulk Email — Frontend signup & unsubscribe */

/* Standalone signup card (when shortcode is used outside .newsletter-box) */
.rhf-be-signup-wrap {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--spacing-xxl, 64px);
    background: linear-gradient(135deg, var(--brand-primary, #262262) 0%, var(--brand-secondary, #4A4480) 100%);
    border-radius: var(--radius-lg, 12px);
    color: var(--white, #ffffff);
    box-shadow: var(--shadow-md, 0 4px 8px rgba(0, 0, 0, 0.12));
}

/* Inside theme newsletter section — wrapper is transparent, box provides the card */
.newsletter-box .rhf-be-signup-wrap {
    max-width: none;
    margin: 0;
    padding: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}

.rhf-be-signup-form {
    width: 100%;
}

.rhf-be-signup-fields {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: center;
    gap: var(--spacing-md, 24px);
    margin-top: var(--spacing-lg, 32px);
}

.newsletter-box .rhf-be-signup-fields {
    margin-top: var(--spacing-lg, 32px);
}

.rhf-be-signup-wrap:not(.newsletter-box *) .rhf-be-signup-fields:first-child,
.rhf-be-signup-wrap > .rhf-be-signup-form > .rhf-be-signup-fields {
    margin-top: 0;
}

.rhf-be-signup-field {
    flex: 1 1 0;
    min-width: 0;
    max-width: 250px;
    display: flex;
    flex-direction: column;
}

.rhf-be-signup-field--submit {
    flex: 0 0 auto;
    max-width: none;
    justify-content: flex-end;
}

.rhf-be-signup-name,
.rhf-be-signup-email {
    width: 100%;
    box-sizing: border-box;
    padding: var(--spacing-sm, 16px) var(--spacing-md, 24px);
    border: 2px solid transparent;
    border-radius: var(--radius-md, 8px);
    background-color: var(--white, #ffffff);
    font-family: var(--font-primary, inherit);
    font-size: 16px;
    line-height: 1.4;
    color: var(--text-primary, #262262);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.rhf-be-signup-name::placeholder,
.rhf-be-signup-email::placeholder {
    color: var(--text-light, #999999);
}

.rhf-be-signup-name:focus,
.rhf-be-signup-email:focus {
    outline: none;
    border-color: var(--brand-accent, #FF8C42);
    box-shadow: 0 0 0 3px rgba(255, 140, 66, 0.25);
}

.rhf-be-signup-submit {
    width: 100%;
    height: 100%;
    min-height: 52px;
    padding: var(--spacing-sm, 16px) var(--spacing-lg, 32px);
    border: none;
    border-radius: var(--radius-md, 8px);
    background-color: var(--brand-accent, #FF8C42);
    color: var(--white, #ffffff);
    font-family: var(--font-primary, inherit);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.15s ease;
}

.rhf-be-signup-submit:hover {
    background-color: #E67A30;
}

.rhf-be-signup-submit:active {
    transform: translateY(1px);
}

.rhf-be-signup-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

.rhf-be-signup-consent {
    margin-top: var(--spacing-md, 24px);
    text-align: center;
}

.rhf-be-signup-consent label {
    display: inline-flex;
    align-items: flex-start;
    justify-content: center;
    gap: var(--spacing-sm, 16px);
    max-width: 560px;
    margin: 0 auto;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.5;
    color: var(--white, #ffffff);
    opacity: 0.95;
    text-align: left;
}

.rhf-be-signup-consent input[type="checkbox"] {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--brand-accent, #FF8C42);
    cursor: pointer;
}

.rhf-be-signup-consent span {
    flex: 1;
}

.rhf-be-signup-message {
    margin-top: var(--spacing-sm, 16px);
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--white, #ffffff);
}

.rhf-be-signup-message.is-error {
    color: #ffb4b4;
}

.rhf-be-signup-message.is-success {
    color: #b8f0bc;
}

/* Unsubscribe page */
.rhf-be-unsubscribe-page {
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.rhf-be-unsubscribe-box {
    max-width: 480px;
    background: var(--white, #ffffff);
    border: 1px solid var(--border-color, #E5E5E5);
    border-radius: var(--radius-lg, 12px);
    padding: 40px;
    text-align: center;
    box-shadow: var(--shadow-md, 0 4px 8px rgba(0, 0, 0, 0.12));
}

.rhf-be-unsubscribe-box h1 {
    color: var(--brand-primary, #262262);
    margin-bottom: var(--spacing-sm, 16px);
}

.rhf-be-btn {
    display: inline-block;
    padding: 12px 24px;
    background: var(--brand-primary, #262262);
    color: var(--white, #ffffff) !important;
    text-decoration: none;
    border-radius: var(--radius-md, 8px);
    font-weight: 600;
}

.rhf-be-btn:hover {
    background: var(--brand-secondary, #4A4480);
}

@media (max-width: 768px) {
    .rhf-be-signup-wrap {
        padding: var(--spacing-lg, 32px) var(--spacing-md, 24px);
    }

    .rhf-be-signup-fields {
        flex-direction: column;
        align-items: stretch;
        gap: var(--spacing-sm, 16px);
    }

    .rhf-be-signup-field,
    .rhf-be-signup-field--submit {
        max-width: none;
        width: 100%;
    }

    .rhf-be-signup-submit {
        min-height: 48px;
        width: 100%;
    }

    .rhf-be-signup-consent label {
        font-size: 13px;
    }
}
