/* Новые навбары мобильной версии (Figma 16 Global Navigation): верх 34:10731, низ 34:10824 / 34:10299.
   Подключается в header_mobile_2020.php вместо красных .header / .footer (пока только ?debug=1). */

@font-face {
  font-family: "TT Prosto Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/imgs/2020/fonts/TT-Prosto-Sans-Regular.otf") format("opentype");
}

@font-face {
  font-family: "TT Prosto Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/imgs/2020/fonts/TT-Prosto-Sans-Bold.otf") format("opentype");
}

/* —— Top nav: 64px, logo 202×29, location control —— */
.app-top-nav {
  position: fixed;
  z-index: 100;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 64px;
  padding: 0 20px 0 24px;
  background: #fff;
  box-sizing: border-box;
}

.app-top-nav__logo {
  display: block;
  flex-shrink: 0;
  width: 202px;
  height: 29px;
  border-bottom: none;
}

.app-top-nav__logo img {
  display: block;
  width: 202px;
  height: 29px;
  max-width: none;
}

.app-top-nav__location {
  display: flex;
  flex: 1 0 0;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  min-width: 0;
  height: 20px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: #09034b;
  font-family: "TT Prosto Sans", "Prosto", sans-serif;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}

.app-top-nav__location-icon {
  display: block;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.app-top-nav__location-name {
  display: block;
  min-width: 0;
  padding: 2px 0;
  overflow: hidden;
  font-size: 12px;
  font-weight: 400;
  line-height: 15px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* —— Top nav / Tertiary: 52px, заголовок по центру (чат «Служба поддержки») —— */
.app-top-nav--tertiary {
  height: 52px;
  padding: 0 48px;
  justify-content: center;
}

.app-top-nav__title {
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  color: #09034b;
  font-family: "TT Prosto Sans", "Prosto", sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* —— APP top nav 34:9820: красная плашка 132 (statusline 49 + search 59 + 24), скругление 29 снизу.
   Native header/footer скрыты (headerHidden/footerHidden), сверху — отступ под статус-бар:
   50px как в basket2 (device-width) × 480/393 ≈ 61px. —— */
.gapp-top {
  position: relative;
  z-index: 60;
  padding: 0 0 24px;
  border-radius: 0 0 29px 29px;
  background: #ed1d51;
  font-family: "TT Prosto Sans", "Prosto", sans-serif;
  box-sizing: border-box;
}

body.gnav-app .gapp-top {
  padding-top: 61px;
}

/* Главная и второй уровень: шапка зафиксирована, под ней распорка той же высоты */
.gapp-top:not(.gapp-top--inner) {
  position: fixed;
  z-index: 100;
  top: 0;
  right: 0;
  left: 0;
}

.gapp-top:not(.gapp-top--inner) #search_inner.gapp-top__search #wh_suggest {
  max-height: calc(100vh - 300px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.gapp-top-spacer {
  height: calc(61px + 49px + 59px + 24px);
}

.gapp-top-spacer.gapp-top-spacer--secondary {
  height: calc(61px + 64px + 9px);
}

.gapp-top__statusline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 49px;
  padding: 0 24px 0 20px;
  box-sizing: border-box;
}

.gapp-top__location {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: #fff;
  font-family: inherit;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}

.gapp-top__pin,
.gapp-top__chevron {
  display: block;
  flex-shrink: 0;
  max-width: none;
}

.gapp-top__location-name {
  display: block;
  min-width: 0;
  overflow: hidden;
  font-size: 17px;
  font-weight: 400;
  line-height: 24px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.gapp-top__points {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  border: 0;
  color: #fff;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.gapp-top__points-value {
  font-size: 17px;
  font-weight: 700;
  line-height: 24px;
  white-space: nowrap;
}

.gapp-top__points-star {
  display: flex;
  padding-bottom: 3px;
}

.gapp-top__points-star img {
  display: block;
  width: 20px;
  height: 20px;
  max-width: none;
}

.gapp-top__search-row {
  padding: 0 24px;
}

/* —— WEB: блок поиска 34:8456 — белая плашка 88 (py 15) с тем же полем, что в APP. —— */
.gnav-search {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 88px;
  background: #fff;
  box-sizing: border-box;
  font-family: "TT Prosto Sans", "Prosto", sans-serif;
  text-align: left;
}

/* Второй уровень 106:3601: вместо хлебных крошек — отступ под фиксированную шапку 64, поле с pl 17 */
.gnav-top-spacer {
  height: 64px;
}

.gnav-search--l2 #search_inner.gapp-top__search .gapp-top__field {
  padding-left: 17px;
}

#search_inner.gapp-top__search {
  position: relative;
  width: auto;
  margin: 0;
}

#search_inner.gapp-top__search .gapp-top__field {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 59px;
  padding: 0 15px 0 12px;
  border-radius: 20px;
  background: #f2f4f7;
  box-sizing: border-box;
}

.gapp-top__catalog {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 107px;
  height: 34px;
  border: 0;
  border-radius: 10px;
  background: #ed1d51;
  color: #fff;
  text-decoration: none;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

.gapp-top__catalog img {
  display: block;
  width: 24px;
  height: 24px;
  max-width: none;
}

.gapp-top__catalog-text {
  padding: 4px 0 1px;
  font-size: 15px;
  font-weight: 400;
  line-height: 20px;
  white-space: nowrap;
}

#search_inner.gapp-top__search #wh {
  flex: 1 0 0;
  min-width: 0;
  width: auto;
  height: 24px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #09034b;
  font-family: "TT Prosto Sans", "Prosto", sans-serif;
  font-size: 17px;
  line-height: 24px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

#search_inner.gapp-top__search #wh::placeholder {
  font-family: "TT Prosto Sans", "Prosto", sans-serif;
  font-size: 17px;
  color: #72798c;
  opacity: 1;
}

#search_inner.gapp-top__search #wh_btn {
  position: static;
  flex-shrink: 0;
  width: 39px;
  height: 39px;
  background: none;
  cursor: pointer;
}

