/* KIDSISTER — тема шапки, селекторов языка/валюты и слайдеров */

:root {
  --ks-pink: #D61D5E;
  --ks-pink-soft: #FBE6EE;
  --ks-pink-muted: #F7D4E0;
}

/* Язык / валюта — branded pill + menu (как выбор города) */
.ks-pill-select {
  position: relative;
  flex-shrink: 0;
  z-index: 2;
}
.ks-pill-trigger {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  font-family: "Montserrat", system-ui, sans-serif !important;
  font-weight: 700 !important;
  font-size: 0.75rem !important;
  letter-spacing: 0.02em;
  line-height: 1 !important;
  height: 2.25rem !important;
  min-width: 3.1rem;
  padding: 0 0.55rem 0 0.75rem !important;
  border-radius: 9999px !important;
  border: 1.5px solid rgba(214, 29, 94, 0.35) !important;
  background: linear-gradient(90deg, #fdf2f8 0%, #faf5ff 100%) !important;
  color: var(--ks-pink) !important;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.ks-pill-trigger:hover,
.ks-pill-trigger[aria-expanded="true"] {
  border-color: var(--ks-pink) !important;
  box-shadow: 0 0 0 3px rgba(214, 29, 94, 0.15);
}
.ks-pill-trigger-label {
  white-space: nowrap;
}
.ks-pill-chevron {
  color: var(--ks-pink);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.ks-pill-trigger[aria-expanded="true"] .ks-pill-chevron {
  transform: rotate(180deg);
}
.ks-pill-menu {
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 0;
  min-width: 100%;
  width: max-content;
  background: #fff;
  border: 2px solid rgba(214, 29, 94, 0.2);
  border-radius: 1rem;
  box-shadow: 0 16px 40px rgba(214, 29, 94, 0.14), 0 6px 16px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  z-index: 100000;
  padding: 0.35rem;
}
.ks-pill-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  text-align: left;
  font-family: "Montserrat", system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.65rem 0.85rem;
  border: 0;
  border-radius: 0.75rem;
  background: transparent;
  color: #111827;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.ks-pill-option:hover {
  background: rgba(214, 29, 94, 0.08);
  color: var(--ks-pink);
}
.ks-pill-option.is-active {
  background: var(--ks-pink);
  color: #fff;
}
.ks-pill-option.is-active:hover {
  background: var(--ks-pink);
  color: #fff;
}
.ks-pill-check {
  color: inherit;
  flex-shrink: 0;
}

/* Wide variant — city/hours on /prices */
.ks-pill-select--wide {
  width: 100%;
  z-index: 5;
}
.ks-pill-trigger--wide {
  width: 100% !important;
  min-width: 0;
  height: auto !important;
  min-height: 3rem;
  padding: 0.75rem 1rem !important;
  border-radius: 0.75rem !important;
  border-width: 2px !important;
  border-color: rgba(214, 29, 94, 0.2) !important;
  font-size: 0.9375rem !important;
  font-weight: 600 !important;
  color: #111827 !important;
  background: linear-gradient(90deg, #fdf2f8 0%, #faf5ff 100%) !important;
}
.ks-pill-trigger--wide .ks-pill-chevron {
  color: var(--ks-pink);
}
.ks-pill-menu--wide {
  width: 100%;
  left: 0;
  right: 0;
  border-radius: 1rem;
}

/* Legacy native select class (if any remain) */
.ks-locale-select {
  appearance: none;
  -webkit-appearance: none;
  font-family: "Montserrat", system-ui, sans-serif !important;
  font-weight: 700 !important;
  font-size: 0.75rem !important;
  letter-spacing: 0.02em;
  line-height: 1 !important;
  height: 2.25rem !important;
  min-width: 3.1rem;
  max-width: 3.6rem;
  padding: 0 1.35rem 0 0.65rem !important;
  border-radius: 9999px !important;
  border: 1.5px solid rgba(214, 29, 94, 0.35) !important;
  background-color: var(--ks-pink-soft) !important;
  color: var(--ks-pink) !important;
  cursor: pointer;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23D61D5E' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.45rem center;
}
.ks-locale-select:hover,
.ks-locale-select:focus {
  border-color: var(--ks-pink) !important;
  outline: none;
  box-shadow: 0 0 0 3px rgba(214, 29, 94, 0.15);
}
.ks-locale-select option {
  font-family: "Montserrat", system-ui, sans-serif;
  font-weight: 600;
  color: #111827;
}

.ks-header-locale {
  position: relative;
  z-index: 2;
  flex-shrink: 0 !important;
}

/* Мобильное меню: одна строка язык/валюта */
@media (max-width: 1023px) {
  .ks-header-locale .ks-pill-select {
    flex: 1 1 0;
    min-width: 0;
  }
  .ks-header-locale .ks-pill-trigger {
    width: 100%;
    height: 2.5rem !important;
    font-size: 0.875rem !important;
    justify-content: center;
  }
  .ks-locale-select {
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
    width: auto !important;
    height: 2.5rem !important;
    font-size: 0.875rem !important;
    padding-left: 0.85rem !important;
    padding-right: 1.5rem !important;
  }
}

/* ПК-шапка: без наложений */
.ks-header-row {
  width: 100%;
  max-width: 100%;
  overflow: visible;
}
.ks-header-nav {
  flex-wrap: nowrap !important;
  /* overflow hidden/auto clips «Услуги» / «Ещё» dropdowns below the nav row */
  overflow: visible !important;
  min-width: 0 !important;
  max-width: 100%;
}
.ks-header-nav > a,
.ks-header-nav > div {
  flex-shrink: 0 !important;
  white-space: nowrap;
}
.ks-header-nav > div.relative {
  z-index: 60;
}
.ks-header-nav > a,
.ks-header-nav > div > button {
  font-family: "Montserrat", system-ui, sans-serif !important;
  font-weight: 600 !important;
}

@media (min-width: 1024px) and (max-width: 1399px) {
  .ks-header-nav > a,
  .ks-header-nav > div > button {
    font-size: 12px !important;
    padding-left: 0.35rem !important;
    padding-right: 0.35rem !important;
  }
  .ks-header-city {
    width: 96px !important;
    max-width: 96px !important;
  }
  .ks-pill-trigger {
    min-width: 2.85rem;
    height: 2rem !important;
    font-size: 0.7rem !important;
  }
  .ks-locale-select {
    min-width: 2.85rem;
    max-width: 3.2rem;
    height: 2rem !important;
    font-size: 0.7rem !important;
  }
}

.ks-header-nav .ks-nav-services-menu {
  width: min(22rem, calc(100vw - 2rem)) !important;
}
.ks-header-nav .ks-nav-services-menu a,
.ks-header-nav .ks-nav-services-menu a > div {
  white-space: normal !important;
}
.ks-header-nav .ks-nav-services-menu .text-muted-foreground {
  white-space: normal !important;
  overflow-wrap: break-word;
  word-break: normal;
}

@media (min-width: 1400px) {
  .ks-header-nav > a,
  .ks-header-nav > div > button {
    font-size: 14px !important;
  }
}

/* Слайдеры (часы / фильтры) в розовой теме платформы */
input[type="range"].ks-range,
input[type="range"].accent-primary,
input[type="range"] {
  accent-color: var(--ks-pink);
}

input[type="range"].ks-range,
input[type="range"].w-full.h-2 {
  background: rgba(214, 29, 94, 0.18) !important;
  height: 8px;
  border-radius: 9999px;
}

input[type="range"].ks-range::-webkit-slider-runnable-track,
input[type="range"].w-full.h-2::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 9999px;
  background: rgba(214, 29, 94, 0.18);
}

input[type="range"].ks-range::-webkit-slider-thumb,
input[type="range"].w-full.h-2::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  margin-top: -6px;
  border-radius: 50%;
  background: linear-gradient(135deg, #D61D5E, #db2777);
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(214, 29, 94, 0.35);
  cursor: pointer;
}

input[type="range"].ks-range::-moz-range-track,
input[type="range"].w-full.h-2::-moz-range-track {
  height: 8px;
  border-radius: 9999px;
  background: rgba(214, 29, 94, 0.18);
  border: none;
}

input[type="range"].ks-range::-moz-range-thumb,
input[type="range"].w-full.h-2::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, #D61D5E, #db2777);
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(214, 29, 94, 0.35);
  cursor: pointer;
}

/* Блок «Видео о платформе» на главной */
.ks-platform-video-section {
  background:
    radial-gradient(ellipse 70% 55% at 15% 20%, rgba(214, 29, 94, 0.08), transparent 60%),
    radial-gradient(ellipse 60% 50% at 90% 80%, rgba(236, 72, 153, 0.07), transparent 55%),
    #fff;
}
.ks-platform-video-shell {
  display: flex;
  justify-content: center;
  padding-inline: 0.25rem;
}
.ks-platform-video-frame {
  position: relative;
  /* Телефон: ограничиваем высоту, ширина от 9:16 */
  height: min(62vh, 30.5rem);
  width: min(100%, calc(min(62vh, 30.5rem) * 9 / 16));
  aspect-ratio: 9 / 16;
  border-radius: 1.25rem;
  overflow: hidden;
  background: #111827;
  border: 1px solid rgba(214, 29, 94, 0.18);
  box-shadow:
    0 16px 40px rgba(214, 29, 94, 0.16),
    0 6px 16px rgba(15, 23, 42, 0.08);
}
@media (min-width: 480px) {
  .ks-platform-video-frame {
    height: min(66vh, 33rem);
    width: min(100%, calc(min(66vh, 33rem) * 9 / 16));
    border-radius: 1.35rem;
  }
}
@media (min-width: 768px) {
  .ks-platform-video-frame {
    height: auto;
    width: min(100%, 24rem);
    max-height: none;
    border-radius: 1.5rem;
  }
}
.ks-platform-video-media {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  object-fit: cover;
}
.ks-platform-video-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  cursor: pointer;
  background: #111827;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.ks-platform-video-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(15, 23, 42, 0.78) 0%,
    rgba(15, 23, 42, 0.28) 38%,
    rgba(214, 29, 94, 0.12) 100%
  );
  pointer-events: none;
}
.ks-platform-video-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  /* Чуть выше центра — не перекрывает подпись снизу на узких экранах */
  padding-bottom: 2.5rem;
}
.ks-platform-video-play-btn {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.97);
  box-shadow:
    0 0 0 10px rgba(255, 255, 255, 0.22),
    0 12px 28px rgba(15, 23, 42, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
@media (min-width: 768px) {
  .ks-platform-video-play {
    padding-bottom: 0;
  }
  .ks-platform-video-play-btn {
    width: 4.25rem;
    height: 4.25rem;
  }
}
.ks-platform-video-cover:hover .ks-platform-video-play-btn,
.ks-platform-video-cover:focus-visible .ks-platform-video-play-btn {
  transform: scale(1.06);
}
@media (hover: none) {
  .ks-platform-video-cover:active .ks-platform-video-play-btn {
    transform: scale(0.96);
  }
}
.ks-platform-video-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1rem 1rem 1.15rem;
  text-align: left;
  pointer-events: none;
}
@media (min-width: 768px) {
  .ks-platform-video-caption {
    padding: 1.25rem 1.25rem 1.4rem;
  }
}

