/**
 * css/components.css
 * ─────────────────────────────────────────────────────────────────
 * Reusable UI components: navbar, footer, buttons, cards, badges,
 * the logo, section labels, star ratings, and the tool modal.
 * ─────────────────────────────────────────────────────────────────
 */

/* ══════════════════════════════════════════════════════════════════
   NAVBAR
   ══════════════════════════════════════════════════════════════════ */
/* ─── LAUNCH ANNOUNCEMENT BAR ───────────────────────────────────────
   Slim fixed strip above the navbar. Present on every page that loads
   the shared navbar component. main.js adds .has-launch-bar to <body>
   after injection so the navbar + content offsets only apply where the
   bar actually exists (tool/app pages are untouched). */
.launch-bar {
  --launch-bar-h: 40px;
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 600;
  height: var(--launch-bar-h);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  background: var(--orange);
  color: #fff;
  text-decoration: none;
  text-align: center;
  overflow: hidden;
  transition: background 0.15s;
}
.launch-bar:hover { background: var(--orange-hi); }
.launch-bar__text {
  font-family: var(--font-body);
  font-size: clamp(11px, 2.6vw, 13.5px);
  line-height: 1.2;
  letter-spacing: -0.1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.launch-bar__text strong { font-weight: 700; }
.launch-bar__cta {
  font-weight: 700;
  margin-left: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.6);
  padding-bottom: 1px;
}
/* Drop the verbose middle on small screens so the date + CTA stay visible */
@media (max-width: 640px) {
  .launch-bar__detail { display: none; }
}
/* Push the page down by the bar height only on pages that have it */
body.has-launch-bar { padding-top: 40px; }
body.has-launch-bar .navbar { top: 40px; }

.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  transition: background 0.4s, border-color 0.4s, backdrop-filter 0.4s;
}

/* Dark mode solid navbar */
[data-theme="dark"] .navbar {
  background: rgba(10, 10, 10, 0.97);
}

/* Transparent state — only active when on home page before scroll */
.navbar.is-transparent {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-bottom-color: transparent !important;
}

.navbar__inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 40px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

/* Left + right nav groups each claim equal space so logo stays centred */
.nav-ll, .nav-rr {
  display: flex;
  gap: 4px;
  align-items: center;
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 4;
  pointer-events: none; /* container doesn't capture clicks — prevents blocking the logo */
}

/* Re-enable pointer events on every actual link/button inside the groups */
.nav-ll > *, .nav-rr > * {
  pointer-events: auto;
}

.nav-rr {
  justify-content: flex-end;
}

/* Logo — absolutely centred with a generous hit-target */
.nav-logo {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  cursor: pointer;
  text-decoration: none;
  z-index: 3;          /* above nav side-columns so the whole logo is always clickable */
  display: block;
  padding: 10px 16px;  /* large hit area — user clicks anywhere in this zone */
  border-radius: 10px;
  transition: background 0.15s;
}
.nav-logo:hover {
  background: rgba(255, 98, 0, 0.06);
}

/* Nav text links */
.nav-link {
  background: none;
  border: none;
  padding: 8px 14px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: var(--orange);
}

.nav-link.active {
  border-bottom-color: var(--orange);
}

/* Transparent navbar: text should be light/dark depending on theme */
.navbar.is-transparent .nav-link {
  color: var(--text);
}

/* CTA button in navbar ("List Your Tool") */
.nav-cta {
  background: linear-gradient(135deg, var(--orange-hi), var(--orange));
  color: #fff !important;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 2px 8px rgba(255, 98, 0, 0.20);
  transition: filter 0.2s, box-shadow 0.2s;
  border-bottom: none !important;
  white-space: nowrap;
}

