:root {
--bg: #0b0f14;
--card: rgba(255,255,255,0.07);
--blur: 12px;
--text: #e8eef6;
--muted: #a8b0bb;
--accent: #7dd3fc;
--accent-2: #22d3ee;
--stroke: rgba(255,255,255,0.12);
--shadow: 0 10px 30px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.06);
--radius-xl: 20px;
--radius-2xl: 28px;
--glass-grad: linear-gradient( to bottom right, rgba(255,255,255,.12), rgba(255,255,255,.04) );
  --meta-drop-text: #fff;
    --route-fade-color: #0b0f14;
}
[data-theme="light"] {
--bg: #f6f8fb;
--card: rgba(255,255,255,0.6);
--text: #0e1521;
--muted: #455066;
--stroke: rgba(17,25,40,.12);
--shadow: 0 8px 26px rgba(17,25,40,.08), inset 0 1px 0 rgba(255,255,255,.5);
--glass-grad: linear-gradient( to bottom right, rgba(255,255,255,.85), rgba(255,255,255,.6) );
--meta-drop-text: #fff;
  --route-fade-color: #f6f8fb;
}


* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";

  background:
    radial-gradient(1200px 1200px at 80% -10%, rgba(34,211,238,.18), transparent 60%),
    radial-gradient(900px 900px at -10% 20%, rgba(125,211,252,.18), transparent 50%),
    var(--bg);

  background-repeat: no-repeat;      /* ← отключает повторение */
  background-attachment: fixed;      /* ← фон остаётся фиксированным */
  background-size: 100% 100%;        /* ← растянуть фон на всю страницу */

  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}


.container { width: min(1280px, 92vw); margin: 0 auto; padding-bottom:5px; }