/* Подкаст на /becomekidsister */
.ks-podcast-section {
  background:
    radial-gradient(ellipse 70% 55% at 12% 15%, rgba(214, 29, 94, 0.08), transparent 60%),
    radial-gradient(ellipse 55% 50% at 92% 85%, rgba(22, 165, 163, 0.10), transparent 55%),
    #fff;
}
.ks-podcast-shell {
  display: flex;
  justify-content: center;
}
.ks-podcast-frame {
  position: relative;
  width: 100%;
  max-width: 52rem;
  aspect-ratio: 800 / 532;
  border-radius: 1.25rem;
  overflow: hidden;
  background: #111827;
  border: 1px solid rgba(214, 29, 94, 0.18);
  box-shadow:
    0 16px 40px rgba(214, 29, 94, 0.14),
    0 6px 16px rgba(15, 23, 42, 0.08);
}
@media (min-width: 768px) {
  .ks-podcast-frame {
    border-radius: 1.5rem;
  }
}
.ks-podcast-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  object-fit: cover;
}
.ks-podcast-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  background: transparent;
}
.ks-podcast-frame:hover .ks-platform-video-play-btn,
.ks-podcast-frame:focus-within .ks-platform-video-play-btn {
  transform: scale(1.06);
}

/* City picker: parent overflow (Framer Motion / filter cards) was clipping the list */
*:has(.ks-city-dropdown),
*:has(.ks-pill-menu) {
  overflow: visible !important;
}
.ks-find-filters {
  overflow: visible !important;
}
/* Desktop header dropdown */
@media (min-width: 769px) {
  .ks-city-dropdown {
    position: absolute !important;
    top: auto !important;
    bottom: auto !important;
    left: 0 !important;
    right: auto !important;
    width: min(320px, calc(100vw - 1.5rem)) !important;
    max-height: min(420px, 70vh) !important;
    display: flex !important;
    flex-direction: column !important;
    z-index: 100000 !important;
  }
  .ks-city-dropdown-list {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: 320px !important;
    overflow-y: auto !important;
  }
  .ks-city-dropdown-list button {
    text-align: left !important;
    justify-content: space-between !important;
  }
  .ks-city-dropdown-list button > div {
    justify-content: flex-start !important;
    text-align: left !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
  }
  .ks-city-dropdown-list button span {
    text-align: left !important;
  }
}
/* Mobile bottom sheet */
@media (max-width: 768px) {
  .ks-city-dropdown {
    position: fixed !important;
    left: 12px !important;
    right: 12px !important;
    bottom: max(12px, env(safe-area-inset-bottom)) !important;
    top: auto !important;
    max-height: min(72dvh, 560px) !important;
    display: flex !important;
    flex-direction: column !important;
    z-index: 100000 !important;
  }
  .ks-city-dropdown-list {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }
}

/* Footer documents: license under «Соглашение об условиях» (4th column) */
@media (min-width: 1024px) {
  .ks-docs-license {
    grid-column-start: 4;
    grid-row-start: 3;
  }
}

/* Manager chat chips: faster taps, fewer ghost clicks on iOS */
.manager-chat-ripple-pulse {
  pointer-events: none;
}