.nav-cta:hover {
  filter: brightness(1.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 4px 16px var(--orange-glow);
}

/* Monthly / Yearly billing toggle */
.billing-toggle {
  display: inline-flex;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px;
  gap: 2px;
}

.billing-toggle__btn {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: none;
  border-radius: 7px;
  padding: 8px 20px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.billing-toggle__btn.is-active {
  background: var(--orange);
  color: #fff;
}

.billing-toggle__save {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
  background: rgba(255,255,255,0.22);
  padding: 2px 7px;
  border-radius: 4px;
}

/* "List Your Tool" hover dropdown */
.nav-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-dropdown__menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px;
  min-width: 210px;
  box-shadow: 0 12px 40px var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.15s, transform 0.15s;
  z-index: 300;
}

/* Transparent bridge fills the gap so mouse can travel from button to menu */
.nav-dropdown__menu::before {
  content: '';
  position: absolute;
  top: -14px;
  left: 0;
  right: 0;
  height: 14px;
}

.nav-dropdown:hover .nav-dropdown__menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.nav-dropdown__label {
  display: block;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 8px 12px 4px;
}

.nav-dropdown__item {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  transition: background 0.15s;
  white-space: nowrap;
}

.nav-dropdown__item:hover {
  background: var(--bg-alt);
  color: var(--text);
}

.nav-dropdown__item-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

/* Dark mode toggle */
.nav-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
}

.nav-toggle__icon {
  font-size: 12px;
  color: var(--text);
  opacity: 0.6;
}

.nav-toggle__track {
  width: 44px;
  height: 24px;
  border-radius: 12px;
  background: var(--border);
  border: 1px solid var(--border-hi);
  position: relative;
  cursor: pointer;
  transition: background 0.3s, border-color 0.3s;
  display: flex;
  align-items: center;
  padding: 0 3px;
}

.nav-toggle__track.is-dark {
  background: var(--orange);
  border-color: var(--orange);
}

.nav-toggle__thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s;
}

.nav-toggle__track.is-dark .nav-toggle__thumb {
  transform: translateX(20px);
}

/* Hamburger button (hidden on desktop) */
.nav-burger {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  width: 38px;
  height: 38px;
  font-size: 18px;
  align-items: center;
  justify-content: center;
}

/* Mobile dropdown menu */
.nav-mobile {
  display: none;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 12px 5vw 20px;
}

.nav-mobile.is-open {
  display: block;
}

.nav-mobile__link {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  padding: 13px 0;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
}

.nav-mobile__link.active,
.nav-mobile__link:hover {
  color: var(--orange);
}

.nav-mobile__theme {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 0;
}

.nav-mobile__theme-label {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-muted);
}

/* ══════════════════════════════════════════════════════════════════
   LOGO
   ══════════════════════════════════════════════════════════════════ */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--logo-bg);
  padding: 5px 12px 5px 6px;
  border-radius: 8px;
}

.logo__img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.logo__text {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* ══════════════════════════════════════════════════════════════════
   SECTION LABEL (the small orange caps above headings)
   ══════════════════════════════════════════════════════════════════ */
.section-label {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  color: var(--orange);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 14px;
}

/* ══════════════════════════════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════════════════════════════ */
.btn-primary {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--orange-hi), var(--orange) 55%, #E55800);
  color: #fff;
  border: none;
  padding: 14px 36px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25),
              0 2px 10px rgba(255, 98, 0, 0.18);
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s, filter 0.2s;
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 40%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: translateX(-120%) skewX(-18deg);
  pointer-events: none;
}

.btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25),
              0 10px 32px var(--orange-glow);
}

.btn-primary:hover::after {
  animation: sheen 0.7s ease;
}

.btn-primary:active {
  transform: translateY(0) scale(0.985);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
  padding: 14px 36px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  transition: border-color 0.2s, color 0.2s, background 0.2s, transform 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-outline:hover {
  border-color: var(--orange);
  color: var(--orange);
  background: var(--orange-dim);
  transform: translateY(-1px);
}

.btn-outline:active {
  transform: translateY(0) scale(0.985);
}

/* White button — used on dark backgrounds */
.btn-white {
  background: #fff;
  color: var(--orange);
  border: none;
  padding: 14px 36px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.25);
  transition: background 0.2s, transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s;
}

