/* Mobile header + tabbar — Figma zkgNyXIfc9ltBgwt00NmrA 1:1668 / fixed 1:2358 */

:root {
  --yz-tabbar-h: 60px;
}

@media (min-width: 769px) {
  .yz-header__mobile,
  .yz-header__mobile-search,
  .yz-nav-menu,
  .yz-tabbar {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .yz-header__topbar,
  .yz-header__main {
    display: none !important;
  }

  .yz-menu-root {
    display: none !important;
  }

  body {
    padding-bottom: var(--yz-tabbar-h);
  }

  body.is-menu-open {
    overflow: hidden;
    padding-bottom: 0;
  }

  body.is-menu-open .yz-tabbar {
    display: none !important;
  }

  /* ── Mobile header block ── */
  .yz-header__mobile {
    display: block;
    width: 100%;
  }

  .yz-header__mobile-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    background: var(--yz-bg-top);
    font-size: 14px;
    letter-spacing: -0.2px;
    line-height: 1.4;
    overflow: hidden;
    max-height: 48px;
    opacity: 1;
    pointer-events: auto;
    transition: max-height 0.28s ease, opacity 0.22s ease, padding 0.28s ease;
  }

  .yz-header.is-scrolled .yz-header__mobile-bar {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
    pointer-events: none;
  }

  /* Figma 1:2254 — в режиме поиска topbar всегда виден */
  .yz-header.is-search .yz-header__mobile-bar {
    max-height: 48px;
    opacity: 1;
    padding-top: 12px;
    padding-bottom: 12px;
    pointer-events: auto;
  }

  .yz-header__mobile-bar .yz-header__callback {
    color: var(--yz-blue);
    text-decoration: underline;
    text-underline-offset: 2px;
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    cursor: pointer;
    white-space: nowrap;
  }

  .yz-header__mobile-bar .yz-header__phone {
    font-weight: 500;
    color: var(--yz-text);
    text-decoration: none;
    white-space: nowrap;
  }

  .yz-header__mobile-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    background: #fff;
    border-bottom: 1px solid var(--yz-border);
    gap: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0);
    transition: box-shadow 0.28s ease;
  }

  .yz-header.is-scrolled .yz-header__mobile-row {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  }

  .yz-header.is-search .yz-header__mobile-row {
    display: none;
  }

  .yz-header__mobile-left {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
  }

  .yz-header__burger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--yz-border);
    border-radius: var(--yz-radius);
    background: #fff;
    cursor: pointer;
    flex-shrink: 0;
  }

  .yz-header__burger-icon--menu {
    width: 20px;
    height: 20px;
    display: block;
  }

  .yz-header__burger-icon--close {
    display: none;
    width: 20px;
    height: 20px;
  }

  body.is-menu-open .yz-header__burger {
    border: 0;
    background: var(--yz-blue-light);
    padding: 10px;
  }

  body.is-menu-open .yz-header__burger-icon--menu {
    display: none;
  }

  body.is-menu-open .yz-header__burger-icon--close {
    display: block;
    width: 20px;
    height: 20px;
  }

  .yz-header__mobile-logo {
    display: block;
    width: 52px;
    height: 50px;
    flex-shrink: 0;
  }

  .yz-header__mobile-logo img {
    display: block;
    width: 52px;
    height: 50px;
    object-fit: contain;
  }

  .yz-header__mobile-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
  }

  .yz-header__mobile-phone {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 10px;
    border-radius: var(--yz-radius);
    background: var(--yz-blue);
    text-decoration: none;
    flex-shrink: 0;
  }

  .yz-header__mobile-phone img {
    display: block;
    width: 20px;
    height: 20px;
  }

  .yz-header.is-scrolled .yz-header__mobile-phone {
    display: flex;
  }

  .yz-header__mobile-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--yz-radius);
    overflow: hidden;
    padding: 0;
    border: 0;
    text-decoration: none;
    cursor: pointer;
    flex-shrink: 0;
  }

  .yz-header__mobile-icon:not(.yz-social) {
    background: none;
  }

  .yz-header__mobile-icon--search {
    padding: 10px;
    border: 1px solid var(--yz-border);
    background: #fff;
    box-sizing: border-box;
  }

  .yz-header__mobile-icon--search img {
    display: block;
    width: 20px;
    height: 20px;
  }

  /* Search row */
  .yz-header__mobile-search {
    display: none;
    padding: 17px 15px;
    background: #fff;
    border-bottom: 1px solid var(--yz-border);
  }

  .yz-header.is-search .yz-header__mobile-search {
    display: block;
  }

  .yz-header.is-search.is-scrolled .yz-header__mobile-search {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  }

  /* Figma 1:2254 — topbar остаётся, строка с бургером скрывается */
  .yz-header__mobile-search-form {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    border: 1px solid var(--yz-border);
    border-radius: var(--yz-radius);
    background: #fff;
  }

  .yz-header__mobile-search-input {
    flex: 1;
    min-width: 0;
    padding: 0;
    border: 0;
    background: none;
    font-family: inherit;
    font-size: 16px;
    line-height: 1.4;
    letter-spacing: -0.2px;
    color: var(--yz-text);
  }

  .yz-header__mobile-search-input::placeholder {
    color: var(--yz-gray);
  }

  .yz-header__mobile-search-input:focus {
    outline: none;
  }

  .yz-header__mobile-search-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
  }

  .yz-header__mobile-search-submit img {
    display: block;
    width: 20px;
    height: 20px;
  }

  /* ── Slide-out nav menu — Figma 1:2037 / 1:2125 / 1:2198 ── */
  .yz-nav-menu {
    display: none;
    position: fixed;
    top: var(--yz-header-offset, 118px);
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    flex-direction: column;
    background: #fff;
    transition: top 0.28s ease;
  }

  body.is-menu-open .yz-nav-menu {
    display: flex;
  }

  .yz-nav-menu__access {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    padding: 12px 15px;
    border-bottom: 1px solid var(--yz-border);
    font-size: 14px;
    letter-spacing: -0.2px;
    line-height: 1.4;
  }

  .yz-nav-menu__access img {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
  }

  .yz-nav-menu__stack {
    position: relative;
    flex: 1;
    min-height: 0;
    overflow: hidden;
  }

  .yz-nav-menu__panel {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    background: #fff;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    z-index: 1;
  }

  .yz-nav-menu__panel.is-root,
  .yz-nav-menu__panel.is-active {
    transform: translateX(0);
    z-index: 2;
  }

  .yz-nav-menu__panel.is-behind {
    transform: translateX(-30%);
    z-index: 1;
  }

  .yz-nav-menu__panel.is-leaving {
    transform: translateX(100%);
    z-index: 3;
  }

  .yz-nav-menu__scroll {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 20px 15px 40px;
  }

  .yz-nav-menu__panel--sub .yz-nav-menu__scroll {
    padding-bottom: 24px;
  }

  .yz-nav-menu__list {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .yz-nav-menu__panel--sub .yz-nav-menu__list {
    gap: 15px;
  }

  .yz-nav-menu__item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: -0.3px;
    line-height: 1.4;
    color: var(--yz-text);
    text-align: left;
    text-decoration: none;
    cursor: pointer;
  }

  .yz-nav-menu__panel--sub .yz-nav-menu__item {
    font-size: 14px;
    font-weight: 400;
    letter-spacing: -0.2px;
    line-height: 1.43;
  }

  .yz-nav-menu__item span {
    flex: 1;
    min-width: 0;
  }

  .yz-nav-menu__arrow {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 1px;
  }

  .yz-nav-menu__panel--sub .yz-nav-menu__arrow {
    margin-top: 0;
  }

  .yz-nav-menu__back {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
  }

  .yz-nav-menu__back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    padding: 6px;
    border: 0;
    border-radius: var(--yz-radius);
    background: var(--yz-bg-top);
    cursor: pointer;
  }

  .yz-nav-menu__back-btn svg {
    width: 18px;
    height: 18px;
  }

  .yz-nav-menu__back-title {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: -0.3px;
    line-height: 1.4;
  }

  .yz-nav-menu__bottom {
    margin-top: auto;
    padding-top: 4px;
  }

  .yz-nav-menu__promos {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: auto;
    padding-top: 20px;
  }

  .yz-nav-menu__promo {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    border-radius: var(--yz-radius);
    background: var(--yz-bg-top);
    text-decoration: none;
    color: inherit;
  }

  .yz-nav-menu__promo-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
  }

  .yz-nav-menu__promo span {
    font-size: 14px;
    font-weight: 400;
    letter-spacing: -0.2px;
    line-height: 1.4;
    color: var(--yz-gray-dark);
  }

  .yz-nav-menu__info {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .yz-nav-menu__info-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
  }

  .yz-nav-menu__info-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
  }

  .yz-nav-menu__info-text {
    flex: 1;
    min-width: 0;
    margin: 0;
    font-size: 14px;
    letter-spacing: -0.2px;
    line-height: 1.4;
  }

  .yz-nav-menu__info-row--schedule .yz-nav-menu__info-text {
    max-width: 300px;
  }

  .yz-nav-menu__info-row--address .yz-nav-menu__info-text {
    max-width: 294px;
  }

  .yz-nav-menu__schedule {
    min-height: 40px;
  }

  .yz-nav-menu__address {
    min-height: 40px;
  }

  .yz-nav-menu__address-line1,
  .yz-nav-menu__address-tail {
    margin: 0;
  }

  .yz-nav-menu__address-line2 {
    display: flex;
    align-items: center;
    min-height: 20px;
  }

  .yz-nav-menu__address-tail {
    flex-shrink: 0;
    margin-right: 12px;
  }

  .yz-nav-menu__metro {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    font-size: 14px;
    line-height: 1.4;
    white-space: nowrap;
  }

  .yz-nav-menu__metro-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #44b85c;
    flex-shrink: 0;
  }

  .yz-nav-menu__metro-dash {
    margin: 0 1px;
  }

  .yz-nav-menu__metro-walk {
    width: 11px;
    height: 16px;
    flex-shrink: 0;
  }

  .yz-nav-menu__actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 20px;
  }

  .yz-nav-menu__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    padding: 13px 20px;
    border-radius: var(--yz-radius);
    border: 0;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: -0.1px;
    line-height: 1.25;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
    text-align: center;
    white-space: nowrap;
  }

  .yz-nav-menu__btn--ghost {
    background: var(--yz-blue-light);
    color: var(--yz-blue);
  }

  .yz-nav-menu__btn--primary {
    background: var(--yz-blue);
    color: #fff;
  }

  /* ── Tab bar — Figma 8039:2779 ── */
  .yz-tabbar {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1001;
    height: var(--yz-tabbar-h);
    background: #fff;
    border-radius: 10px 10px 0 0;
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.04);
    align-items: stretch;
    justify-content: space-between;
  }

  .yz-tabbar__item {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 0;
    padding: 10px 4px;
    text-decoration: none;
    color: #424242;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.24;
    letter-spacing: -0.18px;
    background: none;
    border: 0;
    cursor: pointer;
    font-family: inherit;
  }

  .yz-tabbar__item img {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    display: block;
  }
}
