/* ========================================
   ESTIMATE / CONTACT FORM
   Shared styles for the .mte-form template part. Works in both the
   light (page-contact) and dark (cta-banner) contexts — the parent
   wrapper (.contact-form / .cta__form) supplies the color theme,
   these rules just handle interactive states unique to the form
   submission flow (errors, loading, success).
   ======================================== */

/* Visually-hidden honeypot — must not be display:none or some bots
   skip it (which is the point — we want them to fill it). */
.mte-form__hp {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

/* Required-field asterisk in dark-theme forms (cta-banner). */
.cta__form .form-group label .required {
    color: #f29191;
    margin-left: 2px;
}

/* Error message helper — hidden by default, shown via JS. */
.mte-form .error-message {
    font-size: 0.75rem;
    color: #e53e3e;
    margin-top: 0.3rem;
    display: none;
}
.mte-form .error-message.show { display: block; }

/* On the dark CTA banner, brighten the error text so it reads. */
.cta__form .mte-form .error-message {
    color: #ffb4b4;
}

/* Highlight an errored input. */
.mte-form input.error,
.mte-form select.error,
.mte-form textarea.error {
    border-color: #e53e3e !important;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.15);
}

/* Submit button busy state. */
.mte-form__submit.is-loading {
    opacity: 0.7;
    cursor: progress;
}
.mte-form__submit[disabled] {
    pointer-events: none;
}

/* Status line (under the form). */
.mte-form__status {
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 0.5rem 0;
    min-height: 0;
    transition: color 0.2s;
}
.mte-form__status:empty { display: none; }
.mte-form__status.is-error {
    color: #c53030;
    background: rgba(229, 62, 62, 0.08);
    border-left: 3px solid #e53e3e;
    padding: 0.65rem 0.85rem;
    border-radius: var(--radius-sm);
}
.cta__form .mte-form__status.is-error {
    color: #ffb4b4;
    background: rgba(229, 62, 62, 0.18);
}

/* Success replacement panel — replaces the entire <form>. */
.mte-form__success {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    background: var(--green-wash, #ecf6ef);
    border: 1px solid var(--green-pale, #c8e3d2);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    color: var(--slate, #1d1d1f);
    animation: mteFormSuccessIn 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.mte-form__success svg {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    color: var(--green, #1a7a3d);
}
.mte-form__success-text {
    font-size: 0.95rem;
    line-height: 1.55;
}

/* On the dark CTA banner background, swap to a lighter palette so it
   reads against the deep slate. */
.cta__form .mte-form__success {
    background: rgba(38, 154, 77, 0.18);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--white, #fff);
}
.cta__form .mte-form__success svg {
    color: #7be0a4;
}

@keyframes mteFormSuccessIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hide the .show / .has-error states on the inline contact form
   that previously used these helpers — no-op when not present. */