.btn-white:hover {
  background: #fff;
  transform: translateY(-1px);
  box-shadow: 0 10px 36px rgba(255, 255, 255, 0.18);
}

.btn-white:active {
  transform: translateY(0) scale(0.985);
}

/* Ghost white button — used on dark backgrounds */
.btn-ghost-white {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  padding: 14px 36px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  transition: background 0.2s;
  backdrop-filter: blur(4px);
}

.btn-ghost-white:hover {
  background: rgba(255, 255, 255, 0.22);
}

/* ══════════════════════════════════════════════════════════════════
   BADGES (Hot / New)
   ══════════════════════════════════════════════════════════════════ */
.badge-hot {
  background: rgba(255, 50, 0, 0.1);
  border: 1px solid rgba(255, 50, 0, 0.3);
  color: #ff3300;
  border-radius: 20px;
  padding: 2px 9px;
  font-size: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  display: inline-block;
}

.badge-sponsored {
  background: rgba(10, 10, 10, 0.08);
  border: 1px solid rgba(10, 10, 10, 0.2);
  color: #0A0A0A;
  border-radius: 20px;
  padding: 2px 9px;
  font-size: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  display: inline-block;
}

[data-theme="dark"] .badge-sponsored {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.75);
}

.badge-new {
  background: var(--orange-dim);
  border: 1px solid rgba(255, 98, 0, 0.33);
  color: var(--orange);
  border-radius: 20px;
  padding: 2px 9px;
  font-size: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  display: inline-block;
}

/* Ryvatex-owned tool — solid orange, high contrast */
.badge-ryvatex {
  background: var(--orange);
  color: #fff;
  border: 1px solid var(--orange);
  border-radius: 20px;
  padding: 2px 9px;
  font-size: 10px;
  font-family: var(--font-body);
  font-weight: 700;
  display: inline-block;
  letter-spacing: 0.02em;
}

/* Hosted by Ryvatex — indie seller tier */
.badge-hosted {
  background: rgba(255, 98, 0, 0.08);
  border: 1px solid rgba(255, 98, 0, 0.28);
  color: var(--orange);
  border-radius: 20px;
  padding: 2px 9px;
  font-size: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  display: inline-block;
}

[data-theme="dark"] .badge-hosted {
  background: rgba(255, 98, 0, 0.14);
  border-color: rgba(255, 98, 0, 0.4);
}

/* ══════════════════════════════════════════════════════════════════
   STAR RATING
   ══════════════════════════════════════════════════════════════════ */
.stars {
  display: inline-flex;
  gap: 1px;
}

.star {
  color: var(--border);
  font-size: 12px;
}

.star.filled {
  color: var(--orange);
}

/* ══════════════════════════════════════════════════════════════════
   TOOL CARD (grid card)
   ══════════════════════════════════════════════════════════════════ */
.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 12px var(--shadow);
  cursor: pointer;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.35s;
}

.tool-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 48px var(--shadow),
              0 4px 24px rgba(255, 98, 0, 0.12);
  border-color: rgba(255, 98, 0, 0.40);
}

.tool-card__header {
  background:
    radial-gradient(ellipse 90% 120% at 15% -20%, var(--orange-dim) 0%, transparent 55%),
    var(--bg-section);
  padding: 22px 22px 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.tool-card__emoji {
  font-size: 36px;
  line-height: 1;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.tool-card:hover .tool-card__emoji {
  transform: translateY(-2px) scale(1.08);
}

.tool-card__badges {
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: flex-end;
}

.tool-card__body {
  padding: 16px 20px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tool-card__name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}

.tool-card__tagline {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
}

.tool-card__rating {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tool-card__review-count {
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--text-muted);
}

.tool-card__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  margin-top: 2px;
}

.tool-card__price {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--orange);
}

.tool-card__creator {
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--text-muted);
}

.tool-card__creator-link {
  text-decoration: none;
  transition: color 0.15s;
}

