/* Klevby mobile tabbar styles
   Behavior-preserving split from assets/css/responsive/mobile.css.
   Scope: only the fixed bottom mobile tabbar container and its visual overrides.
*/

@media (max-width: 900px) {
  .mobile-tabbar {
    position: fixed;
    left: var(--klevby-home-content-inset, 22px);
    right: var(--klevby-home-content-inset, 22px);
    bottom: var(--kg-touchbar-bottom-offset, var(--klevby-touchbar-bottom-offset));
    z-index: 1100;

    height: var(--kg-touchbar-height, var(--klevby-touchbar-height));
    display: none;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: stretch;
    gap: 2px;

    padding: 6px 10px;

    background: #161c20;
    border: 0.9px solid rgba(88, 108, 124, 0.24);
    border-radius: 16px;
    box-sizing: border-box;

    box-shadow:
      0 14px 34px rgba(0, 0, 0, 0.38),
      0 5px 16px rgba(0, 0, 0, 0.24),
      inset 0 1px 0 rgba(255, 255, 255, 0.07);

    backdrop-filter: blur(18px) saturate(1.08);
    -webkit-backdrop-filter: blur(18px) saturate(1.08);
  }

  body[data-app-chrome-mode="home"]:has(#homeSection:not(.hidden)) .mobile-tabbar {
    top: var(--klevby-home-touchbar-top, 847px);
    bottom: auto;
    height: var(--klevby-home-touchbar-height, 70px);
    display: grid;
  }

  .mobile-tabbar .mobile-tab-btn {
    min-width: 0;
    min-height: 0;
    height: 100%;
    padding: 5px 4px 4px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;

    border: 0;
    border-radius: 20px;
    background: transparent;

    color: #b8b1ad;
    font: inherit;
    text-decoration: none;

    -webkit-tap-highlight-color: transparent;

    transition:
      color 0.18s ease,
      background 0.18s ease,
      transform 0.18s ease,
      box-shadow 0.18s ease;
  }

  .mobile-tabbar .mobile-tab-btn:active {
    transform: scale(0.96);
  }

  .mobile-tabbar .mobile-tab-btn.active,
  .mobile-tabbar .mobile-tab-btn.is-active,
  .mobile-tabbar .mobile-tab-btn[aria-current="page"],
  .mobile-tabbar .mobile-tab-btn[aria-selected="true"],
  .mobile-tabbar .mobile-tab-btn[data-active="true"] {
    color: #ffffff;
  }

  .mobile-tabbar .mobile-tab-btn.active .mobile-tab-icon,
  .mobile-tabbar .mobile-tab-btn.active .mobile-tab-text,
  .mobile-tabbar .mobile-tab-btn.is-active .mobile-tab-icon,
  .mobile-tabbar .mobile-tab-btn.is-active .mobile-tab-text,
  .mobile-tabbar .mobile-tab-btn[aria-current="page"] .mobile-tab-icon,
  .mobile-tabbar .mobile-tab-btn[aria-current="page"] .mobile-tab-text,
  .mobile-tabbar .mobile-tab-btn[aria-selected="true"] .mobile-tab-icon,
  .mobile-tabbar .mobile-tab-btn[aria-selected="true"] .mobile-tab-text,
  .mobile-tabbar .mobile-tab-btn[data-active="true"] .mobile-tab-icon,
  .mobile-tabbar .mobile-tab-btn[data-active="true"] .mobile-tab-text {
    color: #f4f1ee;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.24);
  }

  .mobile-tabbar .mobile-tab-btn:not(.mobile-tab-create).active,
  .mobile-tabbar .mobile-tab-btn:not(.mobile-tab-create).is-active,
  .mobile-tabbar .mobile-tab-btn:not(.mobile-tab-create)[aria-current="page"],
  .mobile-tabbar .mobile-tab-btn:not(.mobile-tab-create)[aria-selected="true"],
  .mobile-tabbar .mobile-tab-btn:not(.mobile-tab-create)[data-active="true"] {
    background: rgba(255, 255, 255, 0.055);
    box-shadow:
      inset 0 0 0 1px rgba(255, 255, 255, 0.065),
      0 6px 14px rgba(0, 0, 0, 0.16);
  }

  .mobile-tabbar .mobile-tab-btn:not(.mobile-tab-create) .mobile-tab-icon {
    width: 26px;
    height: 26px;
    min-width: 26px;
    min-height: 26px;
    flex-shrink: 0;
  }

  .mobile-tabbar .mobile-tab-icon {
    width: 26px;
    height: 26px;

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

    margin: 0;
    padding: 0;

    font-size: 23px;
    line-height: 1;
    font-weight: 750;

    color: currentColor;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.28);
  }

  .mobile-tabbar .mobile-tab-icon svg,
  .mobile-tabbar .mobile-tab-icon .mobile-tab-svg {
    width: 22px;
    height: 22px;
    display: block;
    flex-shrink: 0;
    stroke-width: 1.85;
  }

  .mobile-tabbar .mobile-tab-icon .mobile-tab-svg--map {
    transform: scale(0.92);
    transform-origin: center;
  }

  .mobile-tabbar .mobile-tab-icon .mobile-tab-svg--chat {
    transform: scale(0.88);
    transform-origin: center;
  }

  .mobile-tabbar #nav-chat {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    gap: 3px !important;
    color: #b8b1ad !important;
  }

  .mobile-tabbar #nav-chat .mobile-tab-icon {
    width: 26px !important;
    height: 26px !important;
    min-width: 26px !important;
    min-height: 26px !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: currentColor !important;
    font-size: inherit !important;
    filter: none !important;
    transform: none !important;
  }

  .mobile-tabbar #nav-chat .mobile-tab-text {
    font-size: 12px !important;
    line-height: 1.05 !important;
    font-weight: 650 !important;
    color: currentColor !important;
  }

  .mobile-tabbar #nav-chat.active {
    color: var(--green) !important;
  }

  .mobile-tabbar #nav-chat.active .mobile-tab-icon,
  .mobile-tabbar #nav-chat.active .mobile-tab-text {
    color: var(--green) !important;
    text-shadow: 0 0 18px rgba(87, 230, 178, 0.42) !important;
  }

  .mobile-tabbar .mobile-tab-text {
    max-width: 100%;

    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    font-size: 12px;
    line-height: 1.05;
    font-weight: 650;
    letter-spacing: 0.01em;

    color: currentColor;
  }

  .mobile-tabbar .mobile-tab-create {
    position: relative;

    min-height: 0;
    height: 100%;
    padding: 0;
    gap: 0;

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

    transform: none;
    transform-origin: center;
    border-radius: 999px;
  }

  .mobile-tabbar .mobile-tab-create:active {
    transform: scale(0.96);
  }

  .mobile-tabbar .mobile-tab-create .mobile-tab-icon {
    position: absolute;
    left: 50%;
    top: 50%;

    width: 50px;
    height: 50px;

    display: block;

    margin: 0;
    padding: 0;

    transform: translate(-50%, -50%);

    border-radius: 999px;
    background:
      radial-gradient(circle at 34% 22%, rgba(255, 255, 255, 0.28), transparent 28%),
      linear-gradient(180deg, #f09a58 0%, #f47a2b 58%, #d8611f 100%);
    border: 1px solid rgba(255, 255, 255, 0.16);

    color: #fff8ea;
    font-size: 0;
    line-height: 0;
    font-weight: 900;

    box-shadow:
      0 10px 22px rgba(244, 122, 43, 0.28),
      0 3px 10px rgba(0, 0, 0, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.34);

    text-shadow: none;
  }

  .mobile-tabbar .mobile-tab-create .mobile-tab-icon::before,
  .mobile-tabbar .mobile-tab-create .mobile-tab-icon::after {
    content: "";

    position: absolute;
    left: 50%;
    top: 50%;

    width: 23px;
    height: 5px;

    border-radius: 999px;
    background: #fff8ea;

    transform: translate(-50%, -50%);
  }

  .mobile-tabbar .mobile-tab-create .mobile-tab-icon:has(.mobile-tab-svg)::before,
  .mobile-tabbar .mobile-tab-create .mobile-tab-icon:has(.mobile-tab-svg)::after {
    content: none;
    display: none;
  }

  .mobile-tabbar .mobile-tab-create .mobile-tab-icon .mobile-tab-svg {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 1;
    width: 20px;
    height: 20px;
    transform: translate(-50%, -50%);
    color: #fff8ea;
    stroke-width: 2.1;
  }

  .mobile-tabbar .mobile-tab-create .mobile-tab-icon::after {
    transform: translate(-50%, -50%) rotate(90deg);
  }

  .mobile-tabbar .mobile-tab-create .mobile-tab-text {
    display: none !important;
  }
}