#search_inner.gapp-top__search #wh_btn img {
  display: block;
  width: 39px;
  height: 39px;
  max-width: none;
}

#search_inner.gapp-top__search #wh_suggest {
  top: 59px;
}

/* —— APP top nav, внутренняя страница 34:9150: фиксированная белая панель 64 (кнопки 54, иконки 24, заголовок Bold 17/24)
   + белая плашка поиска (py 20). —— */
.gapp-bar {
  position: fixed;
  z-index: 100;
  top: 0;
  right: 0;
  left: 0;
  background: #fff;
}

body.gnav-app .gapp-bar {
  padding-top: 61px;
}

.gapp-bar__inner {
  display: flex;
  align-items: center;
  height: 64px;
  padding: 0 5px;
  box-sizing: border-box;
}

.gapp-bar__btn {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}

a.gapp-bar__btn {
  border-bottom: 0;
}

.gapp-bar__btn img {
  display: block;
  width: 24px;
  height: 24px;
  max-width: none;
}

.gapp-bar__btn--toggle .gapp-bar__on,
.gapp-bar__btn--toggle.check .gapp-bar__off,
.gapp-bar__btn--toggle.faved .gapp-bar__off {
  display: none;
}

.gapp-bar__btn--toggle.check .gapp-bar__on,
.gapp-bar__btn--toggle.faved .gapp-bar__on {
  display: block;
}

/* Детальная развлечения (34:9544): только панель 64, без плашки с поиском */
.gapp-bar-spacer {
  height: 64px;
}

body.gnav-app .gapp-bar-spacer {
  height: calc(61px + 64px);
}

.gapp-bar__title {
  flex: 1 0 0;
  min-width: 0;
  overflow: hidden;
  color: #09034b;
  font-family: "TT Prosto Sans", "Prosto", sans-serif;
  font-size: 17px;
  font-weight: 700;
  line-height: 24px;
  text-align: center;
  white-space: nowrap;
  text-overflow: ellipsis;
  position: relative;
  top: 2px;
}

a.gapp-bar__title,
a.gapp-bar__title:hover {
  color: #09034b;
  text-align: left;
  text-decoration: none;
  border-bottom: 0;
}

.gapp-top.gapp-top--inner,
body.gnav-app .gapp-top.gapp-top--inner {
  padding: 84px 0 20px;
  border-radius: 0;
  background: #fff;
}

body.gnav-app .gapp-top.gapp-top--inner {
  padding-top: calc(61px + 84px);
}

/* —— APP top nav, второй уровень 108:6637: белая плашка 73 (строка 64: «назад» 54 + поле поиска 49, pl 5 pr 24), скругление 29 снизу —— */
.gapp-top.gapp-top--secondary {
  padding: 0 0 9px;
  background: #fff;
}

body.gnav-app .gapp-top.gapp-top--secondary {
  padding-top: 61px;
}

.gapp-top--secondary .gapp-top__search-row {
  display: flex;
  align-items: center;
  height: 64px;
  padding: 0 24px 0 5px;
}

.gapp-top--secondary #search_inner.gapp-top__search {
  flex: 1 0 0;
  min-width: 0;
}

.gapp-top--secondary #search_inner.gapp-top__search .gapp-top__field {
  height: 49px;
  padding: 0 15px 0 20px;
}

.gapp-top--secondary #search_inner.gapp-top__search #wh_suggest {
  top: 49px;
}