.tool-card__creator-link:hover {
  color: var(--orange);
  text-decoration: underline;
}

/* ══════════════════════════════════════════════════════════════════
   FEATURED CARD (larger, used in marketplace featured row)
   ══════════════════════════════════════════════════════════════════ */
.featured-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.35s;
  box-shadow: 0 4px 20px var(--shadow);
}

.featured-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 60px var(--shadow),
              0 6px 32px rgba(255, 98, 0, 0.14);
  border-color: rgba(255, 98, 0, 0.40);
}

.featured-card__accent {
  height: 4px;
  background: linear-gradient(90deg, rgba(255, 98, 0, 0.35), var(--border) 60%, transparent);
  transition: background 0.3s;
}

.featured-card:hover .featured-card__accent {
  background: linear-gradient(90deg, var(--orange), var(--orange-hi));
}

.featured-card__body {
  padding: 26px 28px;
}

.featured-card__emoji {
  font-size: 40px;
  line-height: 1;
  margin-bottom: 16px;
}

.featured-card__emoji img {
  border-radius: 10px;
  display: block;
}

.featured-card__badges {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.featured-card__name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
}

.featured-card__tagline {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 16px;
}

.featured-card__rating {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.featured-card__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.featured-card__price {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--orange);
}

.featured-card__creator {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-muted);
}

/* ══════════════════════════════════════════════════════════════════
   PILLAR CARD (Why Ryvatex section)
   ══════════════════════════════════════════════════════════════════ */
.pillar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 30px 26px;
  box-shadow: 0 2px 16px var(--shadow);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.35s;
}

.pillar-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 40px var(--shadow), 0 4px 24px rgba(255, 98, 0, 0.10);
  border-color: rgba(255, 98, 0, 0.30);
}

.pillar-card__emoji {
  font-size: 32px;
  margin-bottom: 16px;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.pillar-card:hover .pillar-card__emoji {
  transform: translateY(-3px) scale(1.1);
}

.pillar-card__title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}

.pillar-card__desc {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.75;
}

/* ══════════════════════════════════════════════════════════════════
   STATS BAND
   ══════════════════════════════════════════════════════════════════ */
.stats-band {
  position: relative;
  background: linear-gradient(115deg, #FF7A29, var(--orange) 45%, #DD5400);
  padding: 36px 5vw;
  overflow: hidden;
}

.stats-band::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -55deg,
    rgba(255, 255, 255, 0.045) 0px,
    rgba(255, 255, 255, 0.045) 1px,
    transparent 1px,
    transparent 14px
  );
  pointer-events: none;
}

.stats-band > * {
  position: relative;
}

.stat-val {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
}

.stat-label {
  font-family: var(--font-body);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-top: 4px;
}

/* ══════════════════════════════════════════════════════════════════
   TOOL MODAL
   ══════════════════════════════════════════════════════════════════ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.is-open {
  display: flex;
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalIn 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 40px 80px var(--shadow-md), 0 0 60px rgba(255, 98, 0, 0.06);
}

.modal__accent {
  height: 4px;
  background: linear-gradient(90deg, var(--orange), var(--orange-hi));
  border-radius: 16px 16px 0 0;
}

.modal__header {
  padding: 28px 32px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-hi);
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.modal__icon {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  flex-shrink: 0;
}

.modal__meta {
  flex: 1;
}

.modal__badges {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.modal__name {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
}

.modal__creator {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-muted);
}

.modal__creator a {
  color: var(--orange);
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 98, 0, 0.33);
}

.modal__close {
  background: var(--surface-hi);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 8px;
  width: 36px;
  height: 36px;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.2s, color 0.2s;
}

.modal__close:hover {
  border-color: var(--orange);
  color: var(--orange);
}

.modal__body {
  padding: 24px 32px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.modal__stats-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: var(--surface-hi);
  border-radius: 10px;
  border: 1px solid var(--border);
}

.modal__rating-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal__rating-val {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}

.modal__review-count {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-muted);
}

.modal__price {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  color: var(--orange);
}

.modal__tagline {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.modal__desc {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text-sub);
  line-height: 1.8;
}

.modal__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.modal__tag {
  background: var(--bg-section);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 12px;
  color: var(--text-sub);
  font-family: var(--font-body);
}

.modal__cta {
  width: 100%;
  padding: 16px 0;
  font-size: 15px;
  border-radius: 10px;
}

.modal__cta-note {
  text-align: center;
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-muted);
}

/* ══════════════════════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════════════════════ */
.footer {
  background: #0A0A0A;
  padding: 60px 5vw 28px;
}