/* Header */
header {
  min-width: 0;
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(var(--blur));
  background: linear-gradient(to bottom, rgba(11, 15, 20, 0.06), rgba(11, 15, 20, 0));
  border-bottom: 1px solid rgba(17, 25, 40, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.logo-badge { width: 65px; height: 65px; border-radius: 50%; background: var(--glass-grad); border: 1px solid var(--stroke); box-shadow: var(--shadow); display: grid; place-items: center; position: relative; overflow: hidden; }
.logo-badge:before { content: ""; position: absolute; inset: 0;  background: radial-gradient(60% 40% at 60% 10%, rgba(255, 255, 255, 0.29), #0000 70%); }
.logo svg { width: 22px; height: 22px; }
.brand { font-weight: 700; letter-spacing: .2px; font-size: 18px; }
.nav-cta { display: flex; gap: 10px; align-items: center; }
.btn { padding: 10px 14px;
	border-radius: 12px; 
	border: 1px solid var(--stroke); 
	background: var(--glass-grad); 
	color: var(--text); text-decoration: none; font-weight: 400; 
	margin-right: 8px;
	box-shadow: var(--shadow); transition: transform .15s ease, border-color .2s ease; display: inline-flex; align-items: center; gap: 8px; text-align: center; }
	
.btn:hover { transform: translateY(-1px); border-color: rgba(125,211,252,.5); }
.btn.primary { background: linear-gradient(135deg, rgba(125,211,252,.35), rgba(34,211,238,.28)); border-color: rgba(125,211,252,.55); }

/* переопределяем глобальный header для карточек сделок */
.card.deal > header,
.deal header {
  position: relative;
  top: auto;
  z-index: 1;
  backdrop-filter: none;
  background: none;
  border-bottom: none;
}
/* Hero */
.hero { position: relative; padding: 72px 0 42px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 36px; align-items: center; }
.title { font-size: clamp(34px, 4vw, 56px); line-height: 1.05; letter-spacing: -0.02em; margin: 8px 0 14px; }
.subtitle { color: var(--muted); font-size: clamp(15px, 1.6vw, 18px); line-height: 1.6; }
.hero-cta { display: flex; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
.super-title {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--accent);
  margin-bottom: 12px;
text-align:center;
  text-shadow: 0 0 10px rgba(125, 211, 252, 0.4);
}

.hero-card {
  position: relative;
  border-radius: var(--radius-2xl);
  padding: 22px;
  border: 1px solid var(--stroke);
  background: var(--card);
  backdrop-filter: blur(var(--blur));
  box-shadow: var(--shadow);
  width: 100%;        /* занимает всю колонку грида */
  max-width: 560px;   /* но не шире «нормальной» карты */
  margin: 0 auto;     /* центрируем внутри правой колонки */
}

.hero-card .grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 999px; border: 1px solid var(--stroke); background: var(--glass-grad); font-weight: 600; color: var(--text); font-size: 12px; letter-spacing:.2px; }
.chip .dot { width: 8px; height: 8px; border-radius: 999px; background: var(--accent-2); box-shadow: 0 0 12px var(--accent-2); }


/* Section titles */
.section { padding: 36px 0 10px; }
.section h2 { font-size: clamp(24px, 3vw, 32px); margin: 0 0 14px; letter-spacing: -0.02em; }
.section p.lead { color: var(--muted); margin: 0 0 14px; }


/* How it works */
.how { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.card { border-radius: var(--radius-xl); border: 1px solid var(--stroke); background: var(--card); backdrop-filter: blur(var(--blur)); padding: 16px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.card h3 { margin: 6px 0 8px; font-size: 16px; }
.card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.step { width: 28px; height: 28px; border-radius: 10px; display: grid; place-items: center; font-weight: 700; color: #0b0f14; background: linear-gradient(135deg, var(--accent), var(--accent-2)); border: 1px solid rgba(255,255,255,.3); box-shadow: 0 6px 16px rgba(34,211,238,.35); }


/* Deals */
.deals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px;  align-items: stretch;   grid-auto-rows: 1fr; grid-auto-flow: row dense;  }
.deal { overflow: visible !important; 
  height: auto; /* ← карточка тянется до высоты grid-ячейки */
  display: flex;
  flex-direction: column;

 }
 
 /* внутри сетки .deals каждая обёртка и карточка тянутся на всю ширину трека */
.deals .deal-wrap {
  width: 100%;
  min-width: 0;
}

.deals .deal-wrap .card.deal {
  width: 100%;
  min-width: 0;
    position: relative;       /* ← чтобы absolute-внутри цеплялся за карту */
  padding-bottom: 20px;     /* чуть места под индикатор */
}
.deal header { display:flex; align-items:center; justify-content: flex-start; gap:10px; margin-bottom: 8px; border: none; backdrop-filter: none; background: none; }
.deal header .route-line {
  flex: 1 1 auto;  /* ← занимает всю доступную ширину */
  min-width: 0;    /* ← позволяет переполнение корректно измерять */
}

.tag { font-size: 12px; color: var(--muted); border: 1px solid var(--stroke); padding: 6px 8px; border-radius: 999px; }
.badge { position: absolute; top: 14px; right: 14px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #0b0f14; font-weight: 800; font-size: 12px; padding: 8px 10px; border-radius: 999px; border: 1px solid rgba(255,255,255,.4); box-shadow: 0 8px 18px rgba(34,211,238,.35); }
.badge.hot {
  background: linear-gradient(135deg, #ffdfd5, #fe2400);
  color: #0b0f14;
  font-weight: 800;
  font-size: 12px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(81, 9, 9, 0.42);
  box-shadow: 0 8px 18px rgba(238, 34, 34, 0.35);
}
.deal .meta { display:flex; align-items:normal; gap:9px; color: var(--muted); font-size: 13px; padding-left: 19px; }
.deal .price { font-size: 22px; font-weight: 800;  padding-left: 19px; }

.route-flags {
	display: block; 
  align-items: center;
  gap: 8px;
   white-space: nowrap;  
    flex-wrap: nowrap;
}

/* флаги ведут себя как символы в строке */
.route-flags .flag {
  display: inline-block;
  vertical-align: middle;
  margin-top: 0;
  margin-left: 4px;
  margin-right: 4px;
}
/* сам маршрут — обычный inline */
.route-flags .route {
  display: inline;
  white-space: normal;
}

.flag {
  width: 22px;
  height: 16px;
  border-radius: 2px;
  object-fit: cover;
  box-shadow: 0 0 3px rgba(0,0,0,0.3);
  cursor: help;
  transition: transform .2s ease, box-shadow .2s ease;
  margin-top: 2px;
}

.flag:hover {
  transform: scale(1.15);
  box-shadow: 0 0 6px var(--accent);
}

.flag-hint {
  position: absolute;
  bottom: -28px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.75);
  color: #fff;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: .25s;
}

.flag-hint.show {
  opacity: 1;
}





.tabs {
  display: flex;
  flex-wrap: nowrap;      /* Все вкладки в одну линию */
  gap: 6px;
  margin-bottom: 12px;
  overflow-x: auto;        /* Если много вкладок — скролл */
  padding-bottom: 2px;
}

.tabs::-webkit-scrollbar {
  height: 4px;
}

.tabs::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,.2);
  border-radius: 4px;
}

.tab {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid var(--stroke);

  background: var(--glass-grad);
  cursor: pointer;
  transition: .2s;

  color: var(--muted);
  white-space: nowrap; /* Не переносить дату */
}

/* активная вкладка + лёгкий glow */
.tab.active {
 border-color: #9d9d9d9e; 
  background: rgba(125, 211, 252, 0.18);
  color: var(--text);
  border-bottom: 0px;
}

/* 🔥 Аккуратный стиль «горячей» вкладки */
/* 🔥 Отключаем уникальный внешний вид hot-вкладок */
.tab.hot {
  background: var(--glass-grad);
  color: var(--muted) !important;
  border: 1px solid var(--stroke);
  box-shadow: none;
}

/* Если hot-вкладка активная — выглядит как обычная активная */
.tab.hot.active {
  background: rgba(125, 211, 252, 0.18);
  border-color: var(--accent);
  color: var(--text) !important;
  box-shadow: none;
}




.tab-date {
  font-weight: 600;
  font-size: 12px;
}

.tab-drop {
  font-size: 11px;
  opacity: .8;
  font-weight: bold;
}

.tab-body {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: nowrap;
}
.tab-body-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.tabs-bottom {
  
  padding: 4px 10px 0;
  display: inline-flex;
  justify-content: center;
  position: relative;
  z-index: 3;
}

.tabs-bottom .month-tab {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  padding-top: 2px;
  padding-bottom: 6px;
  border-top: 0;
}

.tabs-months {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}

.month-tab {
	font-weight: 600; 
	 opacity: 0.55;
  transition: opacity 0.15s ease, color 0.15s ease;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  background: var(--glass-grad);
  cursor: pointer;
  transition: .2s;

  color: var(--muted);
  white-space: nowrap;
  font-size: 12px;
}

.month-tab.active {
  background: rgba(125, 211, 252, 0.18);
  color: var(--text);
  border-color: #989898ab;
  font-weight: 600;
    opacity: 1;
}

/* цифры для барабана */

.price-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.price {
  display: flex;
  align-items: center; 
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.price .digit-track span {
  letter-spacing: 0 !important;
}

.price-reset {
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 180ms ease, transform 180ms ease;
}


.digit {
  width: 0.65em;              
  height: 1.2em;
  overflow: hidden;
  text-align: center;
}

.digit-track {
  will-change: auto;
}
.digit-track.digit-anim{
  will-change: transform;
}

.digit-track span {
  display: block;
  height: 1.2em;
  line-height: 1.2em;
  text-align: center;
  
}

.price {
  opacity: 1;
  transform: none;
}
.price-block.price-reset-out {
  opacity: 0;
  transform: scale(0.97);
  transition: opacity 160ms ease, transform 160ms ease;
}

.price-block.price-reset-in {
  opacity: 1;
  transform: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.price-sep {
  width: 0.2em;
}



.deal-wrap {
  position: relative;
  margin-bottom: 29px;
}
.price-currency {
  margin-left: 0.25em;   /* сделай 0.35..0.7 по вкусу */
  white-space: nowrap;
}
.hero .deal-wrap {
  margin-bottom: 5px;
}
/* === CARD INSIDE HERO — уменьшенная тень === */
.hero-card .card {
  box-shadow:
    0 4px 10px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}


/* Верхние вкладки выглядят как присоединённая панель */
.tabs-top {
  margin-bottom: -6px; /* подвинем внутрь карточки */
  padding: 0 10px 4px;
  display: inline-flex;
  margin-left: 7px;

  position: relative;
  z-index: 3;
}

/* Чтобы вкладки визуально были поверх карточки */
.tabs-top .tab {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  padding-bottom: 2px;
  padding-top: 4px;
  margin-bottom: 6px;
  border-bottom: 0px;
}



.tabs-arrow.left {
    left: 0;
}

.tabs-arrow.right {
    right: 5px;
}

.tabs-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
  
  margin-bottom: -6px;
  position: relative;
  z-index: 3;
  margin-left: 11px;
      
    
    justify-content: center;
    
    padding: 0 28px; /* резервируем место под стрелки */
    overflow: hidden; /* защита от вылета */
}

.tabs-window {
  overflow: hidden;
  flex: 1;
}

/* ============================================
   DYNAMIC DROP HIGHLIGHT (TUNABLE)
   ============================================ */

/* 🔧 ТВОИ НАСТРОЙКИ — МОЖЕШЬ МЕНЯТЬ СМЕЛО */
:root {
  --drop-start: 30;   /* с какого % начинается эффект */
  --drop-end: 65;     /* на каком % исчезает эффект */
  --drop-color: 255, 60, 60; /* ярко-красный перелив */
}

/* Базовый стиль скидки */
.meta-drop {
  position: relative;
padding: 5px 7px 2px 7px;
  border-radius: 7px;
  font-weight: 400;
  font-size: 17px;
  color: var(--meta-drop-text);
  z-index: 1;
  letter-spacing: 0.04em;
  
  opacity: 0;
  transform: translateY(4px) scale(0.86);
  transition:
    opacity 220ms ease,
    transform 220ms cubic-bezier(.16,1,.3,1);
}

.meta-drop.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Только фон плашки */
.meta-drop::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 0, 0, 1); /* чистый красный */
  opacity: var(--drop-alpha, 0); /* управляем только фоном */
  border-radius: inherit;
  z-index: -1;
  transition: opacity 0.2s ease;
}





.tabs-track {
  display: flex;
  gap: 3px;
  transition: transform 0.3s ease;
}

.tabs-arrow {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid var(--stroke);
  background: var(--glass-grad);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  opacity: 0.8;
  transition: 0.2s;
  margin-bottom: 6px;
     position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
}

.tabs-arrow:hover {
  opacity: 1;
}

.tabs-arrow[disabled] {
  opacity: 0.25;
  cursor: default;
}
.tabs-appear {
  opacity: 0;
  transform: translateY(0px) ;
  animation: tabsAppear .45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: var(--appear-delay, 0ms);
  overflow: hidden; /* добавляем */
}

@keyframes tabsAppear {
  0% {
    opacity: 0;
    transform: translateY(0px) ;
  }
  60% {
    opacity: 0.1;
    transform: translateY(40px) scale(1.0);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Карточка под вкладками */
.deal {
  position: relative;
  z-index: 2;
  margin-top: 0;
}







.super-deal-label {
  display: inline-block;
  margin-bottom: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.3px;
  color: #0b0f14;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 6px 16px rgba(34, 211, 238, 0.35);
}


/* directions */
.tag {
  font-size: 13px;
  color: var(--muted);
  border: 1px solid var(--stroke);
  padding: 6px 8px;
  border-radius: 999px;
  min-width: 30px;
  text-align: center;
}
.route {
 display: inline;
  flex-direction: column;
  line-height: 1.25;
    white-space: normal; 
}

.route strong {
  font-size: 16px;
  font-weight: 600;
    white-space: normal; 
}

.direction {
  font-size: 11px;
  color: var(--muted);
  margin-left: 2px;
    white-space: normal; 
}

.input {
  flex: 1;
  padding: 8px 16px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: var(--glass-grad);
  color: var(--text);
  font-size: 15px;
  outline: none;
  backdrop-filter: blur(var(--blur));
  transition: all 0.25s ease;
}

.input::placeholder {
  color: var(--muted);
  opacity: 0.8;
}

.input:focus {
  border-color: rgba(125, 211, 252, 0.6);
  box-shadow: 0 0 20px rgba(125, 211, 252, 0.25), inset 0 1px 0 rgba(255,255,255,0.2);
  background: linear-gradient(to right, rgba(255,255,255,0.12), rgba(255,255,255,0.05));
}

.input:hover {
  border-color: rgba(125, 211, 252, 0.4);
  transform: translateY(-1px);
}

.logo-badge svg {
  width: 65px;     /* можно 72px или 80px */
  height: 65px;
}


[data-theme="dark"] .logo-badge svg g:first-child {
  stroke: #38bdf8; /* голубой */
}
[data-theme="dark"] .logo-badge svg g:last-child {
  stroke: #0284c7; /* оранжевые узлы */
}

[data-theme="light"] .logo-badge svg g:first-child {
  stroke: #0284c7; /* более тёмный синий */
}
[data-theme="light"] .logo-badge svg g:last-child {
  stroke: #f97316; /* насыщенно-оранжевый */
}
/* === FUTURE-BAR (dark theme) === */
[data-theme="dark"] .bar-future {
  background: rgba(0, 0, 0, 0.85);
  opacity: 0.9;
  backdrop-filter: blur(1px);
}

/* === FUTURE-BAR (light theme) === */
[data-theme="light"] .bar-future {
  background: rgba(255, 255, 255, 0.85);
  opacity: 0.9;
  backdrop-filter: blur(2px);
  mix-blend-mode: lighten;
}


.hero-card #heroDeals {
  width: 100%;
}

/* контейнер карусели */
.hero-slider {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
}

/* окно просмотра */
.hero-window {
  width: 100%;
  overflow: hidden;
  
}

.hero-slide .tabs-bottom {
  padding-bottom: 6px;  /* было 0 — добавим чуть-чуть */
}

/* трек со слайдами */
.hero-track {
  display: flex;
  /* ВАЖНО: без width: 100%; пусть ширина будет по контенту, 
     а мы двигаем его transform-ом */
  transition: transform 0.45s cubic-bezier(.25, .8, .25, 1);
}

/* каждый слайд занимает ровно ширину окна */
.hero-slide {
  flex: 0 0 100%;
  display: flex;
  justify-content: center;
    min-width: 0;       /* 🔥 КРИТИЧЕСКИ ВАЖНО */
  overflow: hidden;   /* 🔥 не даём контенту растягивать */
  
}


/* сама карточка внутри слайда */
.hero-slide .deal-wrap {
  width: 100%;
  max-width: 560px;
    min-width: 0;        /* 🔥 важно */
  overflow: hidden;    /* 🔥 */
}

/* === MOBILE FIX FOR HERO CARD === */
@media (max-width: 576px) {

  /* Контейнер карточки */
  .hero-card {
    width: 100%;
    max-width: 100% !important;
    padding-left: 3px;
    padding-right: 3px;
    
  }

  /* Контейнер для карусели */
  .hero-slider {
    width: 100%;
    max-width: 100% !important;
    overflow: hidden;
  }

  /* Окно просмотра */
  .hero-window {
    width: 100%;
    max-width: 100% !important;
    overflow: hidden;
  }



  /* Каждый слайд ровно в ширину экрана */
  .hero-slide {
   
    width: 100% !important;
    min-width: 0;       /* 🔥 КРИТИЧЕСКИ ВАЖНО */
  }

  /* Карточка внутри */
  .hero-slide .deal-wrap,
  .hero-slide .deal {
    width: 100% !important;
 
  }
  .hero .deal-wrap {
  margin-bottom: 5px !important;
}
/* === CARD INSIDE HERO — уменьшенная тень === */
.hero-card .card {
  box-shadow:
    0 4px 10px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}
  
}






.hero-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px; /* ← увеличиваем расстояние */
    height: 22px; /* ← фиксированная высота, чтобы scale не давил */
    padding: 5px 0;
}

.hero-dot {
    appearance: none;
    -webkit-appearance: none;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 0 !important;

    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    border: 1px solid var(--stroke);
    background: rgba(255,255,255,0.2);
    cursor: pointer;
    transition: 0.25s;
}

[data-theme="light"] .hero-dot {
  background: rgba(0,0,0,0.15);
}

.hero-dot.active {
  background: var(--accent);
  border-color: var(--accent-2);
  transform: scale(1.25);
  box-shadow: 0 0 6px var(--accent);
   will-change: transform; /* Safari fix */
}



/* ================================
   АНИМАЦИИ ПОЯВЛЕНИЯ КАРТОЧЕК
   ================================ */

/* Вариант 1 — мягкий fade+scale */
.deal-anim-enter-1 {
  animation: dealFadeIn 0.35s ease forwards;
}
@keyframes dealFadeIn {
  0% { opacity: 0; transform: scale(0.92); }
  100% { opacity: 1; transform: scale(1); }
}

/* Вариант 2 — как teleport (из центра, blur) */
.deal-anim-enter-2 {
  animation: dealTeleport 0.35s ease forwards;
}
@keyframes dealTeleport {
  0% {
    opacity: 0;
    transform: scale(0.7) translateY(20px);
    filter: blur(6px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0px);
    filter: blur(0px);
  }
}

/* Вариант 3 — вылет снизу */
.deal-anim-enter-3 {
  animation: dealSlideUp 0.45s cubic-bezier(.25,.8,.25,1) forwards;
}
@keyframes dealSlideUp {
  0% { opacity: 0; transform: translateY(40px); }
  100% { opacity: 1; transform: translateY(0); }
}



/* ================================
   АНИМАЦИИ УДАЛЕНИЯ КАРТОЧЕК
   ================================ */

/* Exit 1 — растворение */
.deal-anim-exit-1 {
  animation: dealFadeOut 0.35s ease forwards;
}
@keyframes dealFadeOut {
  to { opacity: 0; transform: scale(0.8); }
}

/* Exit 2 — "молекулы" */
.deal-anim-exit-2 {
  animation: dealMolecule 0.55s ease forwards;
}
@keyframes dealMolecule {
  0% { opacity: 1; transform: scale(1) rotate(0deg); filter: blur(0px); }
  100% {
    opacity: 0;
    transform: scale(0.5) rotate(25deg) translateY(-40px);
    filter: blur(10px);
  }
}

/* Exit 3 — "взрыв" */
.deal-anim-exit-3 {
  animation: dealExplode 0.45s ease forwards;
}
@keyframes dealExplode {
  0% { opacity: 1; transform: scale(1); filter: blur(0); }
  80% { transform: scale(1.4); opacity:0.4; }
  100% { transform: scale(1.7) rotate(15deg); opacity: 0; filter: blur(8px); }
}
/* ===========================================
      TEST PANEL (only for local development)
   =========================================== */

#testPanel {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;

  display: flex;
  flex-direction: column;
  gap: 8px;

  padding: 12px;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.35);
}

#testPanel button {
  cursor: pointer;
  padding: 7px 12px;
  font-size: 14px;
  font-weight: 600;

  border-radius: 10px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;

  transition: 0.2s;
}

