.custom-field-error {
    position: relative;
    animation: errorShake 0.5s ease-in-out;
}

.custom-field-error .elementor-field {
    border: 2px solid #e74c3c !important;
    box-shadow: 0 0 8px rgba(231, 76, 60, 0.4) !important;
    background-color: rgba(231, 76, 60, 0.05) !important;
}

.custom-error-message {
    display: block;
    margin-top: 5px;
    background: #e74c3c;
    color: white;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
    position: relative;
    z-index: 1000;
}

.custom-error-message::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 10px;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 4px solid #e74c3c;
}

@keyframes errorShake {

    0%,
    20%,
    40%,
    60%,
    80% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }
}

/* Assicurati che i messaggi siano visibili */
.elementor-field-group {
    position: relative !important;
}