/* ==================== TILDA SMART SYSTEM - ПРЕМИУМ СТИЛИ POPUP ==================== */
/* 🎨 ПРЕМИУМ ДИЗАЙН | АНИМАЦИИ | ГРАДИЕНТЫ | MODERN DESIGN */
/* ========================================================================== */

:root {
  /* 🌈 ОСНОВНАЯ ЦВЕТОВАЯ ПАЛИТРА */
  --primary-500: #667eea;
  --primary-600: #5a6fd8;
  --primary-400: #8fa1f0;
  --primary-50: #f0f4ff;
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-primary-hover: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
  
  /* 🎯 АКЦЕНТНЫЕ ЦВЕТА */
  --accent-orange: #f59e0b;
  --accent-teal: #06b6d4;
  --accent-emerald: #10b981;
  --accent-rose: #f43f5e;
  
  /* ⚫ НЕЙТРАЛЬНЫЕ ЦВЕТА */
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  
  --white: #ffffff;
  --black: #000000;
  
  /* 🎨 ЦВЕТА ДЛЯ КАРТОЧЕК СЕГМЕНТОВ */
  --hotel-bg: linear-gradient(135deg, #667eea 0%, #8b5cf6 100%);
  --apartments-bg: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
  --business-bg: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
  --home-bg: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --notsure-bg: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
  
  /* 🎯 ТИПОГРАФИКА */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --heading-size: 2rem;
  --heading-weight: 700;
  --subtitle-size: 1.125rem;
  --title-size: 1.25rem;
  --desc-size: 0.875rem;
  
  /* 📐 РАЗМЕРЫ И ОТСТУПЫ */
  --overlay-zindex: 10000;
  --modal-max-width: 480px;
  --modal-width: 95%;
  --header-padding: 2.5rem 2rem 1.5rem;
  --content-padding: 1.5rem;
  --option-padding: 1.25rem;
  --option-margin: 0.75rem;
  --icon-size: 3rem;
  
  /* 🎪 ЭФФЕКТЫ */
  --border-radius: 1.5rem;
  --option-radius: 1rem;
  --icon-radius: 0.75rem;
  --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --shadow-xl: 0 35px 60px -12px rgba(0, 0, 0, 0.3);
  --shadow-primary: 0 10px 30px rgba(102, 126, 234, 0.2);
  --blur: blur(20px);
  
  /* ⚡ АНИМАЦИИ */
  --duration: 0.3s;
  --easing: cubic-bezier(0.4, 0, 0.2, 1);
}

/* 🎯 ОСНОВНЫЕ СТИЛИ POPUP */
.tilda-smart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  z-index: var(--overlay-zindex);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all var(--duration) var(--easing);
  font-family: var(--font-family);
  padding: 1rem;
  box-sizing: border-box;
}

.tilda-smart-overlay * {
  box-sizing: border-box;
}

.tilda-smart-modal {
  background: var(--white);
  border-radius: var(--border-radius);
  padding: 0;
  max-width: var(--modal-max-width);
  width: var(--modal-width);
  max-height: 90vh;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  transform: scale(0.9) translateY(20px);
  opacity: 0;
  transition: all var(--duration) var(--easing);
  position: relative;
  border: 1px solid var(--gray-100);
}

/* 🎪 ЗАГОЛОВОК С ГРАДИЕНТОМ */
.tilda-smart-header {
  padding: var(--header-padding);
  text-align: center;
  background: var(--gradient-primary);
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.tilda-smart-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { transform: translateX(-100%); }
  50% { transform: translateX(100%); }
}

.tilda-smart-heading {
  margin: 0 0 0.5rem;
  font-size: var(--heading-size);
  font-weight: var(--heading-weight);
  line-height: 1.2;
  position: relative;
  z-index: 1;
  letter-spacing: -0.02em;
}

.tilda-smart-subtitle {
  margin: 0;
  opacity: 0.9;
  font-size: var(--subtitle-size);
  line-height: 1.5;
  position: relative;
  z-index: 1;
  font-weight: 400;
}

/* 🎯 ОПЦИИ ВЫБОРА - КАРТОЧКИ */
.tilda-smart-options {
  padding: var(--content-padding);
  max-height: 60vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--primary-500) var(--gray-100);
  background: var(--gray-50);
}

.tilda-smart-options::-webkit-scrollbar {
  width: 6px;
}

.tilda-smart-options::-webkit-scrollbar-track {
  background: var(--gray-100);
  border-radius: 3px;
}

.tilda-smart-options::-webkit-scrollbar-thumb {
  background: var(--primary-500);
  border-radius: 3px;
}

.tilda-smart-option {
  display: flex;
  align-items: center;
  padding: var(--option-padding);
  margin-bottom: var(--option-margin);
  border: none;
  border-radius: var(--option-radius);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--white);
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--gray-100);
}

.tilda-smart-option:last-child {
  margin-bottom: 0;
}

.tilda-smart-option::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  transition: left 0.5s ease;
}

.tilda-smart-option:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border-color: var(--primary-200);
}

.tilda-smart-option:hover::before {
  left: 100%;
}

.tilda-smart-option:active {
  transform: translateY(0);
  transition: transform 0.1s ease;
}

