/* help-assistant.css
 * Floating "Need help?" pill + slide-up panel. Shared across login,
 * recovery, reset-password, and the homepage. Uses Onest if available
 * with a system-font fallback so the pill renders before fonts.css
 * resolves.
 */

#mdr-help-pill {
  position: fixed;
  bottom: 18px;
  right: 18px;
  z-index: 99000;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 16px 10px 11px;
  background: linear-gradient(135deg, #1a1d27, #0f1118);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  font-family: 'Onest', system-ui, -apple-system, sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.005em;
  cursor: pointer;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}
#mdr-help-pill:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #232633, #14161e);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.55);
}
#mdr-help-pill:active { transform: translateY(0); }
#mdr-help-pill .mdr-help-pill__glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: linear-gradient(135deg, #a855f7, #ec4899);
  color: #fff;
  font-size: 11px;
}

@media (max-width: 540px) {
  #mdr-help-pill {
    bottom: 14px;
    right: 14px;
    padding: 9px 14px 9px 10px;
    font-size: 12.5px;
  }
  /* On very narrow screens hide the label, keep the glyph — saves
   * room for the on-page CTAs below. */
  #mdr-help-pill .mdr-help-pill__label { display: none; }
  #mdr-help-pill { padding: 9px; }
}

/* ── Slide-up panel ─────────────────────────────────────────────────── */
.mdr-help-panel {
  position: fixed;
  bottom: 72px;
  right: 18px;
  z-index: 99001;
  width: min(380px, calc(100vw - 36px));
  max-height: min(78vh, 640px);
  display: flex;
  flex-direction: column;
  background: rgba(15, 17, 24, 0.97);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 18px;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.55);
  font-family: 'Onest', system-ui, -apple-system, sans-serif;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  opacity: 0;
  transform: translateY(14px) scale(0.97);
  transform-origin: bottom right;
  transition: opacity 0.18s ease, transform 0.18s ease;
  overflow: hidden;
}
.mdr-help-panel.mdr-help-panel--open {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@media (max-width: 540px) {
  .mdr-help-panel {
    bottom: 64px;
    right: 14px;
    left: 14px;
    width: auto;
    max-height: calc(100dvh - 90px);
  }
}

/* ── Head bar ───────────────────────────────────────────────────────── */
.mdr-help-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.02);
  flex-shrink: 0;
}
.mdr-help-panel__brand {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}
.mdr-help-panel__back,
.mdr-help-panel__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.14s, color 0.14s, border-color 0.14s;
}
.mdr-help-panel__back:hover,
.mdr-help-panel__close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.12);
}

/* ── Inner scroll area ──────────────────────────────────────────────── */
.mdr-help-panel__inner {
  padding: 18px 16px 6px;
  overflow-y: auto;
  flex: 1 1 auto;
}
.mdr-help-panel__inner::-webkit-scrollbar { width: 6px; }
.mdr-help-panel__inner::-webkit-scrollbar-track { background: transparent; }
.mdr-help-panel__inner::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.10);
  border-radius: 3px;
}
.mdr-help-panel__title {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.005em;
  margin: 0 0 8px;
  color: #fff;
}
.mdr-help-panel__body {
  font-size: 13.5px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.72);
  margin: 0 0 14px;
}

/* ── Foot strip ─────────────────────────────────────────────────────── */
.mdr-help-panel__foot {
  margin: 0;
  padding: 10px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.02);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}
.mdr-help-panel__foot i { color: #a78bfa; font-size: 10px; }

/* ── Option button rows ─────────────────────────────────────────────── */
.mdr-help-opts {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
  padding-bottom: 12px;
}
.mdr-help-opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: #fff;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.005em;
  text-align: left;
  border-radius: 11px;
  cursor: pointer;
  transition: background 0.14s, border-color 0.14s, transform 0.14s;
}
.mdr-help-opt:hover,
.mdr-help-opt:focus-visible {
  background: rgba(168, 85, 247, 0.12);
  border-color: rgba(168, 85, 247, 0.35);
  outline: none;
}
.mdr-help-opt:active { transform: scale(0.985); }
.mdr-help-opt__arrow {
  font-size: 10px;
  opacity: 0.5;
  transition: opacity 0.14s, transform 0.14s;
}
.mdr-help-opt:hover .mdr-help-opt__arrow {
  opacity: 1;
  transform: translateX(2px);
}
.mdr-help-opt--ghost {
  background: transparent;
  border-color: transparent;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 500;
  font-size: 13px;
  padding: 10px 14px;
}
.mdr-help-opt--ghost:hover,
.mdr-help-opt--ghost:focus-visible {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.mdr-help-opt--ghost .mdr-help-opt__arrow { display: none; }
.mdr-help-opt--cta {
  background: linear-gradient(135deg, #a855f7, #ec4899);
  border-color: transparent;
  color: #fff;
}
.mdr-help-opt--cta:hover,
.mdr-help-opt--cta:focus-visible {
  background: linear-gradient(135deg, #b76bf8, #f05ba8);
  border-color: transparent;
  box-shadow: 0 8px 22px rgba(168, 85, 247, 0.35);
}

/* ── Action CTA (leaf node primary button) ──────────────────────────── */
.mdr-help-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  padding: 13px 16px;
  margin-bottom: 14px;
  background: linear-gradient(135deg, #a855f7, #ec4899);
  color: #fff;
  border: 0;
  border-radius: 12px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.005em;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(168, 85, 247, 0.32);
  transition: transform 0.14s, box-shadow 0.14s, background 0.14s;
}
.mdr-help-action:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #b76bf8, #f05ba8);
  box-shadow: 0 14px 30px rgba(168, 85, 247, 0.42);
}
.mdr-help-action:active { transform: translateY(0); }
.mdr-help-action i { font-size: 12px; opacity: 0.95; }