.footer__accent {
  height: 2px;
  background: linear-gradient(90deg, var(--orange), var(--orange-hi), transparent);
  margin-bottom: 48px;
}

.footer__tagline {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.4);
  line-height: 1.75;
  max-width: 280px;
  margin-top: 14px;
}

.footer__slogan {
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--orange);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 16px;
  font-weight: 600;
}

.footer__col-title {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.3);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.footer__link {
  display: block;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-family: var(--font-body);
  font-size: 14px;
  padding: 5px 0;
  transition: color 0.2s;
  text-align: left;
}

.footer__link:hover {
  color: var(--orange);
}

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.footer__copy {
  font-family: var(--font-body);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.25);
}

/* ══════════════════════════════════════════════════════════════════
   HERO BADGE ("Marketplace Now Open" pill)
   ══════════════════════════════════════════════════════════════════ */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--orange-dim);
  border: 1px solid rgba(255, 98, 0, 0.27);
  border-radius: 20px;
  padding: 6px 18px;
  margin-bottom: 36px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10), 0 2px 16px rgba(255, 98, 0, 0.08);
}

.hero-badge__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 8px 1px var(--orange-glow);
  animation: pulse 2s ease infinite;
}

.hero-badge__text {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  color: var(--orange);
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* ══════════════════════════════════════════════════════════════════
   ABOUT PAGE — QUOTE / FACT ROWS
   ══════════════════════════════════════════════════════════════════ */
.about-quote {
  border-left: 4px solid var(--orange);
  padding-left: 24px;
  margin: 36px 0 40px;
}

.about-quote__text {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.55;
  font-style: italic;
}

.about-quote__attr {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.fact-row {
  display: flex;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.fact-row__key {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.fact-row__val {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

/* ══════════════════════════════════════════════════════════════════
   GENERIC INFO CARD (used in commission section, list page benefits)
   ══════════════════════════════════════════════════════════════════ */
.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 24px;
  text-align: center;
  box-shadow: 0 2px 16px var(--shadow);
}

.info-card__emoji {
  font-size: 40px;
  margin-bottom: 16px;
}

.info-card__title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}

.info-card__desc {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* Benefit row card used in "Why list here?" sidebar */
.benefit-row {
  display: flex;
  gap: 16px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 2px 8px var(--shadow);
  margin-bottom: 14px;
}

.benefit-row__emoji { font-size: 22px; }

.benefit-row__title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
}

.benefit-row__desc {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ══════════════════════════════════════════════════════════════════
   FORM CARD (submit-tool, contact, influencer forms)
   ══════════════════════════════════════════════════════════════════ */
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 40px var(--shadow);
}

.form-card__accent {
  height: 4px;
  background: linear-gradient(90deg, var(--orange), var(--orange-hi));
}

.form-card__body {
  padding: 32px 32px 36px;
}

.form-card__title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.form-card__subtitle {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-label {
  display: block;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 7px;
}

.form-note {
  text-align: center;
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-muted);
}

/* Success state after form submit */
.form-success {
  text-align: center;
  padding: 80px 20px;
}

.form-success__icon {
  font-size: 72px;
  margin-bottom: 20px;
}

.form-success__title {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 14px;
  letter-spacing: -1px;
}

.form-success__desc {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 480px;
  margin: 0 auto;
}

/* ══════════════════════════════════════════════════════════════════
   SYNC — bundle indicator on cards + bundle cards in modal
   ══════════════════════════════════════════════════════════════════ */

/* Strip at the bottom of a tool card */
.tool-card__sync {
  border-top: 1px solid rgba(255,98,0,0.15);
  background: rgba(255,98,0,0.04);
  padding: 7px 14px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  color: var(--orange);
  letter-spacing: 0.01em;
  border-radius: 0 0 14px 14px;
}

/* Same strip on featured cards */
.featured-card .tool-card__sync {
  border-radius: 0 0 16px 16px;
  padding: 8px 20px;
}

/* Section wrapper in the modal */
.sync-section {
  margin: 20px 0;
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

.sync-section__label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--orange);
  margin-bottom: 14px;
}

/* Individual Sync bundle card inside the modal */
.sync-card {
  background: linear-gradient(135deg, rgba(255,98,0,0.05), rgba(255,149,0,0.03));
  border: 1px solid rgba(255,98,0,0.2);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 12px;
}

.sync-card:last-child { margin-bottom: 0; }

.sync-card__header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.sync-card__badge {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--orange);
  color: #fff;
  border-radius: 5px;
  padding: 3px 8px;
  white-space: nowrap;
}

.sync-card__partners {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.sync-card__name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.3px;
  margin-bottom: 4px;
}

.sync-card__tagline {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-sub);
  margin-bottom: 10px;
  font-style: italic;
}

