/* Public mobile header, burger drawer and bottom navigation. */
.market-filter-btn,
.market-mobile-header,
.market-mobile-drawer,
.market-mobile-bottom-nav {
  display: none;
}

@media (max-width: 768px) {
  body[data-view="messages"],
  body[data-view="purchases"],
  body[data-view="favorites"],
  body[data-view="settings"],
  body[data-view="deal"],
  body[data-view="sellerProfile"],
  body[data-view="market"] {
    overflow-x: hidden;
    background: #fff;
  }

  body[data-view="messages"] .site-header,
  body[data-view="purchases"] .site-header,
  body[data-view="favorites"] .site-header,
  body[data-view="settings"] .site-header,
  body[data-view="deal"] .site-header,
  body[data-view="sellerProfile"] .site-header,
  body[data-view="messages"] .lootava-footer,
  body[data-view="purchases"] .lootava-footer,
  body[data-view="favorites"] .lootava-footer,
  body[data-view="settings"] .lootava-footer,
  body[data-view="deal"] .lootava-footer,
  body[data-view="sellerProfile"] .lootava-footer {
    display: none;
  }

  body[data-view="purchases"] .page,
  body[data-view="favorites"] .page,
  body[data-view="settings"] .page {
    width: 100%;
    max-width: 100vw;
    padding: 0 12px calc(92px + env(safe-area-inset-bottom));
    overflow-x: hidden;
  }

  body[data-view="purchases"] .buyer-purchases-page,
  body[data-view="favorites"] .favorites-page,
  body[data-view="settings"] .settings-mobile-screen {
    padding-top: 16px;
  }

  body.market-mobile-header-visible .market-mobile-header,
  body[data-view="market"] .market-mobile-header {
    position: sticky;
    top: 0;
    z-index: 105;
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) 52px;
    align-items: center;
    width: 100%;
    min-height: 78px;
    padding: 14px 16px 10px;
    border-bottom: 1px solid #e2e6f0;
    background: #fff;
  }

  body[data-view="messages"] .market-mobile-header,
  body[data-view="purchases"] .market-mobile-header,
  body[data-view="favorites"] .market-mobile-header,
  body[data-view="deal"] .market-mobile-header,
  body[data-view="settings"] .market-mobile-header {
    min-height: 68px;
    padding: 8px 14px;
  }

  .market-mobile-icon-btn,
  .market-mobile-logo,
  .market-mobile-header-spacer {
    display: grid;
    min-width: 48px;
    min-height: 48px;
    place-items: center;
    border: 0;
    background: transparent;
  }

  body[data-view="messages"] .market-mobile-icon-btn,
  body[data-view="messages"] .market-mobile-logo,
  body[data-view="messages"] .market-mobile-header-spacer,
  body[data-view="purchases"] .market-mobile-icon-btn,
  body[data-view="purchases"] .market-mobile-logo,
  body[data-view="purchases"] .market-mobile-header-spacer,
  body[data-view="favorites"] .market-mobile-icon-btn,
  body[data-view="favorites"] .market-mobile-logo,
  body[data-view="favorites"] .market-mobile-header-spacer,
  body[data-view="deal"] .market-mobile-icon-btn,
  body[data-view="deal"] .market-mobile-logo,
  body[data-view="deal"] .market-mobile-header-spacer,
  body[data-view="settings"] .market-mobile-icon-btn,
  body[data-view="settings"] .market-mobile-logo,
  body[data-view="settings"] .market-mobile-header-spacer {
    min-width: 44px;
    min-height: 44px;
  }

  .market-mobile-logo img {
    width: 168px;
    height: 40px;
    object-fit: contain;
    object-position: center;
  }

  body[data-view="messages"] .market-mobile-logo img,
  body[data-view="purchases"] .market-mobile-logo img,
  body[data-view="favorites"] .market-mobile-logo img,
  body[data-view="deal"] .market-mobile-logo img,
  body[data-view="settings"] .market-mobile-logo img {
    width: 154px;
    height: 36px;
  }

  .market-mobile-icon-btn img {
    width: 28px;
    height: 28px;
    object-fit: contain;
  }

  .market-mobile-burger,
  .market-mobile-burger::before,
  .market-mobile-burger::after {
    display: block;
    width: 30px;
    height: 2px;
    border-radius: 99px;
    background: #080d24;
    content: "";
  }

  .market-mobile-burger {
    position: relative;
  }

  .market-mobile-burger::before,
  .market-mobile-burger::after {
    position: absolute;
    left: 0;
  }

  .market-mobile-burger::before {
    top: -9px;
  }

  .market-mobile-burger::after {
    top: 9px;
  }

  body.market-drawer-open {
    overflow: hidden;
  }

  body.market-mobile-header-visible .market-mobile-drawer[hidden] {
    display: none;
  }

  body.market-mobile-header-visible .market-mobile-drawer {
    position: fixed;
    inset: 0;
    z-index: 140;
    display: block;
  }

  .market-mobile-drawer-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(8, 13, 36, 0.58);
  }

  .market-mobile-drawer-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(86vw, 360px);
    min-height: 100%;
    padding: 36px 22px 28px;
    border: 0;
    border-radius: 0 18px 18px 0;
    background: #fff;
    box-shadow: 18px 0 54px rgba(8, 13, 36, 0.18);
    outline: none;
  }

  .market-mobile-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 28px;
  }

  .market-mobile-drawer-logo {
    display: inline-flex;
    align-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
  }

  .market-mobile-drawer-head img {
    width: 164px;
    height: 42px;
    object-fit: contain;
    object-position: left center;
  }

  .market-mobile-drawer-close {
    position: relative;
    width: 48px;
    min-width: 48px;
    height: 48px;
    border: 0;
    background: transparent;
  }

  .market-mobile-drawer-close::before,
  .market-mobile-drawer-close::after {
    position: absolute;
    top: 23px;
    left: 10px;
    width: 28px;
    height: 2px;
    border-radius: 99px;
    background: #080d24;
    content: "";
  }

  .market-mobile-drawer-close::before {
    transform: rotate(45deg);
  }

  .market-mobile-drawer-close::after {
    transform: rotate(-45deg);
  }

  .market-mobile-drawer-list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .market-mobile-drawer nav {
    flex: 1 1 auto;
  }

  .market-mobile-drawer-link,
  .market-mobile-drawer-support {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    width: 100%;
    min-height: 58px;
    padding: 8px 10px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #10152b;
    font-size: 19px;
    font-weight: 550;
    text-align: left;
  }

  .market-mobile-drawer-link:hover,
  .market-mobile-drawer-link:focus-visible,
  .market-mobile-drawer-support:hover,
  .market-mobile-drawer-support:focus-visible {
    background: #f2edff;
    color: #4a22ff;
    outline: none;
  }

  .market-mobile-drawer-support {
    margin-top: auto;
    padding: 12px 14px;
    border: 1px solid #dfe3ee;
    background: #fff;
  }

  .market-mobile-drawer-link-icon {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
  }

  .market-mobile-drawer-link img,
  .market-mobile-drawer-link svg,
  .market-mobile-drawer-support img {
    width: 22px;
    height: 22px;
    object-fit: contain;
  }

  .market-mobile-drawer-link img[src*="/assets/lootava-icons/"],
  .market-mobile-drawer-support img[src*="/assets/lootava-icons/"] {
    opacity: 0.76;
  }

  .market-mobile-drawer-link svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
  }

  .market-mobile-bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 110;
    display: none;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    min-height: calc(76px + env(safe-area-inset-bottom));
    padding: 8px 4px env(safe-area-inset-bottom);
    border-top: 1px solid #e1e5ef;
    background: #fff;
  }

  body.market-mobile-nav-visible .market-mobile-bottom-nav {
    display: grid;
  }

  .market-mobile-bottom-nav button {
    position: relative;
    display: grid;
    gap: 1px;
    place-items: center;
    min-width: 0;
    min-height: 56px;
    padding: 0 2px;
    border: 0;
    background: transparent;
    color: #4f5872;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.1;
    overflow: hidden;
    text-align: center;
  }

  .market-mobile-bottom-nav button span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .market-mobile-bottom-nav img,
  .market-mobile-bottom-nav svg {
    width: 24px;
    height: 24px;
    object-fit: contain;
    transform-origin: center;
    transition: transform 0.16s ease, filter 0.16s ease, opacity 0.16s ease;
  }

  .market-mobile-bottom-nav button::before {
    display: none;
    width: 24px;
    height: 24px;
    background: #4f35f2;
    transform-origin: center;
    transition: transform 0.16s ease;
    content: "";
  }

  .market-mobile-bottom-nav .active:is([data-mobile-action="home"], [data-mobile-action="chats"], [data-mobile-action="orders"])::before {
    display: block;
    transform: scale(1.14);
  }

  .market-mobile-bottom-nav .active[data-mobile-action="home"]::before {
    -webkit-mask: url("/assets/lootava-icons/home.webp") center / contain no-repeat;
    mask: url("/assets/lootava-icons/home.webp") center / contain no-repeat;
  }

  .market-mobile-bottom-nav .active[data-mobile-action="chats"]::before {
    -webkit-mask: url("/assets/chat.webp") center / contain no-repeat;
    mask: url("/assets/chat.webp") center / contain no-repeat;
  }

  .market-mobile-bottom-nav .active[data-mobile-action="orders"]::before {
    -webkit-mask: url("/assets/lootava-icons/orders.webp") center / contain no-repeat;
    mask: url("/assets/lootava-icons/orders.webp") center / contain no-repeat;
  }

  .market-mobile-bottom-nav .active:is([data-mobile-action="home"], [data-mobile-action="chats"], [data-mobile-action="orders"]) > img {
    display: none;
  }

  .market-mobile-bottom-nav img[src*="/assets/lootava-icons/"] {
    opacity: 0.76;
  }

  .market-mobile-bottom-nav .active img[src*="/assets/lootava-icons/"] {
    opacity: 0.92;
  }

  .market-mobile-bottom-nav .active img:not([data-mobile-profile-avatar]) {
    opacity: 1;
    filter: brightness(0) saturate(100%) invert(23%) sepia(98%) saturate(4958%) hue-rotate(249deg) brightness(105%) contrast(102%);
    transform: scale(1.14);
  }

  .market-mobile-bottom-nav .active [data-mobile-profile-avatar] {
    opacity: 1;
    transform: scale(1.08);
    box-shadow: 0 0 0 4px rgba(79, 53, 242, 0.12), 0 0 0 1px rgba(79, 53, 242, 0.28);
  }

  .market-mobile-bottom-nav svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
  }

  .market-mobile-bottom-nav .market-mobile-favorite-icon {
    fill: currentColor;
    stroke: none;
  }

  .market-mobile-bottom-nav .active svg {
    transform: scale(1.14);
  }

  .market-mobile-bottom-nav .active {
    color: #4f35f2;
  }

  .market-mobile-bottom-nav .mobile-nav-counter {
    position: absolute;
    top: 4px;
    right: calc(50% - 24px);
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border: 2px solid #fff;
    font-size: 10px;
  }
}