/* —— Модальное окно (оверлей) 34:9278: фон #f5f6fa на весь экран, сверху панель 64 с заголовком и крестиком. —— */
.fuzz.gapp-modal-fuzz {
  background: #f5f6fa;
}

#div_regions.gapp-modal,
#div_regions_all.gapp-modal {
  height: 100%;
  margin: 0 !important;
  padding-top: 64px;
  box-sizing: border-box;
}

#div_regions.gapp-modal div.container,
#div_regions_all.gapp-modal div.container {
  padding: 0 0 30px;
}

body.gnav-app #div_regions.gapp-modal,
body.gnav-app #div_regions_all.gapp-modal {
  padding-top: calc(61px + 64px);
}

.gapp-bar.gapp-bar--modal {
  z-index: 2;
}

/* —— Шторка-подтверждение (как «Удалить все товары из корзины?» в basket2, Figma 1677:6499),
   размеры basket2 (393) × 480/393: pt 49, px 24, заголовок 22/29, кнопки 64, gap 20, скругление 29. —— */
.fuzz.slideup .popup.gsheet {
  height: auto;
  bottom: -100%;
  left: 0;
  right: 0;
  margin: 0;
  padding: 49px 24px calc(24px + env(safe-area-inset-bottom, 0px));
  border-radius: 29px 29px 0 0;
  background: #fff;
  font-family: "TT Prosto Sans", "Prosto", sans-serif;
  box-sizing: border-box;
}

.fuzz.slideup .popup.gsheet.active {
  bottom: 0;
}

.fuzz.slideup .popup.gsheet .grab.gsheet__handle {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 54px;
  padding: 0;
}

.fuzz.slideup .popup.gsheet .gsheet__handle::after {
  content: '';
  position: absolute;
  top: 15px;
  left: 50%;
  width: 76px;
  height: 5px;
  border-radius: 3px;
  background: #72798c;
  transform: translateX(-50%);
}

.gsheet__close {
  position: absolute;
  z-index: 3;
  top: 15px;
  right: 15px;
  width: 24px;
  height: 24px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.gsheet__close img {
  display: block;
  width: 24px;
  height: 24px;
}

.gsheet__title {
  margin: 0 0 20px;
  padding: 15px;
  color: #09034b;
  font-size: 22px;
  font-weight: 700;
  line-height: 29px;
  text-align: center;
}

.gsheet__buttons {
  display: flex;
  gap: 20px;
}

.gsheet__btn {
  display: flex;
  flex: 1 0 0;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 64px;
  margin: 0;
  padding: 0 29px;
  border: 0;
  border-radius: 61px;
  font-family: inherit;
  font-size: 17px;
  font-weight: 700;
  line-height: 24px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}

.gsheet__btn--red {
  background: #ed1d51;
  color: #fff;
}

.gsheet__btn--secondary {
  background: #d9e1e7;
  color: #09034b;
}

/* Sheet / Base 101:101 (393 × 480/393): pt 39, ручка 76×5 сверху 10, текст Body 17/24 слева, кнопки в контейнере py 24 */
.fuzz.slideup .popup.gsheet.gsheet--base {
  padding-top: 39px;
}

.fuzz.slideup .popup.gsheet.gsheet--base .gsheet__handle::after {
  top: 10px;
}

.gsheet--base .gsheet__text {
  margin: 0 0 29px;
  color: #09034b;
  font-size: 17px;
  line-height: 24px;
  text-align: left;
}

.gsheet--base .gsheet__buttons {
  padding: 24px 0;
}

/* —— Bottom nav: shadow 24 + bar 73, items 54, icons 39, badge 20 (как basket2.css) —— */
.app-bottom-nav {
  position: fixed;
  z-index: 100;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  pointer-events: none;
}

.app-bottom-nav__shadow {
  height: 24px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.1));
  flex-shrink: 0;
}

.app-bottom-nav__bar {
  display: flex;
  height: 73px;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px env(safe-area-inset-bottom, 0px);
  background: #fff;
  pointer-events: auto;
  box-sizing: content-box;
}

.app-bottom-nav__item {
  position: relative;
  display: flex;
  width: 54px;
  height: 54px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-bottom: none;
  -webkit-tap-highlight-color: transparent;
}

.app-bottom-nav__icon {
  display: block;
  width: 39px;
  height: 39px;
  flex-shrink: 0;
}

.app-bottom-nav__icon img {
  display: block;
  width: 39px;
  height: 39px;
  max-width: none;
}

.app-bottom-nav__badge {
  position: absolute;
  top: 4px;
  right: 1px;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1px 2px 0;
  border: 2px solid #fff;
  border-radius: 12px;
  background: #ed1d51;
  color: #fff;
  box-sizing: border-box;
  overflow: hidden;
}