/* 🎨 ИКОНКИ С ГРАДИЕНТАМИ */
.tilda-smart-icon {
  width: var(--icon-size);
  height: var(--icon-size);
  border-radius: var(--icon-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.25rem;
  margin-right: 1rem;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.tilda-smart-option:hover .tilda-smart-icon {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* ЦВЕТА ИКОНОК ДЛЯ КАЖДОГО СЕГМЕНТА */
.tilda-smart-option[data-segment="hotel"] .tilda-smart-icon {
  background: var(--hotel-bg);
}

.tilda-smart-option[data-segment="apartments"] .tilda-smart-icon {
  background: var(--apartments-bg);
}

.tilda-smart-option[data-segment="business"] .tilda-smart-icon {
  background: var(--business-bg);
}

.tilda-smart-option[data-segment="home"] .tilda-smart-icon {
  background: var(--home-bg);
}

.tilda-smart-option[data-segment="notsure"] .tilda-smart-icon {
  background: var(--notsure-bg);
}

.tilda-smart-icon svg {
  width: 1.5rem;
  height: 1.5rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

/* 📝 КОНТЕНТ ОПЦИЙ */
.tilda-smart-content {
  flex: 1;
  position: relative;
  z-index: 1;
}

.tilda-smart-title {
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 0.25rem;
  font-size: var(--title-size);
  line-height: 1.3;
  transition: color 0.2s ease;
  letter-spacing: -0.01em;
}

.tilda-smart-desc {
  font-size: var(--desc-size);
  color: var(--gray-600);
  line-height: 1.5;
  transition: color 0.2s ease;
}

.tilda-smart-option:hover .tilda-smart-title {
  color: var(--primary-600);
}

.tilda-smart-option:hover .tilda-smart-desc {
  color: var(--gray-700);
}

/* ➡️ СТРЕЛКА */
.tilda-smart-arrow {
  color: var(--gray-300);
  font-size: 1.25rem;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
  font-weight: 300;
  line-height: 1;
  opacity: 0.7;
}

.tilda-smart-option:hover .tilda-smart-arrow {
  color: var(--primary-500);
  transform: translateX(4px);
  opacity: 1;
}

/* 🎪 АНИМАЦИИ */
@keyframes modalAppear {
  0% {
    opacity: 0;
    transform: scale(0.8) translateY(30px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes modalDisappear {
  0% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
  100% {
    opacity: 0;
    transform: scale(0.8) translateY(30px);
  }
}

@keyframes overlayAppear {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes overlayDisappear {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

.tilda-smart-overlay.show {
  opacity: 1;
  animation: overlayAppear 0.3s var(--easing) forwards;
}

.tilda-smart-overlay.hide {
  opacity: 0;
  animation: overlayDisappear 0.3s var(--easing) forwards;
}

.tilda-smart-modal.show {
  opacity: 1;
  transform: scale(1) translateY(0);
  animation: modalAppear 0.4s var(--easing) forwards;
}

.tilda-smart-modal.hide {
  opacity: 0;
  transform: scale(0.8) translateY(30px);
  animation: modalDisappear 0.3s var(--easing) forwards;
}

/* 📱 АДАПТИВНОСТЬ */
@media (max-width: 480px) {
  :root {
    --heading-size: 1.5rem;
    --subtitle-size: 1rem;
    --title-size: 1.125rem;
    --header-padding: 2rem 1.5rem 1rem;
    --content-padding: 1rem;
    --option-padding: 1rem;
    --icon-size: 2.5rem;
  }
  
  .tilda-smart-overlay {
    padding: 0.5rem;
  }
  
  .tilda-smart-options {
    max-height: 65vh;
  }
  
  .tilda-smart-icon {
    margin-right: 0.75rem;
  }
  
  .tilda-smart-icon svg {
    width: 1.25rem;
    height: 1.25rem;
  }
}

@media (max-width: 360px) {
  .tilda-smart-option {
    flex-direction: column;
    text-align: center;
    padding: 1.25rem;
  }
  
  .tilda-smart-icon {
    margin-right: 0;
    margin-bottom: 0.75rem;
  }
  
  .tilda-smart-content {
    margin-bottom: 0.5rem;
  }
}

/* ♿ ДОСТУПНОСТЬ */
.tilda-smart-option:focus {
  outline: 2px solid var(--primary-500);
  outline-offset: 2px;
}

.tilda-smart-option:focus:not(:focus-visible) {
  outline: none;
}

/* 🎯 REDUCED MOTION */
@media (prefers-reduced-motion: reduce) {
  .tilda-smart-overlay,
  .tilda-smart-modal,
  .tilda-smart-option,
  .tilda-smart-icon,
  .tilda-smart-arrow {
    transition: none;
    animation: none;
  }
  
  .tilda-smart-option:hover {
    transform: none;
  }
  
  .tilda-smart-header::before {
    animation: none;
  }
}

/* 🏷️ СТИЛИ ДЛЯ UC-БЛОКОВ */
[class*="uc-"] {
  transition: opacity 0.3s ease, display 0.3s ease;
}

.uc-hidden {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  height: 0 !important;
  overflow: hidden !important;
}

.uc-visible {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
}