/* Стили для уведомлений контактной формы */
.alert-container {
    position: relative;
    margin-top: 1rem;
}

.alert {
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-weight: 500;
    animation: slideIn 0.3s ease-out;
    position: relative;
    display: flex;
    align-items: center;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-success::before {
    content: "✓";
    display: inline-block;
    width: 24px;
    height: 24px;
    background-color: #10b981;
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 24px;
    margin-right: 12px;
    font-weight: bold;
}

.alert-danger {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-danger::before {
    content: "✕";
    display: inline-block;
    width: 24px;
    height: 24px;
    background-color: #ef4444;
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 24px;
    margin-right: 12px;
    font-weight: bold;
}

/* Кнопка отправки в состоянии загрузки */
#cf-submit.loading {
    position: relative;
    color: transparent;
}

#cf-submit.loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.8s linear infinite;
}

@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}

/* Стили для полей с ошибками */
.cf-error {
    border-color: #ef4444 !important;
    animation: shake 0.3s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Успешная отправка - анимация формы */
#contact-form.success {
    animation: fadeOut 0.5s ease-out forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0.5;
        transform: scale(0.98);
    }
} 