/* ==========================================================================
   Floating support widget
   A pill in the bottom right that folds open to the contact routes.
   ========================================================================== */

.mbb-support {
  --sup-ink: #1A1A1A;
  --sup-muted: #6B7280;
  --sup-border: #E2E2E2;
  --sup-accent: #A04B60;
  position: fixed;
  right: clamp(14px, 2vw, 24px);
  bottom: clamp(14px, 2vw, 24px);
  z-index: 9000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  font-family: Roboto, sans-serif;
}

.mbb-support *,
.mbb-support *::before,
.mbb-support *::after { box-sizing: border-box; }

.mbb-support ul { margin: 0; padding: 0; list-style: none; }
.mbb-support a { text-decoration: none; color: inherit; }

/* The pill ------------------------------------------------------------- */

.mbb-support .mbb-support__toggle,
.mbb-support .mbb-support__toggle:hover,
.mbb-support .mbb-support__toggle:focus {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px 0 14px;
  border: 1px solid var(--sup-border);
  border-radius: 999px;
  background: #fff;
  color: var(--sup-ink);
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  box-shadow: 0 6px 20px rgba(26, 26, 26, .14);
  cursor: pointer;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}

.mbb-support .mbb-support__toggle:hover,
.mbb-support .mbb-support__toggle:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(26, 26, 26, .2);
  border-color: #cfcfcf;
}

.mbb-support__bubble { display: inline-flex; }
.mbb-support__bubble svg { width: 20px; height: 20px; }

.mbb-support__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sup-ink);
}

/* The panel ------------------------------------------------------------ */

.mbb-support__panel {
  width: min(320px, calc(100vw - 28px));
  padding: 16px;
  border: 1px solid var(--sup-border);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(26, 26, 26, .22);
  transform-origin: bottom right;
}

/* hidden is honoured by the attribute; the class drives the fold. */
.mbb-support__panel[hidden] { display: none; }

.mbb-support:not(.is-open) .mbb-support__panel {
  opacity: 0;
  transform: translateY(8px) scale(.97);
  pointer-events: none;
}

.mbb-support.is-open .mbb-support__panel {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  transition: opacity .16s ease, transform .16s ease;
}

.mbb-support__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.mbb-support__heading {
  margin: 0;
  color: var(--sup-ink);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
}

.mbb-support .mbb-support__close,
.mbb-support .mbb-support__close:hover,
.mbb-support .mbb-support__close:focus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--sup-muted);
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
  box-shadow: none;
  cursor: pointer;
}

.mbb-support .mbb-support__close:hover,
.mbb-support .mbb-support__close:focus-visible { background: #f3f4f6; color: var(--sup-ink); }

.mbb-support__intro {
  margin: 0 0 14px;
  color: var(--sup-muted);
  font-size: 13px;
  line-height: 1.55;
}

.mbb-support__list { display: flex; flex-direction: column; gap: 8px; }

.mbb-support__option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--sup-border);
  border-radius: 10px;
  background: #fbfbfc;
  transition: border-color .15s, background-color .15s, transform .15s;
}

.mbb-support__option:hover,
.mbb-support__option:focus-visible {
  background: #fdf5f7;
  border-color: rgba(160, 75, 96, .5);
  transform: translateY(-1px);
}

.mbb-support__icon { display: inline-flex; flex: none; color: var(--sup-accent); }
.mbb-support__icon svg { width: 22px; height: 22px; }

.mbb-support__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mbb-support__text strong { color: var(--sup-ink); font-size: 14px; font-weight: 700; line-height: 1.3; }
.mbb-support__text small { color: var(--sup-muted); font-size: 12px; line-height: 1.4; overflow-wrap: anywhere; }

.mbb-support a:focus-visible,
.mbb-support button:focus-visible {
  outline: 3px solid rgba(160, 75, 96, .35);
  outline-offset: 2px;
}

/* Astra's scroll-to-top sits in the same corner; lift it clear of the pill. */
#ast-scroll-top { bottom: 78px !important; }

@media (max-width: 600px) {
  .mbb-support { right: 12px; bottom: 12px; }
  .mbb-support__label { display: none; }
  .mbb-support .mbb-support__toggle,
  .mbb-support .mbb-support__toggle:hover,
  .mbb-support .mbb-support__toggle:focus { padding: 0 14px; }
  #ast-scroll-top { bottom: 70px !important; }
}

@media (prefers-reduced-motion: reduce) {
  .mbb-support * { transition-duration: .01ms !important; }
}

/* ============================================================================
   Matches the pill to the reference store's launcher (mybearbrick.de).
   ============================================================================ */

.mbb-support .mbb-support__toggle,
.mbb-support .mbb-support__toggle:hover,
.mbb-support .mbb-support__toggle:focus {
  gap: 8px;
  min-height: 46px;
  padding: 0 16px;
  border: 0;
  border-radius: 16px;
  background: rgba(255, 255, 255, .7);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  backdrop-filter: blur(12px) saturate(180%);
  color: #000;
  font-size: 13px;
  font-weight: 400;
  box-shadow:
    0 2px 2px -1px rgba(0, 0, 0, .05),
    0 3px 4px -1.5px rgba(0, 0, 0, .05),
    0 4px 8px -2px rgba(0, 0, 0, .05),
    0 5px 16px -2.5px rgba(0, 0, 0, .05),
    0 0 0 1px rgba(0, 0, 0, .08);
}

.mbb-support .mbb-support__toggle:hover,
.mbb-support .mbb-support__toggle:focus-visible {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, .85);
  box-shadow:
    0 2px 2px -1px rgba(0, 0, 0, .06),
    0 4px 6px -1.5px rgba(0, 0, 0, .07),
    0 8px 14px -2px rgba(0, 0, 0, .08),
    0 12px 26px -2.5px rgba(0, 0, 0, .09),
    0 0 0 1px rgba(0, 0, 0, .1);
}

.mbb-support__bubble svg {
  width: 16px;
  height: 16px;
  color: rgba(0, 0, 0, .7);
}

.mbb-support__dot {
  display: none;
  width: 6px;
  height: 6px;
  background: #000;
}

.mbb-support.has-unread .mbb-support__dot {
  display: block;
}

.mbb-support--crisp ~ .crisp-client .cc-1brb6,
.mbb-support--crisp ~ div .crisp-client .cc-1brb6 {
  display: none !important;
}

.crisp-client .cc-1brb6 + div {
  z-index: 9001;
}

@media (prefers-reduced-motion: reduce) {
  .mbb-support .mbb-support__toggle { transition: none; }
  .mbb-support .mbb-support__toggle:hover,
  .mbb-support .mbb-support__toggle:focus-visible { transform: none; }
}