/**
 * Дополнительные стили для лендинга
 * Основные стили генерируются Tailwind CSS
 */

/* =============================================
   Кастомный скроллбар
   ============================================= */

html {
    scroll-behavior: smooth;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #7A9559;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #627A45;
}

/* Тёмная тема скроллбара */
.dark ::-webkit-scrollbar-track {
    background: #1E1E1E;
}

.dark ::-webkit-scrollbar-thumb {
    background: #7A9559;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #8AB45F;
}

/* =============================================
   Модальные окна
   ============================================= */

.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    max-width: 28rem;
    width: 100%;
    transform: scale(0.9);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
    opacity: 1;
}

.dark .modal-content {
    background: #1E1E1E;
    color: #E0E0E0;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #9CA3AF;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: #374151;
}

.dark .modal-close:hover {
    color: #E0E0E0;
}

/* =============================================
   Уведомления (Toast Notifications)
   ============================================= */

.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast {
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55), opacity 0.3s ease;
    max-width: 22rem;
    border-left: 4px solid #7A9559;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.success {
    border-left-color: #10B981;
}

.toast.error {
    border-left-color: #EF4444;
}

.toast.warning {
    border-left-color: #F59E0B;
}

.toast-icon {
    flex-shrink: 0;
    width: 1.5rem;
    height: 1.5rem;
}

.toast.success .toast-icon {
    color: #10B981;
}

.toast.error .toast-icon {
    color: #EF4444;
}

.toast.warning .toast-icon {
    color: #F59E0B;
}

.toast-message {
    flex: 1;
    font-size: 0.875rem;
    color: #374151;
}

.dark .toast {
    background: #1E1E1E;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.dark .toast-message {
    color: #E0E0E0;
}

/* =============================================
   Honeypot поле (невидимое для пользователей)
   ============================================= */

.honeypot-field {
    position: absolute !important;
    left: -9999px !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* =============================================
   Состояния кнопок форм
   ============================================= */

.btn-loading {
    position: relative;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 1rem;
    height: 1rem;
    top: 50%;
    left: 50%;
    margin-top: -0.5rem;
    margin-left: -0.5rem;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.btn-loading span {
    visibility: hidden;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* =============================================
   Мобильное меню
   ============================================= */

.mobile-menu {
    position: fixed;
    top: 5rem;
    left: 0;
    right: 0;
    background: white;
    padding: 1.5rem;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    z-index: 40;
}

.mobile-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.dark .mobile-menu {
    background: #1E1E1E;
}

.mobile-menu a {
    display: block;
    padding: 0.75rem 0;
    color: #374151;
    font-weight: 500;
    transition: color 0.2s ease;
}

.mobile-menu a:hover {
    color: #7A9559;
}

.dark .mobile-menu a {
    color: #D1D5DB;
}

/* =============================================
   Ошибки валидации форм
   ============================================= */

.form-field-error {
    border-color: #EF4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2) !important;
}

.form-error-message {
    color: #EF4444;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: none;
}

.form-error-message.visible {
    display: block;
}

/* =============================================
   Анимации
   ============================================= */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease forwards;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* =============================================
   Модальное окно записи (Booking Modal)
   ============================================= */

#booking-modal .modal-content {
    position: relative;
    max-width: 32rem;
}

#booking-modal h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-right: 2rem;
}

#booking-modal form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#booking-modal input,
#booking-modal select,
#booking-modal textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #E5E7EB;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#booking-modal input:focus,
#booking-modal select:focus,
#booking-modal textarea:focus {
    outline: none;
    border-color: #7A9559;
    box-shadow: 0 0 0 3px rgba(122, 149, 89, 0.2);
}

.dark #booking-modal input,
.dark #booking-modal select,
.dark #booking-modal textarea {
    background: #121212;
    border-color: #374151;
    color: #E0E0E0;
}

.dark #booking-modal input::placeholder,
.dark #booking-modal select::placeholder,
.dark #booking-modal textarea::placeholder {
    color: #6B7280;
}

#booking-modal button[type="submit"] {
    background: #7A9559;
    color: white;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

#booking-modal button[type="submit"]:hover {
    background: #68804a;
}

#booking-modal button[type="submit"]:active {
    transform: scale(0.98);
}