/*
 * The SGP platform's lead form ([sgp_lead_form], printed by the
 * sgp-connector plugin and wrapped by rgm_sgp_lead_form() in functions.php).
 * It replaced the GoHighLevel forms in 2026-11 (SGP-64) and wears their card:
 * a light lavender panel, white fields, the gold button. The form ships class
 * hooks only (bpa-*), no inline styles, so everything visual lives here.
 * Every rule sits under .sgp-form at two classes or more, which beats the
 * contact page's ".contact-content span" and ".contact-content p" rules.
 */
.sgp-form {
    background: #F5F1FC;
    border: 1px solid #ECE6F7;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(28, 28, 28, 0.06);
    padding: 32px;
    text-align: left;
}

.sgp-form .bpa-lead-form {
    display: grid;
    gap: 18px;
    margin: 0;
    font-family: "Poppins-Regular";
}

.sgp-form .bpa-field {
    display: block;
    margin: 0;
}

.sgp-form .bpa-label {
    display: block;
    width: auto;
    margin: 0 0 6px;
    color: #1C1C1C;
    font-family: "Poppins-SemiBold";
    font-size: 14px;
    line-height: 1.4;
}

.sgp-form .bpa-input {
    display: block;
    width: 100%;
    height: 50px;
    margin: 0;
    border: 1px solid #D0D5DD;
    border-radius: 10px;
    background: #fff;
    padding: 12px 16px;
    color: #1C1C1C;
    font-family: "Poppins-Regular";
    font-size: 16px;
    line-height: 1.5;
    box-shadow: none;
}

.sgp-form textarea.bpa-input {
    height: 120px;
    resize: vertical;
}

.sgp-form select.bpa-input {
    padding-top: 0;
    padding-bottom: 0;
    cursor: pointer;
}

.sgp-form .bpa-input:focus {
    border-color: #A08D58;
    outline: 2px solid rgba(160, 141, 88, 0.35);
    outline-offset: 1px;
}

.sgp-form .bpa-extra {
    gap: 18px;
}

.sgp-form .bpa-consent {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin: 0;
    color: #3A3A3C;
    font-size: 13px;
    line-height: 1.5;
    cursor: pointer;
}

.sgp-form .bpa-consent span {
    display: inline;
    width: auto;
    color: inherit;
    font-family: "Poppins-Regular";
    font-size: 13px;
    line-height: 1.5;
}

.sgp-form .bpa-consent input {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    margin: 3px 0 0;
    accent-color: #A08D58;
}

.sgp-form .bpa-fineprint {
    display: block;
    margin: 0;
    color: #626265;
    font-size: 12px;
    line-height: 1.5;
}

.sgp-form .bpa-fineprint a {
    color: inherit;
    font-size: 12px;
    text-decoration: underline;
}

.sgp-form .bpa-submit {
    display: block;
    width: 100%;
    margin: 0;
    border: none;
    border-radius: 10px;
    background: #A08D58;
    color: #fff;
    padding: 15px 20px;
    font-family: "Poppins-SemiBold";
    font-size: 16px;
    line-height: 1.5;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.sgp-form .bpa-submit:hover,
.sgp-form .bpa-submit:focus-visible {
    background: #8A7848;
}

.sgp-form .bpa-submit:disabled {
    opacity: 0.7;
    cursor: wait;
}

.sgp-form .bpa-success,
.sgp-form .bpa-error {
    display: block;
    margin: 0;
    color: #1C1C1C;
    font-family: "Poppins-SemiBold";
    font-size: 16px;
    line-height: 1.5;
    text-align: center;
}

.sgp-form .bpa-error {
    border-radius: 8px;
    background: #FDECEC;
    color: #8A1C1C;
    padding: 10px;
}

/* The script shows these by dropping [hidden]; the theme's
   ".contact-content p { display: flex }" must not show them early. */
.sgp-form .bpa-success[hidden],
.sgp-form .bpa-error[hidden] {
    display: none;
}

/* The search page's and the Finances template's gold box (.form-contact)
   is the card already: the form sits on it in white. */
.sgp-form.sgp-form--on-gold {
    background: none;
    border: 0;
    box-shadow: none;
    padding: 0;
}

.sgp-form--on-gold .bpa-label,
.sgp-form--on-gold .bpa-consent,
.sgp-form--on-gold .bpa-fineprint,
.sgp-form--on-gold .bpa-success {
    color: #fff;
}

.sgp-form--on-gold .bpa-submit {
    background: #1C1C1C;
}

.sgp-form--on-gold .bpa-submit:hover,
.sgp-form--on-gold .bpa-submit:focus-visible {
    background: #000;
}

@media (max-width: 767px) {
    .sgp-form {
        padding: 22px 18px;
    }
}