#testPanel button:hover {
  background: rgba(255,255,255,0.2);
  transform: translateY(-2px);
}


/* ===========================================
   SMOOTH 180° FLIP (NO MIRROR, NO BLINK)
   =========================================== */

/* --- 3D перспектива для карточки --- */
.deals {
  perspective: 1600px;
}

/* карточка — 3D объект */
.deal {
  transform-style: preserve-3d;
}

/* анимация применяется к самой карточке */
.deal.flip {
  animation: flipDeal 1.8s cubic-bezier(.33,.55,.22,1) forwards;
}

@keyframes flipDeal {
  0%   { transform: rotateX(0deg); opacity: 1; filter: blur(0); }
  100% {
    transform: rotateX(360deg);
    opacity: 1;          /* ✅ ВАЖНО */
    filter: blur(3);     /* ✅ */
  }
}
/* скрываем зеркальную сторону */
.deal-content {
  backface-visibility: hidden;
  min-width: 0;
}

/* ====================================================================================
   AEROHUNT — СТРОКА МАРШРУТА С ПРОКРУТКОЙ ДЛИННЫХ ГОРОДОВ, ИНДИКАТОРОМ ВРЕМЕНИ И ФЕЙДОМ
   ==================================================================================== */


/* =============================================================================
   1) ИНДИКАТОР ВРЕМЕНИ (ШАРИК + ТУЛТИП)
   ============================================================================= */

.time-indicator {
  display: flex;
  align-items: center;
  gap: 6px;

  font-size: 13px;
  opacity: 0.9;

  position: relative;
  flex-shrink: 1;
  z-index: 5;                 /* всегда сверху */

  pointer-events: auto;       /* важно — hover нужен для тултипа */
}

.time-dot {
	 position: relative;   /* ← ВАЖНО */
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: hsl(120, 90%, 45%);
  transition: background 0.4s linear;
  color: inherit; 
}
.time-dot::after {
	 position: absolute;
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: currentColor;
  filter: blur(6px);
  opacity: 0.75;
  pointer-events: none;
}



/* Мерцания */
@keyframes dotBlinkFast {
  0% { opacity: 1; }
  50% { opacity: 0.15; }
  100% { opacity: 1; }
}
.time-dot.blink-fast {
  animation: dotBlinkFast 0.8s infinite;
}

@keyframes dotBlinkSlow {
  0% { opacity: 1; }
  50% { opacity: 0.45; }
  100% { opacity: 1; }
}
.time-dot.blink-slow {
  animation: dotBlinkSlow 2.2s infinite;
}

/* Тултип */
.time-tooltip {
  position: absolute;
  bottom: -26px;
  left: 7px;

  padding: 4px 8px;
  font-size: 12px;
  border-radius: 6px;

  background: var(--bg-tooltip);
  color: var(--text-tooltip);

  white-space: nowrap;
  opacity: 0;
	
  pointer-events: none;
  transition: 0.2s ease;
  z-index: 20;
}

[data-theme="light"] .time-tooltip {
  background: rgba(0,0,0,0.75);
}

.time-indicator:hover .time-tooltip {
  opacity: 1;
  transform: translateY(-4px);
  pointer-events: auto;
}

/* HERO: свечение всегда того же цвета, что и точка (не зависит от inherited color) */
.hero-card .time-dot::after,
.hero-slide .time-dot::after {
  background: inherit !important;
}
/* =============================================================================
   2) заставка для релоад страницы
   ============================================================================= */


#offers-reload-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 7, 10, 0.75);
  backdrop-filter: blur(6px);
  z-index: 99999;

  display: flex;
  align-items: center;
  justify-content: center;
}

#offers-reload-overlay[hidden] {
  display: none;
}

.offers-reload-box {
  background: #0d0f13;
  border-radius: 16px;
  padding: 32px 36px;
  max-width: 420px;
  text-align: center;
  box-shadow: 0 30px 80px rgba(0,0,0,.6);
}

.offers-reload-box h2 {
  margin: 0 0 12px;
  font-size: 20px;
}

.offers-reload-box p {
  margin: 0 0 24px;
  opacity: .85;
}

.offers-reload-box button {
  padding: 12px 22px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 15px;
}




/* =============================================================================
   2) ГЛАВНЫЙ КОНТЕЙНЕР route-line (слой + fade + overflow)
   ============================================================================= */

