/* ==========================================================================
   The bottom bar of a phone (parts/bottom-dock.php): a light glass capsule that floats a little above the bottom edge.
   Home (.hc-bar), service pages (.wd-bar) and product landings (.pl-bar) share it; each page's own css sets only from which width it hides
   and how far the footer's dark band grows under it.
   Shown by the page's script with .is-on; until then it waits below the screen.
   ========================================================================== */
.av-dock {
  position: fixed; z-index: 900;
  inset-inline: 14px; bottom: calc(12px + env(safe-area-inset-bottom));
  max-width: 560px; margin-inline: auto; /* a tablet: a capsule in the middle, not a strip from edge to edge */
  display: flex; align-items: stretch; height: 64px;
  border-radius: 22px;
  background: rgba(255, 255, 255, .8);
  -webkit-backdrop-filter: blur(18px) saturate(1.6); backdrop-filter: blur(18px) saturate(1.6);
  border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: 0 10px 30px rgba(63, 11, 121, .18), inset 0 0 0 1px rgba(63, 11, 121, .06);
  transform: translateY(calc(100% + 24px + env(safe-area-inset-bottom))); visibility: hidden;
  transition: transform .32s var(--av-ease, cubic-bezier(.2, .8, .2, 1)), visibility .32s;
}
.av-dock.is-on { transform: none; visibility: visible; }
/* no blur (older browsers): a solid white capsule, so the words stay readable over a dark section */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) { .av-dock { background: #fff; } }

/* the main key: purple, two lines (what it does + a short line), an arrow in a soft square at the end */
.av-dock__main {
  flex: 1; min-width: 0; margin: 5px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding-block: 0; padding-inline: 16px 8px;
  border-radius: 17px; background: var(--av-purple, #3f0b79); color: #fff; text-decoration: none;
  -webkit-tap-highlight-color: transparent; transition: background .15s;
}
.av-dock__main:hover, .av-dock__main:focus-visible { background: #4f1594; color: #fff; }
.av-dock__main:active { background: #330963; }
.av-dock__txt { min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.av-dock__txt b { font-size: 16px; font-weight: var(--av-fw-bold, 700); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.av-dock__txt small { font-size: 12px; font-weight: var(--av-fw-regular, 400); color: rgba(255, 255, 255, .8); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.av-dock__arr { flex: none; display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 11px; background: rgba(255, 255, 255, .16); }

/* the small keys: icon + a word under it, split by a hairline */
.av-dock__key {
  position: relative; flex: none; width: 62px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  padding: 0; border: 0; background: none; cursor: pointer;
  color: var(--av-purple, #3f0b79); font: inherit; font-size: 11.5px; font-weight: var(--av-fw-bold, 700); line-height: 1; text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.av-dock__key + .av-dock__key { border-inline-start: 1px solid rgba(63, 11, 121, .1); }
.av-dock__key:hover { color: #6a12cb; }
.av-dock__key:last-child { border-start-end-radius: 21px; border-end-end-radius: 21px; }
.av-dock__badge { position: absolute; top: 7px; inset-inline-end: 11px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #f04438; color: #fff; font: 600 11px/18px Azarmehr, sans-serif; text-align: center; box-shadow: 0 0 0 2px #fff; }
.av-dock__badge[hidden] { display: none; }

.av-dock :is(a, button):focus-visible { outline: 2px solid #6d28d9; outline-offset: 2px; }
.av-dock__main:focus-visible { outline-offset: 1px; }

@media (prefers-reduced-motion: reduce) { .av-dock { transition: none; } }

/* touch screens only (phones, tablets): a mouse + hover device never shows it, at any width. The pages' own rules that make room for it
   (footer band) and hide the round chat button while it shows use the same test: (hover: none) or (pointer: coarse). */
@media (hover: hover) and (pointer: fine) { .av-dock { display: none !important; } }
