/* Toge DS + Sprout showcase tokens
   Extracted from /Users/goliver/Documents/toge-ds-components/src/style.css
   and the HomeHero / ReadyWageCard showcase patterns. */

@import url('https://fonts.googleapis.com/css2?family=Rethink+Sans:wght@500;600;700&family=Rubik:wght@400;500;600&display=swap');

:root {
  /* Primitives — mushroom (warm neutrals) */
  --mushroom-50: #f7f8f8;
  --mushroom-100: #e6eaea;
  --mushroom-200: #d9dede;
  --mushroom-300: #b8c1c0;
  --mushroom-400: #919f9d;
  --mushroom-500: #738482;
  --mushroom-600: #5d6c6b;
  --mushroom-700: #4c5857;
  --mushroom-800: #414b4b;
  --mushroom-900: #394141;
  --mushroom-950: #262b2b;

  /* Primitives — kangkong (brand green) */
  --kangkong-50: #f0fdf4;
  --kangkong-100: #dcfce6;
  --kangkong-200: #bbf7ce;
  --kangkong-300: #86efa8;
  --kangkong-400: #4ade7b;
  --kangkong-500: #22c558;
  --kangkong-600: #17ad49;
  --kangkong-700: #158039;
  --kangkong-800: #166531;
  --kangkong-900: #14532b;
  --kangkong-950: #052e15;

  /* Primitives — tomato (danger red) */
  --tomato-100: #fee2e3;
  --tomato-500: #ec4750;
  --tomato-600: #da2f38;
  --tomato-700: #b61f27;

  /* Shadcn-style semantic bridge */
  --background: #fbfcfa;
  --foreground: var(--mushroom-950);
  --card: #ffffff;
  --card-foreground: var(--mushroom-950);
  --popover: #ffffff;
  --popover-foreground: var(--mushroom-950);
  --primary: var(--kangkong-700);
  --primary-foreground: #ffffff;
  --secondary: #f4f8f4;
  --secondary-foreground: #244536;
  --muted: var(--mushroom-50);
  --muted-foreground: var(--mushroom-600);
  --accent: #eef8ec;
  --accent-foreground: var(--mushroom-950);
  --destructive: var(--tomato-600);
  --destructive-foreground: #ffffff;
  --border: #e1e9e2;
  --input: #e1e9e2;
  --ring: var(--kangkong-700);

  /* Sprout showcase vars — these are referenced by the Toge Vue showcase
     templates but left undefined there. Defined here so our app renders
     correctly. Values chosen to match the live Sprout look. */
  --sprout-border-soft: rgba(9, 41, 3, 0.08);
  --sprout-border-strong: rgba(9, 41, 3, 0.16);
  --sprout-surface-1: #fbfcfa;
  --sprout-surface-2: rgba(244, 248, 242, 0.7);
  --sprout-surface-3: #e6eaea;
  --sprout-success-soft: var(--kangkong-100);
  --sprout-success-strong: var(--kangkong-800);
  --sprout-success-border: var(--kangkong-200);
  --sprout-secondary-strong: #244536;
  --sprout-lilac-soft: #ece8fb;
  --sprout-lilac-strong: #6d46c4;

  /* Page gradient — body background */
  --page-gradient:
    radial-gradient(circle at top left, rgba(50, 206, 19, 0.12), transparent 34%),
    radial-gradient(circle at top right, rgba(129, 57, 238, 0.05), transparent 24%),
    linear-gradient(
      180deg,
      rgba(250, 252, 248, 1) 0%,
      rgba(253, 254, 253, 1) 42%,
      rgba(245, 250, 243, 1) 100%
    );

  /* Radius — Toge default 1.125rem (18px) */
  --radius: 1.125rem;

  /* Shadows — soft green-tinted drop shadow used on showcase surfaces */
  --shadow-soft: 0 22px 60px -46px rgba(9, 41, 3, 0.24);
  --shadow-raised: 0 32px 80px -54px rgba(9, 41, 3, 0.28);
}

body {
  font-family: 'Rubik', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--page-gradient);
  background-attachment: fixed;
  color: var(--foreground);
  min-height: 100vh;
}

/* Heading font — Rethink Sans for display, Rubik for UI */
.font-heading {
  font-family: 'Rethink Sans', 'Rubik', ui-sans-serif, system-ui, sans-serif;
}

/* Soft drop shadow helpers */
.shadow-soft { box-shadow: var(--shadow-soft); }
.shadow-raised { box-shadow: var(--shadow-raised); }

/* Long-press drag indication */
.drag-ready {
  cursor: grabbing !important;
  box-shadow: var(--shadow-raised);
  opacity: 0.88;
  transition: opacity 120ms ease-out, box-shadow 120ms ease-out;
}

/* Drive-style selection highlight */
.is-selected {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}
.is-selected::before {
  content: none;
}

/* "What's new" pill — soft lilac to stand out from the green primary and the
   white outline buttons without shouting. Sits at the top of the home view. */
.whatsnew-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  border-radius: 9999px;
  background: var(--sprout-lilac-soft);
  color: var(--sprout-lilac-strong);
  border: 1px solid rgba(109, 70, 196, 0.18);
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
  transition: transform 140ms ease-out, box-shadow 140ms ease-out, background 140ms ease-out;
}
.whatsnew-pill:hover {
  background: #e3dcf7;
  box-shadow: 0 1px 6px rgba(109, 70, 196, 0.18);
}
.whatsnew-pill .whatsnew-dot {
  position: relative;
  display: inline-flex;
  width: 0.45rem;
  height: 0.45rem;
}
.whatsnew-pill .whatsnew-dot::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  background: var(--sprout-lilac-strong);
  opacity: 0.55;
  animation: whatsnew-ping 1.6s cubic-bezier(0, 0, 0.2, 1) infinite;
}
.whatsnew-pill .whatsnew-dot::after {
  content: "";
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 9999px;
  background: var(--sprout-lilac-strong);
}
@keyframes whatsnew-ping {
  0%   { transform: scale(1);    opacity: 0.55; }
  75%  { transform: scale(2.2);  opacity: 0; }
  100% { transform: scale(2.2);  opacity: 0; }
}