/* Fade теперь работает через mask-image, а не затемнение сверху */
/* Fading справа — через mask-image */

/* Левая + правая шторка ВМЕСТЕ — только при hover */
/* БЕЗ hover — правая шторка всегда видна */
.route-line.is-overflow .route-mask {
  -webkit-mask-image: linear-gradient(
    to left,
    transparent 0%,
    black 12%
  );
  mask-image: linear-gradient(
    to left,
    transparent 0%,
    black 12%
  );

  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}

/* С hover — включается и левая, и правая шторка */
.route-line.is-overflow:hover .route-mask {
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 4%,
    black 96%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 4%,
    black 96%,
    transparent 100%
  );
}

.route-line {
  display: flex;
  align-items: center;
  gap: 9px;

  flex: 1 1 auto;
  min-width: 0;

 overflow: visible; /* важно! */
}

.route-line::after { display: none; }



/* =============================================================================
   3) route-mask — скрывает трек, чтобы он не лез под индикатор
   ============================================================================= */

.route-mask {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;   /* <-- добавляем */
  height: 100%;          /* <-- добавляем */
  position: relative;
  overflow: hidden;
  pointer-events: auto;  /* <-- добавляем */
}



/* =============================================================================
   4) route-track — движущаяся линия (внутри маски)
   ============================================================================= */

.route-track {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  flex-shrink: 0;

  transform: translateX(0);
  transition: transform 1.2s ease; /* плавный уход и возврат */
}



/* движение туда–обратно */
@keyframes route-marquee-bounce {
  0%   { transform: translateX(0); }
  50%  { transform: translateX(calc(-1 * ((var(--scroll-distance) * 1px) + var(--extra-scroll)))); }
  100% { transform: translateX(0); }
}



/* =============================================================================
   5) ГОРОДА И ФЛАГИ
   ============================================================================= */

.route-city {
  display: inline;
  white-space: nowrap;
}

.route-arrow {
  display: inline;
}

.flag {
  width: 22px;
  height: 16px;
  border-radius: 2px;
  object-fit: cover;

  margin-left: 4px;
  margin-right: 4px;

  cursor: help;
  box-shadow: 0 0 3px rgba(0,0,0,0.3);
  transition: 0.2s ease;
}

.flag:hover {
  transform: scale(1.15);
  box-shadow: 0 0 6px var(--accent);
}


/* ====================================================================================
   КОНЕЦ — БЛОК ROUTE-LINE (индикатор, флаги, города, fade, анимация переполнения)
   ==================================================================================== */





.hero-slide .deal-inner {
    padding-bottom: 32px !important;
}
/* --- EXTRA SPACE FOR NORMAL DEAL CARDS (NOT HERO) --- */
.deal-wrap:not(.hero-slide .deal-wrap) .deal-inner {
    padding-bottom: 2px; /* было 24px — теперь больше места */
}

.deal-inner {
  min-width: 0;
}

.card.deal .found-time {
  position: absolute;
  right: 20px;
  bottom: 14px;

  display: flex;
  align-items: center;
  gap: 6px;

  font-size: 13px;
  opacity: 0.9;

  pointer-events: auto;
  z-index: 2;
}










/* ================================
   АДАПТИВ
   ================================ */

/* --- Контейнеры на маленьких экранах --- */
@media (max-width: 1024px) {
  .container {
    width: min(95vw, 100%);
  }

  header .nav {
    padding: 10px 10px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 26px;
    padding-top: 40px;
    padding-bottom: 30px;
  
  }

  .hero-right {
    order: 99; /* текст сверху, карточка снизу */
  }

  .hero-cta {
    justify-content: center;
  }

  .super-title {
    margin-top: 10px;
  }

  .hero-card {
    margin: 0 auto;
    width: 100%;
    max-width: 503px;
}
}