.sync-card__superpower {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 10px;
}

.sync-card__unlocks {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  background: rgba(255,98,0,0.08);
  border: 1px solid rgba(255,98,0,0.15);
  border-radius: 7px;
  padding: 8px 12px;
  margin-bottom: 14px;
  line-height: 1.5;
}

.sync-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sync-card__price {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
}

.sync-card__savings {
  font-family: var(--font-body);
  font-size: 11px;
  color: #16a34a;
  font-weight: 600;
  margin-top: 2px;
}

.sync-card__cta {
  background: var(--orange);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}

.sync-card__cta:hover { background: var(--orange-hi); }

/* ══════════════════════════════════════════════════════════════════
   ACCOUNT / AUTH DROPDOWN
   ══════════════════════════════════════════════════════════════════ */

/* Always-visible nav controls: dark mode toggle + account button */
.nav-persistent {
  display: flex;
  align-items: center;
  gap: 4px;
  position: relative;
  z-index: 4;
}

/* Login / avatar button in navbar */
.nav-account {
  position: relative;
  margin-left: 10px;
}

.nav-account__btn {
  background: var(--orange);
  color: #fff;
  border: none;
  padding: 8px 18px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  transition: background 0.2s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-account__btn:hover {
  background: var(--orange-hi);
}

/* Circular avatar initials when logged in */
.nav-account__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
}

.nav-account__btn.is-logged-in {
  padding: 4px 8px;
  border-radius: 50px;
}

/* Dropdown panel */
.nav-account__dropdown {
  display: none;
  position: fixed;
  top: 60px;
  right: 8px;
  width: 300px;
  max-width: calc(100vw - 16px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 20px 60px var(--shadow-md);
  z-index: 600;
  overflow: hidden;
  animation: modalIn 0.18s ease;
}

@media (max-width: 480px) {
  .nav-account__dropdown {
    left: 8px;
    right: 8px;
    width: auto;
    top: 64px;
    border-radius: 16px;
  }
  .nav-account__dropdown::before { display: none; }
}

.nav-account__dropdown.is-open {
  display: block;
}

/* Small arrow pointing up at the button */
.nav-account__dropdown::before {
  content: '';
  position: absolute;
  top: -6px;
  right: 18px;
  width: 12px;
  height: 12px;
  background: var(--surface);
  border-left: 1px solid var(--border);
  border-top: 1px solid var(--border);
  transform: rotate(45deg);
}

/* Logged-in: user header */
.auth-dropdown__user-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px 14px;
}