@media (max-width: 380px) {
  .mobile-tabbar {
    padding: 6px 8px;
  }

  .mobile-tabbar .mobile-tab-btn {
    height: 100%;
    min-height: 0;
    padding-left: 2px;
    padding-right: 2px;
  }

  .mobile-tabbar .mobile-tab-btn:not(.mobile-tab-create) .mobile-tab-icon {
    width: 25px;
    height: 25px;
    min-width: 25px;
    min-height: 25px;
  }

  .mobile-tabbar .mobile-tab-icon {
    width: 25px;
    height: 25px;
    font-size: 21px;
  }

  .mobile-tabbar .mobile-tab-icon svg,
  .mobile-tabbar .mobile-tab-icon .mobile-tab-svg {
    width: 21px;
    height: 21px;
  }

  .mobile-tabbar #nav-chat .mobile-tab-icon {
    width: 25px !important;
    height: 25px !important;
    min-width: 25px !important;
    min-height: 25px !important;
  }

  .mobile-tabbar .mobile-tab-create .mobile-tab-icon .mobile-tab-svg {
    width: 19px;
    height: 19px;
  }

  .mobile-tabbar .mobile-tab-text {
    font-size: 12px;
  }

  .mobile-tabbar .mobile-tab-create {
    transform: none;
  }

  .mobile-tabbar .mobile-tab-create:active {
    transform: scale(0.96);
  }

  .mobile-tabbar .mobile-tab-create .mobile-tab-icon {
    width: 48px;
    height: 48px;
    font-size: 0;
  }

  .mobile-tabbar .mobile-tab-create .mobile-tab-icon::before,
  .mobile-tabbar .mobile-tab-create .mobile-tab-icon::after {
    width: 21px;
    height: 5px;
  }
}