/* --- MOBILE < 768px --- */
@media (max-width: 768px) {
  .container {
    width: 100%;
    padding-left: 12px;
    padding-right: 12px;
    box-sizing: border-box;
    margin: 0 auto;
  }


  /* лого + кнопки */
  .nav {
	  
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
  }

  .nav-cta {
    gap: 8px;
  }

  .btn {
    padding: 9px 12px;
    font-size: 14px;
  }
  .ticket-btn {
  text-align: center;        /* центрируем строки */
  justify-content: center;   /* центрируем содержимое flex-а */
  white-space: normal;       /* разрешаем перенос */
}

  /* HERO */
  .title {
    font-size: 28px;
  }

  .subtitle {
    font-size: 15px;
  }

  /* how → в 2 колонки */
  .how {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
}

/* --- MOBILE < 576px --- */
@media (max-width: 576px) {


  /* Хэдер */
  .nav {
    flex-direction: column;
    align-items: center;
    gap: 6px;
  }

  .nav-cta {
    width: 100%;
    justify-content: center;
  }

  /* HERO: текст по центру, отступы меньше */
  .hero {
    padding-top: 28px;
    padding-bottom: 24px;
    gap: 22px;
  }

  .title {
    font-size: 26px;
    line-height: 1.15;
  }

  .hero-cta {
    flex-direction: column;
    gap: 8px;
  }


  /* HOW → одна колонка */
  .how {
    grid-template-columns: 1fr;
  }

  /* DEALS → 1 колонка */
  .deals {
    grid-template-columns: 1fr;
  }

  /* карточки */
  .deal .price {
    font-size: 20px;
  }

  .deal header {
    display:flex;
  align-items:center;
  gap:10px;
  }

  /* подписи к timebar */
  .timebar-labels {
    font-size: 9px;
    padding: 0 2px;
  }

  /* subscribe */
  .subscribe {
    flex-direction: column;
    gap: 18px;
  }

  .subscribe form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .input {
    width: 100%;
  }

  footer .container {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
  }
}

/* === FIX HERO CARD MOBILE WIDTH === */
@media (max-width: 576px) {
  .hero-card {
    width: 100% !important;
    max-width: 100% !important;
 

    
  }
  
  .hero .deal-wrap {
  margin-bottom: 5px;
}
  /* === CARD INSIDE HERO — уменьшенная тень === */
.hero-card .card {
  box-shadow:
    0 4px 10px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}
  .hero-slider,
  .hero-window,
  
  .hero-slide,
  .hero-slide .deal-wrap {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }
}

/* --- ULTRA SMALL (iPhone SE) < 380px --- */
@media (max-width: 380px) {
  .title {
    font-size: 23px;
  }
  .btn {
    font-size: 13px;
    padding: 8px 10px;
  }
  .chip {
    font-size: 11px;
  }
}
/* === DEALS RESPONSIVE GRID === */

/* Desktop large (≥1280px) — 3 колонки */
.deals-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

/* Medium screens (900px–1279px) — 2 колонки */
@media (max-width: 1279px) {
  .deals {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Small desktop / tablets (650px–899px) — 2 колонки */
@media (max-width: 899px) {
  .deals {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Phones (<576px) — 1 колонка */
@media (max-width: 576px) {
  .deals {
    grid-template-columns: 1fr;
	  grid-auto-rows: auto;     /* <-- ключевое */
    align-items: start;       /* на всякий */
    align-content: start;     /* на всякий */
  }
  
}
@media (max-width: 576px) {
  .container {
    width: 100%;
    padding-left: 3px;
    padding-right: 4px;
    margin: 0 auto;
    box-sizing: border-box;
  }
	
  .hero {
    display: block !important; /* отключает сетку полностью */
  }
}

/* === DEAL UPDATE: HIDE TABS BEFORE FLIP === */

/* базовое плавное появление */
.tabs,
.tabs-slider,
.tabs-months,
.tabs-bottom {
  transition: opacity 160ms ease, transform 160ms ease;
}

/* скрытие ВСЕХ табов во время обновления */
.deal-wrap.tabs-hiding .tabs-top,
.deal-wrap.tabs-hiding .tabs-bottom,
.deal-wrap.tabs-hiding .tabs-wrapper {
  opacity: 0;
  transform: translateY(0);
  pointer-events: none;
  transition: opacity 120ms linear;
}

/* отключаем любые animations у табов во время апдейта */
.deal-wrap.tabs-hiding .tabs-wrapper,
.deal-wrap.tabs-hiding .tabs-wrapper * {
  animation: none !important;
  animation-delay: 0ms !important;
}

/* скрытие табов при удалении */
.deal-wrap.removing .tabs-top,
.deal-wrap.removing .tabs-bottom {
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 120ms linear, transform 120ms linear;
}





/* ================================
   ROUNDTRIP PAIR (2 cards plate)
   ================================ */

.deals .roundtrip-pair{
  grid-column: span 2;
  position: relative;
  border-radius: 18px;
  margin-bottom: 18px;

  padding: 0;            /* ✅ убрали — теперь карточки внутри в линию с одиночными */
}

.deals .roundtrip-pair::before{
  content:"";
  position:absolute;

  /* ✅ “визуальный padding”, но без смещения контента */
  inset: -10px;
  border-radius: 28px;   /* 18 + 10 (чтобы углы совпали) */

  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.22);

  opacity: 0;
  transition: opacity 180ms ease;
}

[data-theme="light"] .deals .roundtrip-pair::before{
  background: rgba(0,0,0,0.03);
  border: 1px solid rgba(0,0,0,0.10);
  box-shadow: 0 12px 26px rgba(0,0,0,0.10);
}

.deals .roundtrip-pair.is-active::before{
  opacity: 1;                       /* включаем подсветку если валидно */
}

.deals .roundtrip-inner{
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;                        /* как у .deals */
  z-index: 1;
}

.deals .roundtrip-pair .deal-wrap{
  margin-bottom: 0;                 /* внутри пары отступ убираем */
}

.deals .roundtrip-caption{
  position: relative;
  z-index: 1;
  margin-top: 13px;
  text-align: center;
  font-size: 13px;
  opacity: 0.9;
  color: var(--muted);
}

.deals .roundtrip-pair:not(.is-active) .roundtrip-caption{
  display: none;                    /* нет подсветки => нет подписи */
}

/* Мобилка — в колонку */
@media (max-width: 576px){
  .deals .roundtrip-pair{
    grid-column: span 1;
    padding: 0;
  }
.deals .roundtrip-pair::before{
    inset: -8px 0;     /* ✅ top/bottom -8px, left/right 0 */
    border-radius: 18px;
  }
  
  .deals .roundtrip-inner{
    grid-template-columns: 1fr;
    gap: 12px;
  }
}
/* ================================
   ROUNDTRIP DIVIDER (grid-track)
   - no overlap with tabs on mobile
   - full height on desktop
   - adds 3px air above/below line on mobile
   ================================ */

:root{
   --rt-divider-air-top: 14px;   /* ✅ было 8, добавили +2 сверху */
  --rt-divider-air-bot: 8px;    /* ✅ низ оставили как есть */
  --rt-divider-line: 1px;     /* толщина линии */
  --rt-divider-gap: 22px;     /* твой gap между карточками в roundtrip */
}

/* 2 карточки рядом: делаем 3 колонки (card | divider | card) */
.deals .roundtrip-inner{
  display: grid;
  grid-template-columns: 1fr calc(var(--rt-divider-gap)) 1fr;
  gap: 0; /* gap теперь задан средней колонкой */
  position: relative;
  z-index: 1;
}



/* раскладываем карточки по 1 и 3 колонке */
.deals .roundtrip-inner > .deal-wrap:nth-child(1){ grid-column: 1; }
.deals .roundtrip-inner > .deal-wrap:nth-child(2){ grid-column: 3; }

/* сама линия как grid-item (псевдоэлемент в средней колонке) */
.deals .roundtrip-inner::after{
  content:"";
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  align-self: stretch;

  width: var(--rt-divider-line);
  background: rgba(255,255,255,0.10);
  pointer-events: none;
}

[data-theme="light"] .deals .roundtrip-inner::after{
  background: rgba(0,0,0,0.10);
}

/* --- dotted / dashed варианты для десктопа (закомментировано) --- */
/*
.deals .roundtrip-inner::after{
  width: 0;
  background: none;
  border-left: 1px dotted rgba(255,255,255,0.20);
}
[data-theme="light"] .deals .roundtrip-inner::after{
  border-left-color: rgba(0,0,0,0.20);
}
*/

.deals .roundtrip-inner::after{
  width: 0;
  background: none;
  border-left: 1px dashed rgba(255,255,255,0.25);
}
:root{
  --rt-divider-extend-top: 8px;
  --rt-divider-extend-bot: 21px;
}

.deals .roundtrip-inner::after{
  margin-top: calc(-1 * var(--rt-divider-extend-top));
  margin-bottom: calc(-1 * var(--rt-divider-extend-bot));
}
[data-theme="light"] .deals .roundtrip-inner::after{
  border-left-color: rgba(0,0,0,0.30);
}
/* если кругорейс невалидный (плашка скрыта) — скрываем и линию */
.deals .roundtrip-pair:not(.is-active) .roundtrip-inner::after{
  display: none;
}

/* Мобилка: 1 колонка + “divider-row” строго между карточками */
@media (max-width: 576px){
  .deals .roundtrip-inner{
    grid-template-columns: 1fr;
    
	grid-template-rows: auto calc(var(--rt-divider-air-top) + var(--rt-divider-air-bot) + var(--rt-divider-line)) auto;
  }

  .deals .roundtrip-inner > .deal-wrap:nth-child(1){ grid-column: 1; grid-row: 1; }
  .deals .roundtrip-inner > .deal-wrap:nth-child(2){ grid-column: 1; grid-row: 3; }

  .deals .roundtrip-inner::after{
    grid-column: 1;
    grid-row: 2;
    justify-self: stretch;

    /* линия по центру divider-row */
    align-self: start;
    height: var(--rt-divider-line);
	 margin-top: var(--rt-divider-air-top);
    width: auto;

    background: rgba(255,255,255,0.10);
  }

  [data-theme="light"] .deals .roundtrip-inner::after{
    background: rgba(0,0,0,0.10);
  }

  /* dotted / dashed для мобилки (закомментировано) */
  /*
  .deals .roundtrip-inner::after{
    background: none;
    height: 0;
    border-top: 1px dotted rgba(255,255,255,0.20);
  }
  [data-theme="light"] .deals .roundtrip-inner::after{
    border-top-color: rgba(0,0,0,0.20);
  }
  */
 
  .deals .roundtrip-inner::after{
    background: none;
    height: 0;
    border-top: 1px dashed rgba(255,255,255,0.30);
  }
  [data-theme="light"] .deals .roundtrip-inner::after{
    border-top-color: rgba(0,0,0,0.30);
  }
 
}






/* ================================
   ROUNDTRIP CAPTION AS SINGLE TAB
   (чтобы бордер “обтекал” подпись как вкладка)
   ================================ */

.deals .roundtrip-pair{
  padding-bottom: 13px; /* место под вкладку */
}

/* Вкладка по центру снизу */
.deals .roundtrip-caption{
  position: absolute;
  left: 50%;
  bottom: -1px;             /* ровно на бордере пластины */
  transform: translate(-50%, 50%);
  z-index: 5;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 6px 12px 7px;
  border-radius: 12px;
  border: 1px solid var(--stroke);

  /* как у нижних month-tab (tabs-bottom) */
  border-top: 0;
  border-top-left-radius: 0;
  border-top-right-radius: 0;

  background: var(--glass-grad);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 22px rgba(0,0,0,0.22);

  color: var(--muted);
  font-size: 13px;
  line-height: 1.2;
  white-space: nowrap;

  max-width: calc(100% - 28px);
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Маска, чтобы бордер под вкладкой не просвечивал через “стекло” */
.deals .roundtrip-caption::before{
  content: "";
  position: absolute;
  inset: -3px -10px 0;      /* чуть шире вкладки */
  border-radius: 14px;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  background: var(--bg);
  z-index: -1;
}

/* Если ранее добавлялись линии (before/after) — выключаем after */
.deals .roundtrip-caption::after{
  display: none !important;
}

/* Если есть .rt-text из прошлой версии — сбрасываем подчёркивание */
.deals .roundtrip-caption .rt-text{
  border-bottom: 0 !important;
  padding-bottom: 0 !important;
  max-width: none !important;
}

/* =========================================================
   ROUNDTRIP caption as a single "tab" (like month tabs)
   - hangs below the merged 2-card plate (bottom: -24px)
   - no border seam between plate and caption (overlap -1px + border-top:0)
   - background matches the plate (::before) for a unified look
   Put this block at the VERY END of style.css
   ========================================================= */

/* ensure the plate can show the tab outside */
.deals .roundtrip-pair{
  position: relative;
  overflow: visible;
}

/* give space so the next row doesn't crash into the hanging tab */
.deals .roundtrip-pair.is-active{
  margin-bottom: 42px; /* 24px hang + a bit of breathing room */
}

/* kill previous "3-line" experiments if any */
.deals .roundtrip-caption::before,
.deals .roundtrip-caption::after{
  content: none !important;
}

/* the tab itself */
.deals .roundtrip-caption{
  position: absolute;
  left: 50%;
  bottom: -41px;                 /* requested */
  transform: translate(-50%, -1px); /* overlap the plate border by 1px to remove seam */
  z-index: 5;

  /* keep it as ONE line */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: min(760px, calc(100vw - 48px));

  /* tab look */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0px;

  padding: 6px 16px 8px;
  font-size: 13px;
  line-height: 1.2;
  color: var(--muted);
  opacity: 1;

  /* SAME glass as merged plate */
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-top: 0;                 /* key for "one piece" */
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.22);

  /* like your month tabs: no top radius, rounded bottom */
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  border-bottom-left-radius: 14px;
  border-bottom-right-radius: 14px;

  pointer-events: none;
}

/* light theme parity */
[data-theme="light"] .deals .roundtrip-caption{
  background: rgba(0,0,0,0.03);
  border-color: rgba(0,0,0,0.10);
  box-shadow: 0 12px 20px rgba(0,0,0,0.10);
}


@media (max-width: 576px){
  .deals .roundtrip-pair{ padding-bottom: 26px; }
  .deals .roundtrip-caption{
    font-size: 12px;
    padding: 6px 10px 7px;
    max-width: calc(100% - 18px);
	bottom: -29px;
  }
}
/* =========================================================
   ROUNDTRIP warning styling + tooltip
   Append to the END of style.css
   ========================================================= */

/* allow hover/tap interactions on the hanging caption */
.deals .roundtrip-caption{
  pointer-events: auto;
}

/* underline + red emphasis for "на X дней" when out of RU range */
.deals .roundtrip-caption .rt-days{
  display: inline-block;
  font-weight: 400;
}

.deals .roundtrip-caption .rt-days.is-warn{
 /* color: rgba(255, 90, 90, 0.95); 
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px; */
  cursor: help;
}


.deals .roundtrip-caption .rt-warn{
  margin-left: 2px;
  cursor: help;
  margin-bottom: 3px;
}


/* warning icon (optional) */
.deals .roundtrip-caption .rt-warn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
  color: rgba(255, 170, 60, 0.95);
  cursor: help;
  user-select: none;
  opacity:0.85;
}

/* tooltip bubble */
[data-rt-tip]{
  position: relative;
}

[data-rt-tip]::after{
  content: attr(data-rt-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%) translateY(6px);
  opacity: 0;
  pointer-events: none;

  padding: 8px 10px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.25;
  white-space: nowrap;

  background: rgba(10,10,12,0.92);
  color: rgba(255,255,255,0.96);
  box-shadow: 0 14px 28px rgba(0,0,0,0.35);
  z-index: 1000;
}

[data-rt-tip]::before{
  content: "";
  position: absolute;
  left: 50%;
  bottom: calc(100% + 4px);
  transform: translateX(-50%);
  opacity: 0;
  pointer-events: none;

  border: 6px solid transparent;
  border-top-color: rgba(10,10,12,0.92);
  z-index: 1000;
}

/* show tooltip on hover/focus + on mobile toggle class */
[data-rt-tip]:hover::after,
[data-rt-tip]:hover::before,
[data-rt-tip]:focus::after,
[data-rt-tip]:focus::before,
.rt-tip-open::after,
.rt-tip-open::before{
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* light theme tooltip tweak */
[data-theme="light"] [data-rt-tip]::after{
  background: rgba(255,255,255,0.96);
  color: rgba(0,0,0,0.88);
  box-shadow: 0 14px 28px rgba(0,0,0,0.15);
}

[data-theme="light"] [data-rt-tip]::before{
  border-top-color: rgba(255,255,255,0.96);
}


/* =========================================================
   ROUNDTRIP: swap animation helper
   ========================================================= */
.deals .roundtrip-inner.rt-swapping{
  pointer-events: none;
}
.deals .roundtrip-inner.rt-swapping > .deal-wrap{
  will-change: transform;
}

/* =========================================================
   ROUNDTRIP: warning emphasis (if not already present)
   ========================================================= */



/* === FILTERS SECTION === */
.filters-card { padding: 18px; }
.filters-form { display: grid; gap: 14px; }

.filters-grid{
  display: grid;
  grid-template-columns: 1.4fr 0.9fr 0.8fr;
  gap: 14px;
  align-items: end;
}
@media (max-width: 880px){
  .filters-grid{ grid-template-columns: 1fr; }
}

.label{
  display:block;
  font-size: 13px;
  opacity: .9;
  margin: 0 0 6px 2px;
}
.req{ opacity: .9; }

.hint{
  margin-top: 8px;
  font-size: 12.5px;
  opacity: .75;
  margin-left: 2px;
}
.error{
  margin-top: 8px;
  font-size: 13px;
  color: rgba(239, 68, 68, .95);
  margin-left: 2px;
}

.filters-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 19px;
  justify-content: center;
  align-items: stretch;

  width: 100%;
  /*max-width: 403px;    визуальный центр */
  
}
.filters-actions .btn {
  width: 100%;
  justify-content: center;
  cursor: pointer;
}

.price-filter{
  display:flex;
  align-items:center;
  gap: 10px;
}
.price-prefix, .price-suffix{
  font-size: 14px;
  opacity: .8;
  user-select: none;
}

.filters-group-title {
  font-size: 13px;
 
  opacity: 0.85;
  margin-bottom: 6px;
}

/* ===============================
   EXTRA FILTERS (collapsible)
   =============================== */

/* header line inside the card */
.filters-extra-head{
  display: flex;
  align-items: center;
  gap: 0px;
  margin: 0 0 0px;
}

/* title stays as plain text */
.filters-extra-title{
  margin: 0;
  cursor: pointer;
  user-select: none;
}

.filters-extra-title:hover{
  opacity: 1;
}


/* only the caret is clickable */
.filters-extra-caret-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  margin-bottom:1px;

  /* subtle hover without making it look like a big button */
  transition: background 160ms ease, opacity 160ms ease;
  opacity: 0.85;
}

.filters-extra-caret-btn:hover{
  background: rgba(255,255,255,0.06);
  opacity: 1;
}

.filters-extra-caret-btn:active{
  background: rgba(255,255,255,0.09);
}

.filters-extra-caret-btn:focus-visible{
  outline: 2px solid rgba(125, 211, 252, 0.55);
  outline-offset: 3px;
}

.filters-extra-caret{
  font-size: 21px;
  line-height: 1;
  opacity: 0.75;
  transition: opacity 180ms ease;
  user-select: none;
}

.filters-extra.is-open .filters-extra-caret{ opacity: 1; }

.filters-extra-content[hidden]{
  display: none !important;
}

/* gap works only on flex/grid, so make the content a flex-column */
.filters-extra-content{
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-top: 2px;
  align-items: stretch;
}

/* inner "glass" subcard inside extra (no height:100% stretch like .filters-field) */
.filters-subcard{
  display: flex;
  flex-direction: column;
  gap: 8px;

  width: 100%;
  min-width: 0;

  padding: 5px 12px;
  border-radius: 16px;

  background: var(--glass-grad);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  backdrop-filter: blur(var(--blur));
}

/* Multi-select */
.multi-select{
  position: relative;
  border: 1px solid var(--stroke);
  background: var(--glass-grad);
  box-shadow: var(--shadow);
  border-radius: 14px;
  padding: 10px 10px;
  backdrop-filter: blur(var(--blur));
  display:flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-height: 48px;
}
.multi-select:focus-within{
  border-color: rgba(125, 211, 252, 0.6);
  box-shadow: 0 0 20px rgba(125, 211, 252, 0.18), inset 0 1px 0 rgba(255,255,255,0.12);
  background: linear-gradient(to right, rgba(255,255,255,0.12), rgba(255,255,255,0.05));
}

.chips{ display:flex; gap: 8px; flex-wrap: wrap; align-items:center; }
.chip-item{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  border-radius: 999px;
  padding: 6px 10px 6px 16px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,0.06);
  font-size: 13px;
  
}
[data-theme="light"] .chip-item{
  background: rgba(0,0,0,0.04);
}
.chip-item button{
  border: none;
  background: transparent;
  color: inherit;
  opacity: .8;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0 2px;
}
.chip-item button:hover{ opacity: 1; }

.origin-input{
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  padding: 8px 12px !important;
  min-width: 180px;
  flex: 1 1 180px;
}
.origin-input:focus{ outline: none; }

.suggestions{
  position:absolute;
  left: 0px;
  right: 0px;
  top: calc(100% + 6px);
  z-index: 30;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: var(--bg);
  box-shadow: 0 18px 40px rgba(0,0,0,.35);
  overflow: hidden;
  max-height: 260px;
}
.suggest-item{
  padding: 10px 12px;
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
}
.suggest-item:hover{
  background: rgba(125,211,252,0.10);
}
.suggest-main{ display:flex; flex-direction: column; gap: 2px; }
.suggest-code{
  font-size: 12px;
  opacity: .8;
  letter-spacing: .4px;
}
.suggest-city{
  font-size: 14px;
  font-weight: 500;
}

.filters-checkbox{
  padding-bottom: 6px;
}
.check{
  display:flex;
  gap: 10px;
  align-items:center;
  user-select:none;
  cursor:pointer;
  padding: 7px 10px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: var(--glass-grad);
  box-shadow: var(--shadow);
  font-size: 14px;
  backdrop-filter: blur(var(--blur));
}
.check input{
  width: 18px;
  height: 18px;
  accent-color: #38bdf8;
}

/* Roundtrip range controls */
.rt-range-row{
  display:flex;
  align-items:center;
  gap: 3px;
  max-width: 100%;
  box-sizing: border-box;
  min-width: 0; /* allow flex children to shrink */
  padding: 6px 14px;
  margin: 0px 0 0px;
  border-radius: 14px;
  border: 1px dashed var(--stroke);
  background: var(--glass-grad);
  backdrop-filter: blur(var(--blur));
  box-shadow: var(--shadow);
  font-size: 13px;
  line-height: 1.2;
  
}
.rt-range-text{ white-space: nowrap; }
/* allow the first text to shrink instead of pushing "дней" outside */
.rt-range-row .rt-range-text:first-child{
/*  flex: 1 1 auto; */
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rt-range-row .rt-range-text:last-child{
  flex: 0 0 auto;
}
.rt-range-dash{ opacity: .7; }
.rt-range-input{
  width: 60px;
  max-width: 30vw;
  padding: 6px 8px 6px 4px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: rgba(0,0,0,0.18);
  color: var(--text);
  text-align: center;
  outline: none;
}

@media (max-width: 420px){
 /* .rt-range-row{ flex-wrap: wrap; } */
  .rt-range-row .rt-range-text:first-child{
   /*  flex: 1 1 100%; */
    overflow: visible;
    text-overflow: clip;
  }
}
.rt-range-input:focus{
  border-color: rgba(56,189,248,0.65);
  box-shadow: 0 0 0 3px rgba(56,189,248,0.15);
}

.filters-message{
  border-radius: 16px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,0.04);
  padding: 12px 14px;
  line-height: 1.45;
}

/* ===== FIX 1: suggestions must be above hint ===== */

.filters-origin {
  position: relative; /* якорь для absolute */
   z-index: 20;
}

#originSuggest.suggestions {
  z-index: 50; /* выше hint и карточки */
}