@media (max-width: 768px) {
  .market-mobile-drawer-link img,
  .market-mobile-drawer-support img {
    width: 18px !important;
    height: 18px !important;
    object-fit: contain !important;
    opacity: 0.86 !important;
  }

  .market-mobile-bottom-nav img {
    width: 19px !important;
    height: 19px !important;
    object-fit: contain !important;
    opacity: 0.86 !important;
    transform-origin: center !important;
    transition: transform 0.16s ease, filter 0.16s ease, opacity 0.16s ease !important;
  }

  .market-mobile-bottom-nav .active img {
    opacity: 1 !important;
  }

  .market-mobile-bottom-nav .active img:not([data-mobile-profile-avatar]) {
    filter: brightness(0) saturate(100%) invert(23%) sepia(98%) saturate(4958%) hue-rotate(249deg) brightness(105%) contrast(102%) !important;
    transform: scale(1.16) !important;
  }

  .market-mobile-bottom-nav .active:is([data-mobile-action="home"], [data-mobile-action="chats"], [data-mobile-action="orders"])::before {
    width: 22px !important;
    height: 22px !important;
    transform: scale(1.16) !important;
  }

  .market-mobile-bottom-nav .active [data-mobile-profile-avatar] {
    transform: scale(1.08) !important;
    box-shadow: 0 0 0 4px rgba(79, 53, 242, 0.12), 0 0 0 1px rgba(79, 53, 242, 0.28) !important;
  }

  .market-mobile-bottom-nav .active svg {
    transform: scale(1.16) !important;
  }
}
/* lootava mobile nav polish 20260831 */
@media (max-width: 768px) {
  .market-mobile-bottom-nav button {
    color: #050713 !important;
  }

  .market-mobile-bottom-nav img:not([data-mobile-profile-avatar]) {
    opacity: 1 !important;
    filter: brightness(0) saturate(100%) !important;
  }

  .market-mobile-bottom-nav svg,
  .market-mobile-bottom-nav svg path {
    fill: currentColor !important;
    stroke: none !important;
  }

  .market-mobile-bottom-nav .active {
    color: #4f35f2 !important;
  }

  .market-mobile-bottom-nav .active[data-mobile-action="favorites"] svg {
    color: #4f35f2 !important;
  }
}
/* lootava mobile nav polish 20260831-2 */
@media (max-width: 768px) {
  .market-mobile-bottom-nav .active[data-mobile-action="favorites"],
  .market-mobile-bottom-nav .active[data-mobile-action="favorites"] svg,
  .market-mobile-bottom-nav .active[data-mobile-action="favorites"] svg path {
    color: #4f35f2 !important;
    fill: #4f35f2 !important;
    stroke: #4f35f2 !important;
  }
}

/* Active mobile nav color pass 20260902 */
@media (max-width: 768px) {
  .market-mobile-bottom-nav .active,
  .market-mobile-bottom-nav .active svg,
  .market-mobile-bottom-nav .active svg path {
    color: #4f35f2 !important;
    fill: #4f35f2 !important;
    stroke: #4f35f2 !important;
  }

  .market-mobile-bottom-nav .active img:not([data-current-user-avatar]):not([data-mobile-profile-avatar]) {
    opacity: 1 !important;
    filter: brightness(0) saturate(100%) invert(23%) sepia(98%) saturate(4958%) hue-rotate(249deg) brightness(105%) contrast(102%) !important;
  }
}
