/* ═══════════════════════════════════════════════════════════════════════════
   GetJustly — Beta feedback widget
   Floating bottom-LEFT button + compact modal. Theme-aware (light default +
   dark via gj_theme.css), petite B/W, no emojis. Matches gj_upgrade styling.
   ─────────────────────────────────────────────────────────────────────────── */

/* ── Floating launcher (bottom-left, clear of bottom-right toast/upgrade) ── */
.gj-fb-fab {
  position: fixed; left: 18px; bottom: 18px; z-index: 2147483300;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 14px 9px 12px; border-radius: 999px;
  border: 1px solid var(--gj-border, rgba(0,0,0,0.1));
  background: var(--gj-surface, #fff); color: var(--gj-text, #171717);
  font-family: var(--gj-font, -apple-system, BlinkMacSystemFont, "Inter", sans-serif);
  font-size: 0.82rem; font-weight: 600; cursor: pointer;
  box-shadow: 0 6px 20px rgba(0,0,0,0.16);
  transition: transform .12s ease, box-shadow .15s ease, border-color .15s;
}
.gj-fb-fab:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(0,0,0,0.22); border-color: var(--gj-border-strong, rgba(0,0,0,0.18)); }
.gj-fb-fab:active { transform: translateY(0); }
.gj-fb-fab svg { width: 16px; height: 16px; color: currentColor; }
@media (max-width: 560px) {
  .gj-fb-fab .gj-fb-fab-label { display: none; }
  .gj-fb-fab { padding: 11px; }
}

/* ── Modal shell ── */
.gj-fb-backdrop {
  position: fixed; inset: 0; z-index: 2147483400;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: rgba(0,0,0,0.55);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .2s ease;
}
.gj-fb-backdrop.show { opacity: 1; }

.gj-fb-modal {
  width: 100%; max-width: 440px; max-height: 92vh; overflow-y: auto;
  background: var(--gj-surface, #fff); color: var(--gj-text, #171717);
  border: 1px solid var(--gj-border, rgba(0,0,0,0.08));
  border-radius: 18px; box-shadow: 0 24px 70px rgba(0,0,0,0.4);
  padding: 24px 24px 20px;
  font-family: var(--gj-font, -apple-system, BlinkMacSystemFont, "Inter", sans-serif);
  transform: translateY(8px) scale(0.985); opacity: 0;
  transition: transform .26s cubic-bezier(0.22,1,0.36,1), opacity .26s ease;
}
.gj-fb-backdrop.show .gj-fb-modal { transform: translateY(0) scale(1); opacity: 1; }

/* ── Header ── */
.gj-fb-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.gj-fb-eyebrow { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.09em; color: var(--gj-text-muted, rgba(0,0,0,0.45)); }
.gj-fb-title { font-size: 1.2rem; font-weight: 600; letter-spacing: -0.02em; margin: 4px 0 4px; color: var(--gj-text); }
.gj-fb-sub { font-size: 0.84rem; color: var(--gj-text-secondary, rgba(0,0,0,0.6)); margin: 0; line-height: 1.45; }
.gj-fb-close {
  flex-shrink: 0; width: 32px; height: 32px; border-radius: 9px; border: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--gj-accent-dim, rgba(0,0,0,0.05)); color: var(--gj-text-secondary);
  transition: background .15s, color .15s;
}
.gj-fb-close:hover { background: var(--gj-border, rgba(0,0,0,0.1)); color: var(--gj-text); }
.gj-fb-close svg { width: 16px; height: 16px; }

/* ── Category chips ── */
.gj-fb-label { display: block; font-size: 0.74rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--gj-text-muted, rgba(0,0,0,0.45)); margin: 0 0 8px; }
.gj-fb-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.gj-fb-chip {
  padding: 7px 13px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--gj-border, rgba(0,0,0,0.1));
  background: var(--gj-surface-2, #fafafa); color: var(--gj-text-secondary, rgba(0,0,0,0.6));
  font-family: inherit; font-size: 0.82rem; font-weight: 500;
  transition: background .15s, color .15s, border-color .15s;
}
.gj-fb-chip:hover { border-color: var(--gj-border-strong, rgba(0,0,0,0.18)); color: var(--gj-text); }
.gj-fb-chip.active {
  background: var(--gj-accent, #171717); color: var(--gj-on-accent, #fff);
  border-color: var(--gj-accent, #171717);
}
/* "Love it" reads warmer than the neutral chips, even when idle */
.gj-fb-chip.positive { color: var(--gj-text, #171717); }
.gj-fb-chip.positive::before { content: "♥"; margin-right: 5px; font-size: 0.85em; line-height: 1; }
.gj-fb-chip.positive.active { background: var(--gj-accent, #171717); color: var(--gj-on-accent, #fff); }

/* Dynamic copy swap — brief fade so changing category reads as intentional */
.gj-fb-title, .gj-fb-sub, .gj-fb-field-label, .gj-fb-rate-label { transition: opacity .14s ease; }
.gj-fb-fading { opacity: 0; }

/* When praising, the stars are an invitation not an afterthought */
.gj-fb-modal.is-positive .gj-fb-rating { gap: 6px; }
.gj-fb-modal.is-positive .gj-fb-star:hover { color: var(--gj-text, #171717); }

/* ── Textarea ── */
.gj-fb-textarea {
  width: 100%; box-sizing: border-box; min-height: 110px; resize: vertical;
  padding: 11px 13px; border-radius: 11px;
  border: 1px solid var(--gj-border, rgba(0,0,0,0.12));
  background: var(--gj-surface-2, #fafafa); color: var(--gj-text, #171717);
  font-family: inherit; font-size: 0.9rem; line-height: 1.45;
  transition: border-color .15s, box-shadow .15s;
}
.gj-fb-textarea::placeholder { color: var(--gj-text-muted, rgba(0,0,0,0.4)); }
.gj-fb-textarea:focus {
  outline: none; border-color: var(--gj-border-strong, rgba(0,0,0,0.3));
  box-shadow: 0 0 0 3px var(--gj-accent-dim, rgba(0,0,0,0.06));
}

/* ── Star rating ── */
.gj-fb-rating { display: flex; align-items: center; gap: 4px; margin: 16px 0 4px; }
.gj-fb-star {
  width: 26px; height: 26px; padding: 0; border: none; background: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--gj-text-muted, rgba(0,0,0,0.3));
  transition: color .12s, transform .1s;
}
.gj-fb-star:hover { transform: scale(1.12); }
.gj-fb-star svg { width: 22px; height: 22px; }
.gj-fb-star.on { color: var(--gj-text, #171717); }
.gj-fb-star.on svg { fill: currentColor; }

/* ── Footer / actions ── */
.gj-fb-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.gj-fb-send {
  padding: 10px 20px; border-radius: 10px; border: 1px solid transparent;
  background: var(--gj-accent, #171717); color: var(--gj-on-accent, #fff);
  font-family: inherit; font-size: 0.875rem; font-weight: 600; cursor: pointer;
  transition: background .15s, opacity .15s, transform .1s;
}
.gj-fb-send:hover { background: var(--gj-accent-hover, #000); }
.gj-fb-send:active { transform: scale(0.985); }
.gj-fb-send.is-busy { pointer-events: none; opacity: 0.7; }
.gj-fb-send[disabled] { opacity: 0.5; cursor: default; }

@media (prefers-reduced-motion: reduce) {
  .gj-fb-backdrop, .gj-fb-modal, .gj-fb-fab, .gj-fb-star { transition: none; }
}