/* когда подсказки открыты — прячем hint */
#originSuggest:not([hidden]) ~ .hint {
  display: none;
}
#originSuggest {
  position: absolute;
  z-index: 100;
}
/* ===== FIX 2: allow dropdown to overflow card ===== */

.filters-card {
  overflow: visible;
  position: relative;
  z-index: 10;
  
}

#originSuggest.suggestions {
  max-height: 240px;
  overflow-y: auto;
}

/* скрываем hint, когда открыт список городов */
.filters-origin.suggest-open .hint {
  display: none;
}

[data-theme="light"] .filters-message{
  background: rgba(0,0,0,0.03);
}
.filters-message .msg-title{
  font-weight: 600;
  margin-bottom: 6px;
}
.filters-message .msg-actions{
  margin-top: 10px;
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ===============================
   FILTERS GRID — MAIN LAYOUT
   =============================== */

.filters-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px 20px;
  align-items: stretch; /* ключевое */
}

.filters-field {
	  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;

  height: 100%;
  width: 100%;

  padding: 14px;
  border-radius: 18px;

  /* background: var(--glass-grad); */
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  backdrop-filter: blur(var(--blur));
}

.filters-field .input,
.filters-field .multi-select,
.filters-field .check {
  width: 100%;
}

.filters-grid,
.filters-card {
  overflow: visible;
}