.auth-dropdown__avatar-lg {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.auth-dropdown__user-name {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.auth-dropdown__user-email {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 1px;
}

/* Nav links inside dropdown */
.auth-dropdown__link {
  display: block;
  padding: 10px 20px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-sub);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.auth-dropdown__link:hover {
  background: var(--bg-section);
  color: var(--orange);
}

/* Alert variant (Stripe not connected) */
.auth-dropdown__link--alert {
  color: var(--orange);
  font-weight: 600;
}

.auth-dropdown__signout {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 20px;
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-muted);
  transition: background 0.15s, color 0.15s;
}

.auth-dropdown__signout:hover {
  background: var(--bg-section);
  color: #ff3300;
}

.auth-dropdown__divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

/* Sign-in / sign-up form inside dropdown */
.auth-dropdown__title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  padding: 18px 20px 12px;
  letter-spacing: -0.3px;
}

.auth-dropdown__error {
  background: rgba(255, 51, 0, 0.08);
  border: 1px solid rgba(255, 51, 0, 0.2);
  color: #cc2200;
  font-family: var(--font-body);
  font-size: 12px;
  padding: 8px 12px;
  border-radius: 6px;
  margin: 0 20px 10px;
}

.auth-dropdown__field {
  padding: 0 20px 12px;
}

.auth-dropdown__label {
  display: block;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 5px;
}

.auth-dropdown__input {
  font-family: var(--font-body);
  font-size: 13px;
  background: var(--bg-section);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  padding: 9px 12px;
  width: 100%;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-dropdown__input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px var(--orange-dim);
}

.auth-dropdown__cta {
  display: block;
  width: calc(100% - 40px);
  margin: 0 20px;
  background: var(--orange);
  color: #fff;
  border: none;
  padding: 11px 0;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  transition: background 0.2s;
}

.auth-dropdown__cta:hover { background: var(--orange-hi); }
.auth-dropdown__cta:disabled { opacity: 0.6; }

.auth-dropdown__switch {
  padding: 12px 20px 16px;
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-muted);
}

.auth-dropdown__switch-btn {
  background: none;
  border: none;
  color: var(--orange);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  text-decoration: underline;
  padding: 0;
}

/* ══════════════════════════════════════════════════════════════════
   FEEDBACK WIDGET (floating button + panel, appears on every page)
   ══════════════════════════════════════════════════════════════════ */

#feedback-widget {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 800;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

#feedback-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--orange);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 10px 18px 10px 14px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(255, 98, 0, 0.4);
  transition: background 0.2s, transform 0.15s;
}

#feedback-toggle:hover {
  background: var(--orange-hi);
  transform: translateY(-1px);
}

#feedback-panel {
  width: 320px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 20px 60px var(--shadow-md);
  overflow: hidden;
  display: none;
  animation: modalIn 0.18s ease;
  position: absolute;
  bottom: calc(100% + 10px);
  left: 0;
}

#feedback-panel.is-open {
  display: block;
}

.feedback-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
}

.feedback-panel__title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
}

.feedback-panel__close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color 0.15s;
}

.feedback-panel__close:hover { color: var(--text); }

#feedback-form-body {
  padding: 18px 20px 20px;
}

.feedback-field {
  margin-bottom: 14px;
}

.feedback-label {
  display: block;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.feedback-select,
.feedback-input,
.feedback-textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 11px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.feedback-select:focus,
.feedback-input:focus,
.feedback-textarea:focus {
  outline: none;
  border-color: var(--orange);
}

.feedback-select option { background: var(--surface); }

.feedback-textarea {
  resize: vertical;
  min-height: 88px;
  line-height: 1.5;
}

.feedback-submit-btn {
  width: 100%;
  background: var(--orange);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 2px;
}

.feedback-submit-btn:hover { background: var(--orange-hi); }
.feedback-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.feedback-error {
  font-family: var(--font-body);
  font-size: 12px;
  color: #cc4400;
  margin-top: 8px;
}

@media (max-width: 400px) {
  #feedback-widget { left: 12px; bottom: 12px; }
  #feedback-panel  { width: calc(100vw - 24px); }
}

/* ══════════════════════════════════════════════════════════════════
   AI HELP WIDGET (floating chat, bottom-right)
   ══════════════════════════════════════════════════════════════════ */

#help-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 810;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

#help-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 10px 18px 10px 14px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 24px var(--shadow-md);
  transition: background 0.2s, transform 0.15s, border-color 0.2s;
}

