/* modals.css - Стили для модальных окон */

/* Основной контейнер модального окна */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    overflow: auto;
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    opacity: 1;
}

/* Содержимое модального окна */
.modal-content {
    background: linear-gradient(135deg, #1a2035 0%, #121828 100%);
    padding: 30px;
    width: 90%;
    max-width: 450px;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 199, 44, 0.1);
    color: #fff;
    position: relative;
    animation: modalFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    margin: 0;
    border: 1px solid rgba(255, 199, 44, 0.1);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: scale(1);
}

/* Анимация появления модального окна */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Заголовок модального окна */
.modal-header {
    border-bottom: 2px solid rgba(255, 199, 44, 0.1);
    padding-bottom: 15px;
    margin-bottom: 20px;
    position: relative;
}

.modal-header h2 {
    margin: 0;
    color: #ffc72c;
    font-size: 24px;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(255, 199, 44, 0.2);
}

/* Кнопка закрытия */
.close-btn {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 24px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.3s ease;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.close-btn:hover {
    color: #fff;
    background-color: rgba(255, 199, 44, 0.3);
    transform: rotate(90deg);
}

/* Стили для формы */
.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="date"] {
    width: 100%;
    padding: 12px 15px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 15px;
    transition: all 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="password"]:focus,
.form-group input[type="date"]:focus {
    border-color: rgba(255, 199, 44, 0.5);
    background-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(255, 199, 44, 0.1);
    outline: none;
}

/* Стили для чекбоксов */
.remember-me-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.remember-checkbox {
    display: flex;
    align-items: center;
}

.remember-checkbox input[type="checkbox"] {
    margin-right: 8px;
    accent-color: #ffc72c;
}

.forgot-link a {
    color: #ffc72c;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.forgot-link a:hover {
    color: #fff;
    text-decoration: underline;
}

.terms-checkbox {
    display: flex;
    align-items: flex-start;
}

.terms-checkbox input[type="checkbox"] {
    margin-right: 8px;
    margin-top: 3px;
    accent-color: #ffc72c;
}

.terms-checkbox label {
    font-size: 13px;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.7);
}

.terms-checkbox a {
    color: #ffc72c;
    text-decoration: none;
    transition: color 0.3s;
}

.terms-checkbox a:hover {
    color: #fff;
    text-decoration: underline;
}

/* Кнопка отправки формы */
.btn-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #ffc72c 0%, #f59e0b 100%);
    color: #000;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 199, 44, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 199, 44, 0.4);
}

.btn-submit:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(255, 199, 44, 0.2);
}

.btn-submit:disabled {
    background: linear-gradient(135deg, #8c7430 0%, #6e5a20 100%);
    cursor: not-allowed;
    box-shadow: none;
}

/* Эффект пульсации при нажатии */
.btn-submit::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%, -50%);
    transform-origin: 50% 50%;
}

.btn-submit:active::after {
    animation: ripple 0.6s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0) translate(-50%, -50%);
        opacity: 0.5;
    }
    100% {
        transform: scale(20, 20) translate(-50%, -50%);
        opacity: 0;
    }
}

/* Футер модального окна */
.modal-footer {
    margin-top: 25px;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.modal-footer a {
    color: #ffc72c;
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 500;
}

.modal-footer a:hover {
    color: #fff;
    text-decoration: underline;
}

/* Сообщения об ошибках */
.error-message {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 14px;
    display: none;
    border-left: 3px solid #ef4444;
}

.error-message.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Медиа-запросы для адаптивности */
@media (max-width: 768px) {
    .modal-content {
        padding: 25px;
        width: 95%;
    }

    .modal-header h2 {
        font-size: 22px;
    }

    .form-group input[type="text"],
    .form-group input[type="email"],
    .form-group input[type="password"],
    .form-group input[type="date"] {
        padding: 12px;
        font-size: 14px;
    }

    .btn-submit {
        padding: 12px;
        font-size: 15px;
    }

    .close-btn {
        font-size: 22px;
        right: 15px;
        top: 15px;
        width: 28px;
        height: 28px;
        background-color: rgba(255, 255, 255, 0.15);
    }
}

@media (max-width: 480px) {
    .modal-content {
        padding: 20px;
    }

    .modal-header h2 {
        font-size: 20px;
    }

    .form-group label {
        font-size: 13px;
    }

    .form-group input[type="text"],
    .form-group input[type="email"],
    .form-group input[type="password"],
    .form-group input[type="date"] {
        padding: 10px;
        font-size: 13px;
    }

    .btn-submit {
        padding: 10px;
        font-size: 14px;
    }

    .remember-me-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .forgot-link {
        align-self: flex-end;
    }

    .close-btn {
        font-size: 20px;
        right: 12px;
        top: 12px;
        width: 26px;
        height: 26px;
    }
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

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