.filters-field .price-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* tablets */
@media (max-width: 1100px) {
  .filters-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* mobile */
@media (max-width: 640px) {
  .filters-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px){
  .filters-card{ padding: 3px; }
  .filters-field{ padding: 12px; }

  .origin-input{
    min-width: 0 !important;
    flex: 1 1 120px;
  }

  .filters-field .price-row{ flex-wrap: wrap; }

  .filters-actions{
    grid-template-columns: 1fr;
    max-width: 100%;
  }
}

@media (max-width: 380px){
  .filters-card{ padding: 3px; }
  .filters-field{ padding: 10px; }
  .suggest-item{ padding: 9px 10px; }
}

@media (max-width: 576px){
  /* в 1 колонке нельзя span 2 — иначе создаются лишние колонки и всё “режется” */
  .deals .roundtrip-pair{
    grid-column: 1 / -1 !important;
  }

  /* уменьшить “вылет” декоративной подложки (или поставь inset: 0) */
  .deals .roundtrip-pair::before{
    inset: 0px !important; /* было -10px */
  }
}


/* === FIX: tooltip should not go under соседние карточки (grid stacking) === */
.deals .deal-wrap{
  position: relative; /* grid item layer */
  z-index: 1;
}
.deals .deal-wrap:hover{
  z-index: 999;
}



/* ===============================
   CARRIER (AIRLINE) LINE
   =============================== */
.carrier-row{
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.carrier-row .carrier-label{
  opacity: .8;
  padding-left: 19px; /* подравниваем под контент в табе */
}
.carrier-row .carrier-name{
  color: var(--text);
  opacity: .92;
  font-weight: 500;
}

.lowcost-hint{
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: help;
}
.lowcost-hint .lowcost-text{
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 2px;
}
.lowcost-hint .lowcost-icon{
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  font-size: 11px;
  line-height: 1;
  opacity: .85;
}
.lowcost-hint::after{
  content: attr(data-tooltip);
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  width: min(360px, 72vw);
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--stroke);
  box-shadow: 0 18px 40px rgba(0,0,0,0.35);
  color: var(--text);
  font-size: 12px;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity .12s ease, transform .12s ease;
  z-index: 200;
  white-space: normal;
}
.lowcost-hint:hover::after{
  opacity: 1;
  transform: translateY(0);
}

/* чтобы тултип всегда был поверх соседних карточек */
.deals .deal-wrap{
  position: relative;
  z-index: 1;
}
.deals .deal-wrap:hover{
  z-index: 120;
}
.deals .deal-wrap .card.deal{
  overflow: visible;
}
/* поднимаем текущий filters-field, пока фокус внутри */
.filters-field:focus-within{
  z-index: 9999;
}

/* extra safety для origin + списка */
.filters-origin{ position: relative; z-index: 10000; }
#originSuggest.suggestions{ z-index: 11000; }

@media (max-width: 768px){
  input, select, textarea{
    font-size: 16px !important;
  }
  /* если у тебя конкретно поле города */
  .origin-input, #originInput, #destInput{
    font-size: 16px !important;
  }
}

/* ============================================================
   ARRIVAL FILTER (country/city) — additions
   ============================================================ */
.label .opt{
  font-weight: 400;
  font-size: 13px;
  opacity: .7;
  margin-left: 0px;
}

.filters-arrival{
  position: relative;
  z-index: 20; /* same as origin so dropdown stays above соседних фильтров */
}

/* dropdown overlay */
#arrivalSuggest{
  position: absolute;
  z-index: 12000;
  max-height: 260px;
  overflow-y: auto;
}

/* subtle section rows */
.suggest-divider{
  padding: 8px 12px;
  font-size: 12px;
  opacity: .75;
  letter-spacing: .3px;
}

/* country rows */
.suggest-item.suggest-country .suggest-code{
  font-size: 11px;
  opacity: .7;
}
.suggest-badge{
  display:inline-flex;
  align-items:center;
  gap: 6px;
  font-size: 11px;
  opacity: .85;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,0.05);
  color: var(--text);
}

/* country city-panel inside dropdown */
.arrival-panel{
  padding: 10px 12px;
}
.arrival-panel .panel-head{
  display:flex;
  align-items:center;
  gap: 10px;
  margin-bottom: 10px;
}
.arrival-panel .panel-back{
  width: 30px;
  height: 30px;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,0.06);
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
}
.arrival-panel .panel-title{
  font-weight: 600;
}
.arrival-panel .panel-sub{
  font-size: 12px;
  opacity: .75;
  margin-top: 2px;
}
.arrival-panel .panel-all{
  margin: 8px 0 10px;
}
.arrival-panel .panel-all label,
.arrival-panel .panel-city label{
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,0.04);
  cursor:pointer;
  user-select:none;
}
.arrival-panel input[type="checkbox"]{
  width: 18px;
  height: 18px;
  accent-color: #38bdf8;
}
.arrival-panel .panel-city{
  display:flex;
  flex-direction:column;
  gap: 8px;
  max-height: 190px;
  overflow: auto;
  padding-right: 4px;
}
.arrival-panel .panel-actions{
  margin-top: 10px;
  display:flex;
  justify-content:flex-end;
}
.arrival-panel .btn.small{
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 13px;
}



/* ===== Arrival dropdown: быстрый выбор (+) / выбрано (✓) ===== */
.suggest-actions{
  display:flex;
  align-items:center;
  gap: 8px;
}
.suggest-toggle{
  width: 28px;
  height: 28px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,0.04);
  box-shadow: var(--shadow);
  color: var(--text);
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.suggest-toggle.on{
  background: rgba(125,211,252,0.14);
}
.suggest-item.is-selected .suggest-city{
  font-weight: 700;
}
.suggest-open-panel{
  cursor: pointer;
}



/* === Ticket button "viewed" state inside the button === */
.ticket-btn{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.1;
}

.ticket-btn-checked{
  font-weight: 400;
    opacity: .7;
}

.ticket-btn-meta{
  margin-top: -3px;
  font-size: 12px;
  opacity: .7;
  white-space: nowrap;
}



/* ================================
   FILTER: Depart month multiselect
   ================================ */

.filters-depart-months .month-select{
  position: relative;
  width: 100%;
}

.filters-depart-months .month-select-btn{
  width: 100%;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 18px 14px;
  border-radius: 14px;
  font-size: 15px;
}

.filters-depart-months .month-caret{
  opacity: 0.75;
  font-size: 14px;
}

.filters-depart-months .month-select-panel{
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;

  max-height: 260px;
  overflow: auto;

  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: rgba(11,15,20,0.96);
  backdrop-filter: blur(var(--blur));
  box-shadow: var(--shadow);

  padding: 8px;
  z-index: 1200;
}

[data-theme="light"] .filters-depart-months .month-select-panel{
  background: rgba(246,248,251,0.98);
  backdrop-filter: blur(var(--blur));
}