/* "Feature requests" pill — soft amber so it sits next to the lilac What's-new
   pill without competing. Same shape, different palette. */
.featurereq-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  border-radius: 9999px;
  background: #fff1d6;
  color: #8a5a08;
  border: 1px solid rgba(138, 90, 8, 0.18);
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
  transition: transform 140ms ease-out, box-shadow 140ms ease-out, background 140ms ease-out;
}
.featurereq-pill:hover {
  background: #fde7b4;
  box-shadow: 0 1px 6px rgba(138, 90, 8, 0.18);
}

/* Vertical vote rail on the left of each feature-request card (preserves the
   original layout). Stacks ▲ button → net score → ▼ button. Whichever
   direction the viewer voted is filled with a strong color (green up, red
   down) so their vote is unmistakable, and the score number tracks the same
   color. Inactive arrows stay muted gray. */
.fr-vote-rail {
  background: transparent;
  color: var(--muted-foreground, #6b7280);
}
.fr-vote-btn {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 9999px;
  background: transparent;
  color: inherit;
}
.fr-vote-btn:hover {
  background: var(--sprout-surface-2);
  color: var(--foreground);
}
.fr-vote-score {
  color: inherit;
}
.fr-vote-rail[data-user-vote="up"] .fr-vote-score {
  color: var(--sprout-success-strong);
}
.fr-vote-rail[data-user-vote="down"] .fr-vote-score {
  color: #b91c1c;
}
.fr-vote-up.is-active {
  background: var(--sprout-success-soft);
  color: var(--sprout-success-strong);
}
.fr-vote-up.is-active:hover {
  background: var(--sprout-success-soft);
  filter: brightness(0.95);
}
.fr-vote-down.is-active {
  background: rgba(220, 38, 38, 0.12);
  color: #b91c1c;
}
.fr-vote-down.is-active:hover {
  background: rgba(220, 38, 38, 0.12);
  filter: brightness(0.95);
}

/* Library controls (filter chips + view toggle): inactive segments stay
   muted, active fills with the success palette to match the rest of the
   accent system. */
.lib-chip {
  color: var(--muted-foreground, #6b7280);
  background: transparent;
}
.lib-chip:hover {
  background: var(--sprout-surface-2);
  color: var(--foreground);
}
.lib-chip.is-active {
  background: var(--sprout-success-soft);
  color: var(--sprout-success-strong);
}
.lib-chip.is-active:hover {
  background: var(--sprout-success-soft);
  filter: brightness(0.97);
}

/* Open / Shipped tab pills inside the segmented control. Inactive tabs are
   muted; the active one fills with the success palette to match the "shipped"
   chip elsewhere on the page. */
.fr-tab {
  color: var(--muted-foreground, #6b7280);
}
.fr-tab:hover {
  background: var(--sprout-surface-2);
}
.fr-tab.is-active {
  background: var(--sprout-success-soft);
  color: var(--sprout-success-strong);
}
.fr-tab .fr-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.4rem;
  border-radius: 9999px;
  background: rgba(9, 41, 3, 0.06);
  font-size: 0.6875rem;
  font-weight: 600;
}
.fr-tab.is-active .fr-tab-count {
  background: rgba(255, 255, 255, 0.6);
}

/* Shipped cards get a soft tint so they read as "done" without losing the
   request body. Lower opacity on the body text would be too aggressive. */
.fr-shipped-card {
  background: linear-gradient(
    180deg,
    rgba(212, 232, 200, 0.18) 0%,
    rgba(212, 232, 200, 0.04) 100%
  );
}

/* "you" highlight — yellow marker effect on the requester's own meta line. */
.fr-you {
  font-weight: 600;
  color: #6b4d00;
  background: #fff3a3;
  padding: 0.05rem 0.35rem;
  border-radius: 0.25rem;
}

/* Browser fullscreen for the preview iframe — by default the browser paints a
   black backdrop and the iframe element itself is transparent. When a user's
   HTML doesn't set body { background } (relying on the UA white default),
   fullscreen drops them into a black void. Force a white surface instead. */
#preview {
  background: #ffffff;
}
#preview:fullscreen,
#preview:-webkit-full-screen {
  background: #ffffff;
}
#preview::backdrop,
#preview:-webkit-full-screen::backdrop {
  background: #ffffff;
}

/* Yellow marker highlight on the key phrase inside the responsive-HTML tip. */
.tip-highlight {
  font-weight: 600;
  color: #6b4d00;
  background: #fff3a3;
  padding: 0.05rem 0.35rem;
  border-radius: 0.25rem;
}

/* Mobile-responsive tip — only the hand waves. The pill itself sits flat. */
.wave-hand {
  display: inline-block;
  transform-origin: 70% 80%;
  animation: wave 2.6s ease-in-out infinite;
}
@keyframes wave {
  0%, 60%, 100% { transform: rotate(0deg); }
  10%           { transform: rotate(14deg); }
  20%           { transform: rotate(-8deg); }
  30%           { transform: rotate(14deg); }
  40%           { transform: rotate(-4deg); }
  50%           { transform: rotate(10deg); }
}

@media (prefers-reduced-motion: reduce) {
  .wave-hand {
    animation: none;
  }
}