.app-bottom-nav__badge-text {
  display: block;
  font-family: "TT Prosto Sans", "Prosto", sans-serif;
  font-size: 10px;
  font-weight: 700;
  line-height: 10px;
  white-space: nowrap;
}

/* —— Старый layout под новые навбары —— */
body.gnav .breadcrumbs {
  margin-top: 64px;
}

body.gnav-app .breadcrumbs {
  margin-top: 10px;
}

body.gnav,
body.gnav-app {
  padding-bottom: calc(33px + env(safe-area-inset-bottom, 0px));
}

/* Как basket2: окно не прокручивается (иначе Android тянет страницу вместе с fixed-навбарами),
   контент перенесён в #gnav_scroll скриптом /js/gnav_scroll.js */
html.gnav-scroll,
html.gnav-scroll > body {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

html.gnav-scroll > body {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  padding-bottom: 0;
}

#gnav_scroll {
  position: fixed;
  z-index: 1;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  padding-bottom: calc(33px + env(safe-area-inset-bottom, 0px));
  overflow-x: hidden;
  overflow-y: scroll;
  overscroll-behavior-x: none;
  overscroll-behavior-y: auto;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
}

#gnav_scroll.gnav-overscrolling {
  overflow-y: hidden;
}

/* Кнопка сравнения на карточке, Figma 130:7726 / 130:7729: 27×27, белая, скругление 8, иконка 16 */
body.gnav div.courses .courses_list div.course div.compare,
body.gnav-app div.courses .courses_list div.course div.compare,
body.gnav div.courses .courses_list div.course div.compare.check,
body.gnav-app div.courses .courses_list div.course div.compare.check {
  width: 27px;
  height: 27px;
  min-width: 0;
  padding: 0;
  box-sizing: border-box;
  border-radius: 8px;
  background: #fff url(/imgs/2026/svg/card-compare.svg) no-repeat center / 16px 16px;
}

body.gnav div.courses .courses_list div.course div.compare.check,
body.gnav-app div.courses .courses_list div.course div.compare.check {
  background-image: url(/imgs/2026/svg/card-compare-on.svg);
}

body.gnav div.courses .courses_list div.course div.compare span,
body.gnav-app div.courses .courses_list div.course div.compare span {
  display: none;
}

body.gnav .button_fixed,
body.gnav div.compares,
body.gnav #apply_filters_btn,
body.gnav-app .button_fixed,
body.gnav-app div.compares,
body.gnav-app #apply_filters_btn {
  bottom: calc(73px + env(safe-area-inset-bottom, 0px));
}

/* —— Info Snackbar, Figma 182:2137 (480): px 24, p 20, скругление 20, иконка 44 в белом кружке, gap 20,
   текст 17/24, кнопка 15/20 (px 15 py 10), крестик Small 24 в 10px от угла; top ставит showInfoSnackbar() —— */
.snackbar-wrap.snackbar-info {
  top: 74px;
  bottom: auto;
  padding: 0 24px;
  transform: translateY(-12px);
}

.snackbar-wrap.snackbar-info.snackbar-visible {
  transform: translateY(0);
}

.snackbar-info .snackbar {
  max-width: none;
  padding: 20px;
  border-radius: 20px;
  gap: 10px;
}

.snackbar-info .snackbar__message {
  padding-right: 20px;
  font-size: 17px;
  line-height: 24px;
}

.snackbar-info .snackbar__info-row {
  display: flex;
  align-items: center;
  gap: 20px;
}

.snackbar-info .snackbar__icon {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
}

.snackbar-info .snackbar__icon img {
  display: block;
  width: 24px;
  height: 24px;
}

.snackbar-info .snackbar__text {
  flex: 1 1 auto;
  min-width: 0;
}

.snackbar-info .snackbar__buttons {
  gap: 10px;
}

.snackbar-info .snackbar__btn {
  padding: 10px 15px;
  border-radius: 20px;
  font-size: 15px;
  line-height: 20px;
}

.snackbar-info .snackbar__close {
  top: 10px;
  right: 10px;
  width: 24px;
  height: 24px;
}

.snackbar-info .snackbar__close img {
  width: 24px;
  height: 24px;
}

body.gnav-kbd .app-bottom-nav {
  display: none;
}

/* Плашка «Уведомления отключены» (blocks/app.php) при новых навбарах пока не показывается */
body.gnav-app #notifications_disabled_block {
  display: none !important;
}

body.gnav-kbd .button_fixed,
body.gnav-kbd div.compares,
body.gnav-kbd #apply_filters_btn {
  bottom: 0;
}
