﻿/* Стили для сообщений форм */
.form-message {
    padding: 15px;
    border-radius: var(--radius);
    margin: 15px 0;
    font-weight: 500;
    animation: slideIn 0.3s ease;
}

.form-message--success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.form-message--error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.form-message .message-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-message svg {
    flex-shrink: 0;
}

/* Стили для полей с ошибками */
.form-group.error input,
.form-group.error textarea {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.form-group.error .error-message {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 5px;
}

/* Анимация */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Индикатор загрузки */
.btn--loading {
    position: relative;
    color: transparent !important;
}

.btn--loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Модальные окна и overlay */
.modal,
.modal-overlay {
    display: none; /* по умолчанию скрыты */
    opacity: 0;
    transition: all 0.3s ease;
}
.modal.active,
.modal-overlay.active {
    display: flex;
    opacity: 1;
}
.modal {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(1);
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    width: 90%;
    max-width: 500px;
    z-index: 2001;
    box-shadow: var(--shadow-lg);
}
.modal__close {
    position: absolute;
    top: 1rem; right: 1rem;
    font-size: 2rem; line-height: 1;
    color: var(--color-text-light);
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}
.modal__close:hover {
    color: var(--color-text)