#help-toggle:hover {
  background: var(--bg-alt);
  border-color: var(--orange);
  color: var(--orange);
  transform: translateY(-1px);
}

#help-panel {
  width: 340px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 20px 60px var(--shadow-md);
  overflow: hidden;
  display: none;
  animation: modalIn 0.18s ease;
  flex-direction: column;
  position: absolute;
  bottom: calc(100% + 10px);
  right: 0;
}

#help-panel.is-open {
  display: flex;
}

.help-panel__header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--orange), #cc4e00);
  flex-shrink: 0;
}

.help-panel__avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 900;
  color: #fff;
  flex-shrink: 0;
}

.help-panel__meta { flex: 1; }

.help-panel__name {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.help-panel__status {
  font-family: var(--font-body);
  font-size: 11px;
  color: rgba(255,255,255,0.7);
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 1px;
}

.help-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 4px #4ade80;
  display: inline-block;
}

.help-panel__close {
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  font-size: 13px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s;
  flex-shrink: 0;
}
.help-panel__close:hover { background: rgba(255,255,255,0.3); }

#help-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 320px;
  min-height: 160px;
}

.help-msg {
  display: flex;
  flex-direction: column;
}

.help-msg--bot { align-items: flex-start; }
.help-msg--user { align-items: flex-end; }

.help-msg__bubble {
  max-width: 88%;
  padding: 9px 13px;
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.5;
}

.help-msg--bot .help-msg__bubble {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text);
  border-bottom-left-radius: 4px;
}

.help-msg--user .help-msg__bubble {
  background: var(--orange);
  color: #fff;
  border-bottom-right-radius: 4px;
}

/* Typing indicator */
.help-typing .help-msg__bubble {
  padding: 12px 16px;
}

.help-typing-dots {
  display: flex;
  gap: 4px;
  align-items: center;
}

.help-typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: helpTypingBounce 1.2s infinite;
}

.help-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.help-typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes helpTypingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-4px); opacity: 1; }
}

#help-quick-replies {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 0 4px;
}

.help-quick-btn {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 7px 14px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.help-quick-btn:hover {
  border-color: var(--orange);
  color: var(--orange);
  background: rgba(255,98,0,0.05);
}

/* Escalation contact form */
#help-escalate {
  padding: 14px 16px 0;
  flex-shrink: 0;
}

.help-escalate__intro {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
  line-height: 1.5;
}

.help-escalate__fields {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 10px;
}

.help-esc-input,
.help-esc-textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 12px;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.help-esc-input:focus,
.help-esc-textarea:focus {
  outline: none;
  border-color: var(--orange);
}

.help-esc-textarea {
  resize: vertical;
  min-height: 72px;
  line-height: 1.5;
}

.help-esc-submit-btn {
  width: 100%;
  background: var(--orange);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 9px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  margin-bottom: 12px;
}
.help-esc-submit-btn:hover { background: var(--orange-hi); }
.help-esc-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* Text input row */
.help-input-row {
  display: flex;
  gap: 6px;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  flex-shrink: 0;
}

.help-input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 8px 14px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text);
  transition: border-color 0.2s;
}
.help-input:focus { outline: none; border-color: var(--orange); }

.help-send-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  border: none;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.1s;
  flex-shrink: 0;
}
.help-send-btn:hover { background: var(--orange-hi); transform: scale(1.05); }
.help-send-btn:disabled { opacity: 0.5; cursor: not-allowed; }

@media (max-width: 400px) {
  #help-widget { right: 12px; bottom: 80px; }
  #help-panel  { width: calc(100vw - 24px); }
}
