/* MuscelBond Floating Mobile Pill Toolbar — PayDay Benchmark Adapted */

:root {
  --mb-toolbar-height: 54px;
}

.mb-mobile-toolbar-wrap {
  display: none;
}

@media screen and (max-width: 989px) {
  .mb-mobile-toolbar-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 10px);
    left: 0;
    right: 0;
    z-index: 9990;
    padding: 0 12px;
    box-sizing: border-box;
    pointer-events: none;
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.24s ease;
  }

  .mb-mobile-toolbar-wrap.is-hidden {
    transform: translateY(140%);
    opacity: 0;
  }

  body.has-mb-mobile-toolbar {
    padding-bottom: calc(var(--mb-toolbar-height) + env(safe-area-inset-bottom, 0px) + 24px) !important;
  }

  .mb-mobile-toolbar-dock {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    pointer-events: auto;
  }

  .mb-mobile-toolbar-pill {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: space-around;
    height: var(--mb-toolbar-height);
    background: #ffffff;
    border-radius: 9999px;
    border: 1.5px solid var(--mb-ink);
    box-shadow: 0 10px 26px rgba(7, 26, 56, 0.16), 2px 2px 0 var(--mb-ink);
    padding: 0 6px;
    box-sizing: border-box;
    overflow: hidden;
  }

  .mb-toolbar-item {
    flex: 1 1 0%;
    min-width: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    text-decoration: none !important;
    color: var(--mb-muted);
    background: transparent;
    border: none;
    padding: 4px 2px;
    cursor: pointer;
    position: relative;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.16s ease, transform 0.12s ease;
  }

  .mb-toolbar-item:active {
    transform: scale(0.93);
  }

  .mb-toolbar-item.is-active {
    color: var(--mb-accent);
  }

  .mb-toolbar-icon-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
  }

  .mb-toolbar-icon {
    width: 19px;
    height: 19px;
    display: block;
  }

  .mb-toolbar-label {
    font-family: var(--mb-font-body);
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
  }

  .mb-toolbar-badge {
    position: absolute;
    top: -5px;
    right: -8px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--mb-accent);
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    line-height: 17px;
    text-align: center;
    border: 1.5px solid #ffffff;
    box-sizing: border-box;
  }

  .mb-toolbar-badge.is-empty {
    display: none;
  }

  /* Quick Cart Circle CTA on Right of Dock */
  .mb-toolbar-cart-fab {
    flex-shrink: 0;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: var(--mb-accent);
    color: #ffffff !important;
    border: 1.5px solid var(--mb-ink);
    box-shadow: 0 10px 24px rgba(229, 57, 53, 0.34), 2px 2px 0 var(--mb-ink);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
  }

  .mb-toolbar-cart-fab:active {
    transform: scale(0.94);
  }

  .mb-toolbar-cart-fab .mb-toolbar-badge {
    top: 2px;
    right: 2px;
    background: var(--mb-ink);
    color: #ffffff;
  }

  /* Hide on single-product pages where sticky ATC bar takes bottom slot */
  body.single-product .mb-mobile-toolbar-wrap {
    display: none !important;
  }

  body.single-product.has-mb-mobile-toolbar {
    padding-bottom: 84px !important;
  }
}