.filters-depart-months .month-item{
  display: flex;
  align-items: center;
  gap: 10px;

  padding: 5px 10px;
  border-radius: 12px;
  cursor: pointer;
  user-select: none;
}

.filters-depart-months .month-item input{
  margin: 0;
}

.filters-depart-months .month-item:hover{
  background: rgba(255,255,255,0.06);
}

[data-theme="light"] .filters-depart-months .month-item:hover{
  background: rgba(0,0,0,0.05);
}

.filters-depart-months .month-all{
  font-weight: 600;
}

.filters-depart-months .month-sep{
  height: 1px;
  margin: 6px 2px;
  background: rgba(255,255,255,0.10);
}

[data-theme="light"] .filters-depart-months .month-sep{
  background: rgba(0,0,0,0.10);
}



/* ======================
   DEPART MONTH RANGE PICKER
   ====================== */

.filters-depart-months .month-item.is-disabled{
  opacity: 0.55;
}

.filters-depart-months .month-range{
  padding: 6px 2px 2px;
}

.filters-depart-months .month-range-toggle{
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;

  padding: 10px 12px;
  border-radius: 12px;

  border: 1px solid var(--stroke);
  background: rgba(255,255,255,0.05);
  color: var(--text);

  cursor: pointer;
  user-select: none;
}

.filters-depart-months .month-range-toggle:hover{
  background: rgba(255,255,255,0.08);
}

[data-theme="light"] .filters-depart-months .month-range-toggle{
  background: rgba(0,0,0,0.04);
}

[data-theme="light"] .filters-depart-months .month-range-toggle:hover{
  background: rgba(0,0,0,0.06);
}

.filters-depart-months .month-range-form{
  margin-top: 10px;
  padding: 10px 10px 8px;

  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,0.03);
}

[data-theme="light"] .filters-depart-months .month-range-form{
  background: rgba(0,0,0,0.02);
}

.filters-depart-months .month-range-row{
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

/* allow inputs to shrink on narrow screens */
.filters-depart-months .month-range-field{ min-width: 0; }
.filters-depart-months .month-range-field input[type="date"]{ min-width: 0; }

.filters-depart-months .month-range-field{
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.filters-depart-months .month-range-field span{
  font-weight: 600;
  color: var(--muted);
}

.filters-depart-months .month-range-field input[type="date"]{
  width: 100%;
  min-width: 0;
  font-size: 14px;
  padding: 10px 36px 10px 12px; /* room for calendar icon */

  border-radius: 12px;
  border: 1px solid var(--stroke);

  background: rgba(11,15,20,0.55);
  color: var(--text);
}

/* make the calendar icon a bit smaller + keep it inside */
.filters-depart-months .month-range-field input[type="date"]::-webkit-calendar-picker-indicator{
  opacity: .85;
  cursor: pointer;
}

[data-theme="light"] .filters-depart-months .month-range-field input[type="date"]{
  background: rgba(255,255,255,0.85);
}

.filters-depart-months .month-range-actions{
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.filters-depart-months .month-range-actions .btn{
  flex: 1 1 0;
  padding: 10px 12px;
  border-radius: 12px;
}

.filters-depart-months .month-range-hint{
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.3;
  color: var(--muted);
}

.filters-depart-months .month-range-hint b{
  color: var(--text);
}


/* ================================
   MOBILE: range dates fit
   ================================ */
@media (max-width: 420px){
  .filters-depart-months .month-range-row{
    gap: 8px;
  }
  .filters-depart-months .month-range-field{
    font-size: 11px;
  }
  .filters-depart-months .month-range-field input[type="date"]{
    font-size: 13px;
    padding: 9px 32px 9px 10px;
  }
  .filters-depart-months .month-range-field input[type="date"]::-webkit-calendar-picker-indicator{
    transform: scale(0.88);
  }
}

/* super narrow phones: stack fields to avoid clipping */
@media (max-width: 360px){
  .filters-depart-months .month-range-row{
    grid-template-columns: 1fr;
  }
}


/* ===============================
   BIG DROP NOTIFY (filters)
   =============================== */

/* One pill, single line */
.notify-row{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap: nowrap;
  min-width: 0;

  /* make the whole row look like one "check" pill */
  padding: 13px 10px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: var(--glass-grad);
  box-shadow: var(--shadow);
  backdrop-filter: blur(var(--blur));
}

.notify-row .notify-check{
  /* remove inner pill visuals */
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;

  
  min-width: 0; /* allow ellipsis */
  gap: 8px;
  font-size: 14px;
}

.notify-row .notify-check span{
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display:block;
}

.notify-row .notify-drop-input{
  width: 64px;
  min-width: 64px;
  text-align: center;
  padding: 4px 10px;
  border-radius: 12px;
}

.notify-row .notify-drop-suffix{
  color: var(--muted);
  font-weight: 700;
  font-size:15px;
}

.notify-row.is-disabled{
  opacity: .55;
}

.notify-row.is-perm-blocked{
  opacity: .75;
}

.notify-row .notify-drop-input:disabled{
  opacity: .55;
  cursor: not-allowed;
}

.notify-hint{
  /* inline hint (keeps row in one line) */
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 240px;
  flex: 0 1 auto;
  margin-left: 10px;
}

.notify-highlight{
  outline: 2px solid rgba(125,211,252,.55);
  box-shadow: 0 0 0 6px rgba(125,211,252,.12);
  border-radius: 20px;
  transition: box-shadow .25s ease, outline-color .25s ease;
}


/* Info icon + tooltip for big-drop notifications */
.notify-check > span{
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-width: 0;
}

.notify-info{
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  padding: 0;
  border: 1px solid var(--stroke);
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor: help;
  user-select: none;
}

.notify-info:hover{
  color: var(--text);
  border-color: var(--text);
}

.notify-info:focus{
  outline: 2px solid var(--stroke);
  outline-offset: 2px;
}

.notify-info-tooltip{
  position: fixed;
  z-index: 99999;
  max-width: 360px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: rgba(18, 22, 26, 0.88);
  color: var(--text);
  font-size: 12px;
  line-height: 1.25;
  box-shadow: 0 12px 30px rgba(0,0,0,0.35);
  backdrop-filter: blur(10px);
}
.filters-subfield{
  display:flex;
  flex-direction:column;
  gap:8px;
  width:100%;
}
.filters-subfield .input{
  width:100%;
}


/* =========================================
   ARRIVAL SUGGEST (arrivalSuggest)
   - thin scrollbars inside list
   - "Готово" always visible (outside scroll)
   ========================================= */

/* The outer dropdown should NOT be the scrolling area */
#arrivalSuggest.suggestions{
  overflow: visible !important;
  max-height: none !important;
  display: flex;
  flex-direction: column;
  gap: 10px; /* spacing between blocks inside the panel */
}

/* Panel layout: header + list(scroll) + actions */
#arrivalSuggest.suggestions .arrival-panel{
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0; /* allow inner scroll area to shrink */
}

/* Make ONLY the city list scrollable */
#arrivalSuggest.suggestions .arrival-panel .panel-city{
  flex: 1 1 auto;
  min-height: 0;
  max-height: 240px; /* tune if needed */
  overflow: auto;
  padding-right: 6px; /* space for thin scrollbar */

  /* Firefox */
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.35) transparent;
}

/* WebKit scrollbars */
#arrivalSuggest.suggestions .arrival-panel .panel-city::-webkit-scrollbar{
  width: 6px;
}
#arrivalSuggest.suggestions .arrival-panel .panel-city::-webkit-scrollbar-track{
  background: transparent;
}
#arrivalSuggest.suggestions .arrival-panel .panel-city::-webkit-scrollbar-thumb{
  background: rgba(255,255,255,0.28);
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.10);
}
#arrivalSuggest.suggestions .arrival-panel .panel-city::-webkit-scrollbar-thumb:hover{
  background: rgba(255,255,255,0.40);
}

/* "Готово" area is always visible below the scroll */
#arrivalSuggest.suggestions .arrival-panel .panel-actions{
  position: sticky;
  bottom: 0;
  margin-top: 0;          /* keep spacing controlled by gap */
  padding-top: 10px;

  /* subtle separator & glass so it reads as a fixed footer */
  border-top: 1px solid rgba(255,255,255,0.10);
  background: linear-gradient(to bottom, rgba(0,0,0,0.0), rgba(0,0,0,0.20));
  backdrop-filter: blur(var(--blur));
}

/* Light theme scrollbars + footer */
[data-theme="light"] #arrivalSuggest.suggestions .arrival-panel .panel-city{
  scrollbar-color: rgba(0,0,0,0.35) transparent;
}
[data-theme="light"] #arrivalSuggest.suggestions .arrival-panel .panel-city::-webkit-scrollbar-thumb{
  background: rgba(0,0,0,0.22);
  border-color: rgba(0,0,0,0.10);
}
[data-theme="light"] #arrivalSuggest.suggestions .arrival-panel .panel-city::-webkit-scrollbar-thumb:hover{
  background: rgba(0,0,0,0.32);
}
[data-theme="light"] #arrivalSuggest.suggestions .arrival-panel .panel-actions{
  border-top-color: rgba(0,0,0,0.10);
  background: linear-gradient(to bottom, rgba(255,255,255,0.0), rgba(255,255,255,0.40));
}
