/* ===================== BOTTOM TAB BAR =====================
   Shared by the product, sell (create-listing) and compare pages.
   Fixed at the bottom; the active tab is highlighted by tabbar.js.
   The Product tab is a circular primary action that pokes above the bar. */

.bottom-tab-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 250;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  padding: 6px 14px calc(6px + env(safe-area-inset-bottom, 0px));
  /* Self-sufficient sizing: the product page's CSS reset (border-box) must
     not be required — without this the Product circle renders 80x86 on the
     compare/sell pages instead of the intended compact 68x68. */
  box-sizing: border-box;
  background: var(--overlay, rgba(255, 255, 255, 0.96));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--border, #e6eaf2);
  box-shadow: 0 -5px 20px rgba(15, 23, 42, 0.06);
}

.bottom-tab {
  flex: 1;
  max-width: 190px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  /* Fixed height so the bar is identical on every page (57px incl. padding
     + border) regardless of active state or page-level CSS resets. */
  height: 44px;
  padding: 5px 10px 4px;
  border: none;
  border-radius: 11px;
  background: none;
  box-sizing: border-box;
  color: var(--text-muted, #7b8aa3);
  font-family: inherit;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.bottom-tab svg {
  width: 19px;
  height: 19px;
  transition: transform 0.15s ease;
}

.bottom-tab:hover {
  color: var(--primary);
  background: rgba(19, 88, 255, 0.06);
}

.bottom-tab.is-active {
  color: var(--primary);
}

.bottom-tab.is-active svg {
  transform: translateY(-1px);
}

.bottom-tab.is-active::after {
  content: "";
  /* Absolutely positioned so the underline never grows the tab (it used to
     make the bar taller on the sell page). */
  position: absolute;
  bottom: 1px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 3px;
  border-radius: 99px;
  background: var(--primary);
}

.bottom-tab.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.bottom-tab.is-disabled:hover {
  color: var(--text-muted, #7b8aa3);
  background: none;
}

/* The Product tab is the primary action: a small circle, barely larger than
   its icon + label, that pokes above the bar's top edge. */
.bottom-tab[data-tab="product"] {
  flex: 0 0 auto;
  width: 68px;
  height: 68px;
  max-width: none;
  margin: -30px 10px 3px;
  padding: 9px 5px 7px;
  border-radius: 50%;
  background: var(--bg-white, #ffffff);
  border: 1px solid var(--border, #e6eaf2);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
  font-size: 10.5px;
}

.bottom-tab[data-tab="product"] svg {
  width: 22px;
  height: 22px;
}

.bottom-tab[data-tab="product"]:hover {
  background: var(--bg-white, #ffffff);
}

.bottom-tab[data-tab="product"].is-active {
  border-color: var(--primary, #1358ff);
  color: var(--primary);
}

.bottom-tab[data-tab="product"].is-active::after {
  display: none;
}

.bottom-tab[data-tab="product"].is-disabled {
  background: var(--bg-white, #ffffff);
}

/* Keep page content (and the footer) clear of the fixed bar.
   tabbar.css is only loaded on pages that render the bar. */
body.has-bottom-tab-bar {
  padding-bottom: 74px;
}

@media (max-width: 480px) {
  .bottom-tab {
    font-size: 10px;
    padding: 4px 6px 3px;
  }

  .bottom-tab svg {
    width: 17px;
    height: 17px;
  }

  .bottom-tab[data-tab="product"] {
    width: 60px;
    height: 60px;
    margin-top: -25px;
    font-size: 9.5px;
  }
}
