.contact-floating-field {
    position: relative;
    min-width: 0;
    --contact-label-left: 0.75rem;

    > input, > select, > textarea, .contact-phone-field input {
        min-height: 3.25rem;
        margin: 0 !important;
        padding-top: 1.25rem;
        padding-bottom: 0.375rem;
        font-size: 0.875rem;
    }

    > textarea { min-height: 7rem; }
    .contact-phone-field { margin: 0; }

    input::placeholder, textarea::placeholder { color: transparent; }

    .contact-floating-label {
        position: absolute;
        top: 1.625rem;
        left: var(--contact-label-left);
        max-width: calc(100% - var(--contact-label-left) - 0.75rem);
        margin: 0;
        overflow: hidden;
        color: #656563;
        font-size: 0.875rem;
        line-height: 1.2;
        text-overflow: ellipsis;
        white-space: nowrap;
        pointer-events: none;
        transform: translateY(-50%);
        transition: top 150ms ease, font-size 150ms ease;
        z-index: 1;
    }

    &:focus-within, &.has-value, &:has(input:autofill), &:has(input:-webkit-autofill) {
        .contact-floating-label { top: 0.625rem; font-size: 0.6875rem; transform: none; }
        .contact-phone-field .iti__selected-country { padding-top: 0.875rem; }
    }

    &:focus-within input[data-contact-phone]::placeholder { color: #909090; }

    &.has-error {
        > input, > select, > textarea, .contact-phone-field input { border-color: #b42318; }
    }

    > input:focus, > select:focus, > textarea:focus, .contact-phone-field input:focus {
        border-color: #223C57;
        box-shadow: 0 0 0 0.125rem rgb(34 60 87 / 18%);
    }

    &:focus-within .contact-floating-label { color: #223C57; }
}

.contact-consent-field input:focus-visible {
    outline: 2px solid #223C57;
    outline-offset: 2px;
    box-shadow: none;
}

.container-form-contato .contact-floating-field { padding: 0; }
.container-form-contato .contact-required-note {
    margin: 0;
    padding: 0;
    color: #656563;
    font-size: 0.75rem;
}

.container-form-contato .contact-form-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
    padding-top: 2.5rem;

    #button-form { margin-top: 0; }

    @media (min-width: 576px) {
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
    }
}
.ricm-whatsapp-floating-lead-conteudo .contact-floating-field {
    margin-bottom: 0.625rem;
    > input { padding-inline: var(--contact-label-left); }
}

.contact-field-error {
    margin: 0.375rem 0 0 !important;
    color: #b42318;
    font-size: 0.75rem;
    line-height: 1.4;
    &[hidden] { display: none; }
}

.ricm-whatsapp-floating-lead-conteudo {
    max-height: calc(100dvh - 6rem);
    overflow-y: auto;
}

@media (prefers-reduced-motion: reduce) {
    .contact-floating-label { transition: none !important; }
}

.contact-form-success {
    display: flex;
    min-height: 24rem;
    padding: 2rem 1rem;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #223C57;
    text-align: center;

    .contact-success-check { width: 7.5rem; height: 7.5rem; margin-bottom: 1.5rem; }
    .contact-success-title { margin: 0 0 0.5rem; font-size: 1.5rem; font-weight: 700; }
    .contact-success-text { margin: 0; font-size: 1rem; }
    @media (prefers-reduced-motion: no-preference) {
        .contact-success-check {
            animation: contact-success-pop 400ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
        }
        .contact-success-check path {
            stroke-dasharray: 1;
            animation: contact-success-draw 500ms 250ms cubic-bezier(0.333333, 1, 0.666667, 1) both;
        }
        p {
            animation: contact-success-text 400ms 650ms cubic-bezier(0.333333, 0.666667, 0.666667, 1) both;
        }
        .contact-success-text { animation-delay: 770ms; }
    }

    &:focus { outline: none; }
}

@keyframes contact-success-pop {
    from { opacity: 0; transform: scale(0.7); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes contact-success-draw {
    from { stroke-dashoffset: 1; }
    to { stroke-dashoffset: 0; }
}

@keyframes contact-success-text {
    from { opacity: 0; transform: translateY(0.75rem); }
    to { opacity: 1; transform: translateY(0); }
}
