/* Floating mobile dock — Digikala-style pill + separate circle. */

.ht-dock {
  display: none;
}

@media (max-width: 900px) {
  .ht-dock {
    position: fixed;
    z-index: 70;
    left: 18px;
    right: 18px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    display: flex;
    align-items: center;
    gap: 6px;
    direction: rtl;
    pointer-events: none;
  }

  .ht-dock__pill,
  .ht-dock__ai {
    pointer-events: auto;
  }

  .ht-dock__pill {
    flex: 1 1 auto;
    min-width: 0;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 6px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 999px;
    box-shadow: 0 4px 14px -6px rgba(15, 23, 42, 0.14), 0 1px 2px rgba(15, 23, 42, 0.04);
  }

  .ht-dock__btn {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a1a3a8;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
  }

  .ht-dock__btn svg {
    width: 20px;
    height: 20px;
    display: block;
  }

  .ht-dock__solid { display: none; }

  .ht-dock__btn.is-active {
    color: #212121;
  }

  .ht-dock__btn.is-active .ht-dock__line { display: none; }
  .ht-dock__btn.is-active .ht-dock__solid { display: block; }

  .ht-dock__btn:active {
    opacity: 0.55;
  }

  .ht-dock__badge {
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-11px);
    min-width: 14px;
    height: 14px;
    padding: 0 3px;
    border-radius: 999px;
    background: #ef394e;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    line-height: 14px;
    text-align: center;
    font-family: 'Estedad', Tahoma, sans-serif;
    pointer-events: none;
  }

  .ht-dock__badge[hidden] {
    display: none;
  }

  .ht-dock__ai {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
  }

  .ht-dock__ai:empty {
    display: none;
    width: 0;
    flex-basis: 0;
  }

  body.site-nav-open .ht-dock {
    display: none;
  }

  /* Landing sticky CTAs sit under the dock. They return when the dock is off. */
  body:has(.ht-dock) .hl-sticky,
  body:has(.ht-dock) .or-sticky-cta,
  body:has(.ht-dock) .fb-sticky-cta,
  body:has(.ht-dock) .sc-sticky-cta,
  body:has(.ht-dock) .dr-sticky-cta,
  body:has(.ht-dock) .pc-sticky-cta,
  body:has(.ht-dock) .ss-sticky-cta,
  body:has(.ht-dock) .pr-sticky-cta,
  body:has(.ht-dock) .ct-sticky-cta {
    display: none !important;
  }

  body:has(.ht-dock):not(.mp-chat-shell) {
    padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px));
  }

  body:has(.mp-app.sidebar-open) .ht-dock {
    z-index: 15;
  }
}
