
@tailwind base;
@tailwind components;
@tailwind utilities;

/* Основные настройки для фиксации высоты на мобильных */
html, body {
    height: 100%;
    height: 100dvh; /* Dynamic Viewport Height для мобильных */
    overflow: hidden; /* Важно: отключаем скролл всей страницы */
    overscroll-behavior: none; /* Отключаем "резинку" на iOS */
}

.bg-login-pattern { background-image: linear-gradient(rgba(0,0,0,0.8), rgba(0,0,0,0.9)), url('https://images.unsplash.com/photo-1605218427306-022ba8c26309?q=80&w=2070'); }
.auth-input { width: 100%; background-color: #18181b; border: 1px solid #27272a; border-radius: 0.75rem; padding: 0.85rem 1rem; color: white; outline: none; transition: 0.2s; }
.auth-input:focus { border-color: #ea580c; }
.form-input { width: 100%; background-color: #27272a; border: 1px solid #3f3f46; border-radius: 0.5rem; padding: 0.75rem; color: white; outline: none; }
.form-input:focus { border-color: #f97316; }
.filter-btn { padding: 0.5rem 1.25rem; background-color: #27272a; border-radius: 9999px; font-size: 0.85rem; font-weight: 600; color: #a1a1aa; transition: 0.2s; }
.filter-btn:hover { color: white; background-color: #3f3f46; }
.filter-btn.active { background-color: rgba(249, 115, 22, 0.15); color: #f97316; border: 1px solid #f97316; }

.scrollbar-hide::-webkit-scrollbar { display: none; }
.scrollbar-thin::-webkit-scrollbar { width: 4px; }
.scrollbar-thin::-webkit-scrollbar-track { background: transparent; }
.scrollbar-thin::-webkit-scrollbar-thumb { background: #3f3f46; border-radius: 10px; }

/* Анимации */
.animate-fade-in { animation: fadeIn 0.3s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

.animate-toast-in { animation: toastIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
@keyframes toastIn { from { opacity: 0; transform: translateX(100%); } to { opacity: 1; transform: translateX(0); } }

.animate-toast-out { animation: toastOut 0.3s ease-in forwards; }
@keyframes toastOut { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(100%); } }

.loader { width: 28px; height: 28px; border: 3px solid #FFF; border-bottom-color: #f97316; border-radius: 50%; display: inline-block; animation: rotation 1s linear infinite; margin: 20px auto; }
@keyframes rotation { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Lightbox */
.lightbox-img { max-height: 90vh; max-width: 90vw; transition: transform 0.2s; }

.star-active { color: #eab308; }

/* Мобильный чат: Скрываем список контактов, когда чат активен */
@media (max-width: 768px) {
    .chat-active #chat-contacts-panel { display: none; }
    /* Панель активного чата становится на весь экран поверх навигации */
    .chat-active #chat-active-panel { 
        display: flex !important;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 50;
        background-color: #09090b; /* zinc-950 */
        height: 100dvh;
    }
}