/* ===========================================================
   Sprite Locker — Trade Hub
   Extends styles.css tokens (cream / orange / purple theme).
   Trade modals are LIGHT cream panels (unlike the dark admin
   modal on the main site) per the trading plan §4/§10.
   =========================================================== */

/* ---------- Header ---------- */
.trade-brand-link { text-decoration: none; }
.trade-actions { display: flex; align-items: center; gap: 10px; }

.trade-auth-btn {
  font-family: "Russo One", sans-serif; font-size: 13px; letter-spacing: 0.4px;
  color: #1a1208; cursor: pointer; border: none; border-radius: 12px;
  padding: 10px 16px;
  background: linear-gradient(135deg, var(--fn-orange-2), var(--fn-orange));
  box-shadow: 0 8px 22px rgba(255, 138, 30, 0.35);
  transition: all 0.15s ease;
}
.trade-auth-btn:hover { transform: translateY(-1px); filter: brightness(1.05); }
.trade-auth-btn.signed-in {
  background: var(--panel); color: var(--ink);
  border: 1px solid var(--stroke-warm); box-shadow: var(--shadow);
}

.bell-btn {
  position: relative; cursor: pointer; font-size: 18px;
  background: var(--panel); border: 1px solid var(--stroke-warm);
  border-radius: 12px; padding: 8px 12px; box-shadow: var(--shadow);
  transition: all 0.15s ease;
}
.bell-btn:hover { border-color: var(--fn-orange); transform: translateY(-1px); }
.bell-badge {
  position: absolute; top: -6px; right: -6px;
  min-width: 18px; height: 18px; padding: 0 4px;
  background: #e01e1e; color: #fff; border-radius: 999px;
  font-family: "Inter", sans-serif; font-size: 11px; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
}

.notif-panel {
  position: fixed; top: 74px; right: clamp(14px, 4vw, 48px); z-index: 90;
  width: min(360px, calc(100vw - 28px));
  background: var(--panel-solid); border: 1px solid var(--stroke-warm);
  border-radius: 16px; box-shadow: var(--shadow); overflow: hidden;
}
.notif-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-bottom: 1px solid var(--stroke-soft);
  font-family: "Russo One", sans-serif; font-size: 14px; color: var(--ink);
}
.notif-readall {
  font-size: 12px; font-weight: 700; color: var(--fn-blue); cursor: pointer;
  background: none; border: none; padding: 0;
}
.notif-list { max-height: 340px; overflow-y: auto; }
.notif-item { padding: 11px 14px; border-bottom: 1px solid var(--stroke-soft); cursor: pointer; }
.notif-item:hover { background: rgba(255, 138, 30, 0.07); }
.notif-item.unread { background: rgba(255, 138, 30, 0.1); }
.notif-item h5 { margin: 0 0 3px; font-size: 13px; color: var(--ink); }
.notif-item p { margin: 0; font-size: 12px; color: var(--ink-muted); }
.notif-item time { font-size: 10px; color: var(--ink-muted); }
.notif-empty { padding: 20px; text-align: center; color: var(--ink-muted); font-size: 13px; }

/* ---------- Layout ---------- */
.trade-container { padding-top: 10px; }
.trade-nav { margin-top: 20px; }
.trade-nav[hidden] { display: none; }
.trade-view[hidden] { display: none; }
.trade-intro { margin-bottom: 16px; }
.trade-intro a { color: var(--fn-blue); font-weight: 700; }

.trade-banner {
  background: #fffbeb; border: 2px solid #ffd23f; color: #6b4e00;
  border-radius: var(--radius); padding: 12px 16px; margin: 12px 0;
  font-size: 14px; font-weight: 600;
}
.trade-banner.error { background: #fff0f0; border-color: #e01e1e; color: #8b1010; }

.trade-empty {
  text-align: center; color: var(--ink-muted); font-size: 14px;
  padding: 26px 14px; background: var(--panel); border: 1px dashed var(--stroke-warm);
  border-radius: var(--radius);
}

/* ---------- Coming soon (pre-launch) ---------- */
.coming-soon-card {
  max-width: 520px; margin: clamp(40px, 12vh, 110px) auto; text-align: center;
  background: var(--panel); border: 1px solid var(--stroke-warm);
  border-radius: 22px; padding: 46px 30px 40px;
  box-shadow: var(--shadow); backdrop-filter: blur(8px);
}
.coming-soon-bolt {
  width: 74px; height: 74px; object-fit: contain;
  filter: drop-shadow(0 0 14px rgba(255, 138, 30, 0.55));
  animation: csFloat 3.2s ease-in-out infinite;
}
@keyframes csFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.coming-soon-title {
  margin: 18px 0 10px;
  font-family: "Luckiest Guy", cursive; letter-spacing: 1.5px;
  font-size: clamp(34px, 6vw, 48px); line-height: 1.05;
  background: linear-gradient(90deg, #2a1f5c 0%, var(--fn-purple) 22%, var(--fn-orange) 46%, #ffd23f 54%, var(--fn-orange) 62%, var(--fn-purple) 82%, #2a1f5c 100%);
  background-size: 220% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: csShimmer 3.4s linear infinite;
}
@keyframes csShimmer {
  0% { background-position: 0% center; }
  100% { background-position: -220% center; }
}
.coming-soon-sub { margin: 0 0 8px; font-size: 15.5px; font-weight: 600; color: var(--ink-body); }
.coming-soon-dots span {
  display: inline-block; font-weight: 900; color: var(--fn-orange-2);
  animation: csDot 1.4s ease-in-out infinite;
}
.coming-soon-dots span:nth-child(2) { animation-delay: 0.2s; }
.coming-soon-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes csDot {
  0%, 60%, 100% { opacity: 0.25; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}
.coming-soon-fine { margin: 0; font-size: 12px; color: var(--ink-muted); }
@media (prefers-reduced-motion: reduce) {
  .coming-soon-bolt, .coming-soon-title, .coming-soon-dots span { animation: none; }
}

/* ---------- Buttons ---------- */
.trade-primary-btn {
  font-family: "Russo One", sans-serif; font-size: 15px; cursor: pointer;
  color: #1a1208; border: none; border-radius: 12px; padding: 12px 22px;
  background: linear-gradient(135deg, var(--fn-orange-2), var(--fn-orange));
  box-shadow: 0 8px 22px rgba(255, 138, 30, 0.35); transition: all 0.15s ease;
}
.trade-primary-btn:hover { transform: translateY(-1px); filter: brightness(1.05); }
.trade-primary-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.trade-primary-btn.big { font-size: 17px; padding: 15px 30px; }

.trade-ghost-btn {
  font-family: "Inter", sans-serif; font-weight: 700; font-size: 13px; cursor: pointer;
  color: var(--ink); background: var(--panel); border: 1px solid var(--stroke-warm);
  border-radius: 10px; padding: 9px 14px; transition: all 0.15s ease;
  box-shadow: var(--shadow);
}
.trade-ghost-btn:hover { border-color: var(--fn-orange); color: #5b21b6; background: #fff; }
.trade-ghost-btn.danger:hover { border-color: #e01e1e; color: #e01e1e; }
.trade-ghost-btn:disabled { opacity: 0.45; cursor: not-allowed; }

.trade-check { color: var(--ink) !important; font-weight: 600; font-size: 13px; }
.trade-check input { width: auto !important; margin: 0 !important; accent-color: var(--fn-orange); }

/* ---------- Sign-in hero ---------- */
.signin-hero {
  text-align: center; max-width: 560px; margin: 40px auto;
  background: var(--panel); border: 1px solid var(--stroke-warm);
  border-radius: 20px; padding: 40px 28px; box-shadow: var(--shadow);
}
.signin-hero h2 { font-family: "Russo One", sans-serif; color: #5b21b6; margin: 0 0 12px; }
.signin-hero p { color: var(--ink-body); margin: 0 0 20px; }
.signin-fine { font-size: 12px; color: var(--ink-muted); margin-top: 14px !important; }

/* ---------- Browse ---------- */
.browse-filters {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end;
  background: var(--panel); border: 1px solid var(--stroke-warm);
  border-radius: var(--radius); padding: 14px 16px; margin-bottom: 18px;
  box-shadow: var(--shadow);
}
.browse-filters label {
  display: flex; flex-direction: column; gap: 5px;
  font-size: 12px; font-weight: 700; color: var(--ink-muted);
}
.browse-filters select {
  padding: 8px 10px; border-radius: 10px; font-family: "Inter", sans-serif;
  border: 1px solid var(--stroke-warm); background: #fff; color: var(--ink);
  font-size: 13px; min-width: 130px;
}
.browse-filters .trade-check { flex-direction: row; align-items: center; gap: 7px; padding-bottom: 8px; }

.browse-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
}
.trader-card {
  background: var(--panel); border: 1px solid var(--stroke-warm);
  border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 10px;
}
.trader-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.trader-name { font-family: "Russo One", sans-serif; font-size: 16px; color: var(--ink); margin: 0; word-break: break-word; }
.epic-verified {
  display: inline-block; font-family: "Bebas Neue", sans-serif; letter-spacing: 1px;
  font-size: 11px; color: #1a5c28; background: #e2f8e8; border: 1px solid #46d35a;
  border-radius: 999px; padding: 1px 8px; margin-left: 6px; vertical-align: middle; white-space: nowrap;
}
.trader-rating { font-size: 13px; color: var(--gold); font-weight: 700; white-space: nowrap; }
.trader-rating .muted { color: var(--ink-muted); font-weight: 400; font-size: 11px; }

.overlap-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.overlap-pill {
  font-family: "Bebas Neue", sans-serif; letter-spacing: 0.8px; font-size: 12px;
  padding: 2px 10px; border-radius: 999px;
}
.overlap-pill.have { background: rgba(70, 211, 90, 0.16); color: #1a5c28; border: 1px solid rgba(70, 211, 90, 0.55); }
.overlap-pill.need { background: rgba(28, 95, 212, 0.12); color: #143f8a; border: 1px solid rgba(28, 95, 212, 0.4); }

.chips-block h5 {
  margin: 0 0 5px; font-family: "Bebas Neue", sans-serif; letter-spacing: 1.5px;
  font-size: 12px; color: var(--ink-muted);
}
.cell-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.cell-chip {
  font-size: 11px; font-weight: 700; color: var(--ink);
  background: #fff; border: 1px solid var(--stroke-warm);
  border-radius: 999px; padding: 2px 9px;
}
.cell-chip.match { border-color: #46d35a; background: rgba(70, 211, 90, 0.13); }
.cell-chip.more { color: var(--ink-muted); border-style: dashed; }

.trader-card-actions { display: flex; gap: 8px; margin-top: auto; }
.trader-card-actions .trade-primary-btn { font-size: 13px; padding: 9px 16px; }
.trader-card-actions .report-link {
  margin-left: auto; align-self: center; font-size: 12px; color: var(--ink-muted);
  background: none; border: none; cursor: pointer; text-decoration: underline;
}
.trader-card-actions .report-link:hover { color: #e01e1e; }

/* ---------- Listing editor ---------- */
.listing-editor {
  display: grid; grid-template-columns: 1fr; gap: 18px; margin-bottom: 18px;
}
@media (min-width: 900px) { .listing-editor { grid-template-columns: 1fr 1fr; } }
.listing-col {
  background: var(--panel); border: 1px solid var(--stroke-warm);
  border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow);
}
.listing-col-title {
  margin: 0 0 12px; text-align: center;
  font-family: "Bebas Neue", sans-serif; letter-spacing: 3px; font-size: 18px;
}
.listing-col-title.have { color: #1a5c28; }
.listing-col-title.need { color: var(--fn-blue); }

.picker-sprite { margin-bottom: 12px; }
.picker-sprite-name {
  display: flex; align-items: center; gap: 7px; margin: 0 0 7px;
  font-family: "Russo One", sans-serif; font-size: 13px; color: var(--ink);
}
.picker-sprite-name .row-dot { width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 6px currentColor; }
.picker-cells { display: flex; flex-wrap: wrap; gap: 6px; }
.picker-cell {
  font-family: "Bebas Neue", sans-serif; letter-spacing: 1px; font-size: 12px;
  cursor: pointer; color: var(--ink); background: #fff;
  border: 1.5px solid var(--stroke-warm); border-radius: 999px; padding: 4px 12px;
  transition: all 0.12s ease;
}
.picker-cell:hover { border-color: var(--fn-blue); transform: translateY(-1px); }
.picker-cell.on.have-cell { background: rgba(70, 211, 90, 0.18); border-color: #2aa04a; color: #1a5c28; font-weight: 700; }
.picker-cell.on.need-cell { background: rgba(28, 95, 212, 0.14); border-color: var(--fn-blue); color: #143f8a; font-weight: 700; }

.listing-publish { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.listing-status { font-size: 13px; font-weight: 700; min-height: 18px; }
.listing-status.ok { color: #2aa04a; }
.listing-status.err { color: #e01e1e; }
.listing-status.busy { color: var(--fn-orange-2); }

/* ---------- Manage ---------- */
.manage-section {
  background: var(--panel); border: 1px solid var(--stroke-warm);
  border-radius: var(--radius); padding: 16px 18px; margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.manage-section h3 {
  margin: 0 0 12px; font-family: "Russo One", sans-serif; font-size: 16px; color: #5b21b6;
  display: flex; align-items: center; gap: 8px;
}
.count-pill {
  font-family: "Inter", sans-serif; font-size: 12px; font-weight: 900;
  background: var(--fn-orange); color: #1a1208; border-radius: 999px;
  min-width: 22px; height: 22px; padding: 0 6px;
  display: inline-flex; align-items: center; justify-content: center;
}
.manage-listing-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.manage-listing-row > span { font-size: 14px; font-weight: 600; color: var(--ink-body); }
.manage-listing-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.manage-list-trade { display: flex; flex-direction: column; gap: 10px; }
.request-card {
  background: #fff; border: 1px solid var(--stroke-warm); border-radius: 12px;
  padding: 12px 14px;
}
.request-card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  margin-bottom: 6px;
}
.request-card-head strong { font-family: "Russo One", sans-serif; color: var(--ink); font-size: 14px; }
.status-pill {
  font-family: "Bebas Neue", sans-serif; letter-spacing: 1px; font-size: 12px;
  border-radius: 999px; padding: 2px 10px;
}
.status-pill.pending { background: #fffbeb; color: #6b4e00; border: 1px solid #ffd23f; }
.status-pill.accepted { background: #e2f8e8; color: #1a5c28; border: 1px solid #46d35a; }
.status-pill.declined, .status-pill.cancelled { background: #fff0f0; color: #8b1010; border: 1px solid #e01e1e; }
.status-pill.expired { background: #f0f0f0; color: #555; border: 1px solid #bbb; }

.request-note { font-size: 13px; color: var(--ink-body); font-style: italic; margin: 4px 0; }
.request-cells-summary { font-size: 12px; color: var(--ink-muted); margin: 4px 0; line-height: 1.6; }
.request-actions { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.request-actions .accept {
  background: linear-gradient(135deg, #2aa04a, #46d35a); color: #fff;
  border: none; box-shadow: 0 6px 16px rgba(70, 211, 90, 0.3);
}
.request-actions .decline { color: #e01e1e; border-color: rgba(224, 30, 30, 0.4); }

.partner-highlight {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: rgba(255, 138, 30, 0.1); border: 1.5px solid var(--fn-orange);
  border-radius: 10px; padding: 8px 12px; margin: 6px 0;
}
.partner-highlight .partner-name {
  font-family: "Russo One", sans-serif; font-size: 16px; color: var(--ink);
}
.copy-btn {
  font-size: 12px; font-weight: 700; cursor: pointer;
  background: #fff; color: var(--ink); border: 1px solid var(--stroke-warm);
  border-radius: 8px; padding: 5px 11px;
}
.copy-btn:hover { border-color: var(--fn-orange); }

.settings-row {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
  padding: 12px 0; border-bottom: 1px solid var(--stroke-soft); flex-wrap: wrap;
}
.settings-row:last-child { border-bottom: none; }
.settings-row strong { color: var(--ink); font-size: 14px; }
.settings-hint { margin: 3px 0 0; font-size: 12px; color: var(--ink-muted); max-width: 480px; }
.email-inline { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.email-inline input {
  padding: 8px 12px; border-radius: 10px; border: 1px solid var(--stroke-warm);
  font-family: "Inter", sans-serif; font-size: 13px; color: var(--ink); background: #fff;
  min-width: 220px;
}

/* ---------- Trade modals (LIGHT cream — not the dark admin theme) ---------- */
.trade-overlay {
  position: fixed; inset: 0; z-index: 120;
  background: rgba(42, 31, 92, 0.5); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; padding: 18px;
}
.trade-overlay[hidden] { display: none; }
.trade-modal {
  position: relative; width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto;
  background: linear-gradient(180deg, var(--bg-cream-2), var(--bg-cream));
  border: 1.5px solid var(--stroke-warm); border-radius: 20px;
  padding: 26px; box-shadow: var(--shadow); color: var(--ink-body);
}
.trade-modal h3 { font-family: "Russo One", sans-serif; margin: 0 0 12px; font-size: 20px; color: #5b21b6; }
.trade-modal h4 { font-family: "Russo One", sans-serif; font-size: 14px; color: var(--ink); margin: 16px 0 8px; }
.trade-modal-close {
  position: absolute; top: 14px; right: 14px; width: 34px; height: 34px;
  border-radius: 10px; border: 1px solid var(--stroke-warm); background: #fff;
  color: var(--ink); cursor: pointer; font-size: 16px;
}
.trade-modal-close:hover { border-color: #e01e1e; color: #e01e1e; }
.trade-modal-hint { font-size: 13px; color: var(--ink-muted); margin: 0 0 10px; }
.trade-label { display: block; margin: 14px 0 4px; font-weight: 700; font-size: 13px; color: var(--ink); }
.trade-modal input[type="text"], .trade-modal input[type="email"], .trade-modal select {
  width: 100%; margin-top: 6px; padding: 10px 12px;
  background: #fff; border: 1px solid var(--stroke-warm); border-radius: 10px;
  color: var(--ink); font-size: 14px; font-family: "Inter", sans-serif;
}

/* Safety modal specifics */
.safety-modal { max-width: 620px; }
.safety-title { color: #5b21b6; }
.safety-scroll { max-height: 52vh; overflow-y: auto; padding-right: 6px; }
.safety-list { padding-left: 20px; font-size: 14px; line-height: 1.65; color: var(--ink-body); }
.safety-warn {
  background: #fff0f0; border: 2px solid #e01e1e; border-radius: 14px;
  padding: 12px 16px; margin: 14px 0;
}
.safety-warn h4 { color: #b31010; margin-top: 0; }
.safety-warn p { font-size: 14px; }
.safety-never { font-weight: 900; color: #b31010; margin-bottom: 4px; }
.safety-always { font-weight: 900; color: #1a5c28; margin-bottom: 4px; }
.safety-disclaimer {
  font-size: 12.5px; color: var(--ink-muted); background: #fff;
  border: 1px solid var(--stroke-soft); border-radius: 12px; padding: 10px 14px;
}
.safety-ack {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; margin-top: 14px; padding-top: 14px;
  border-top: 1px solid var(--stroke-soft);
}

/* Request modal cell pickers */
.request-h {
  font-family: "Bebas Neue", sans-serif !important; letter-spacing: 2px !important;
  font-size: 13px !important;
}
.request-h.wanted { color: var(--fn-blue) !important; }
.request-h.offered { color: #1a5c28 !important; }
.request-cells { display: flex; flex-wrap: wrap; gap: 6px; }
.request-cells .picker-cell.on { background: rgba(255, 138, 30, 0.18); border-color: var(--fn-orange-2); color: #7a3c00; font-weight: 700; }

/* Rate modal */
.star-row { display: flex; gap: 6px; margin: 10px 0; }
.star {
  font-size: 32px; cursor: pointer; background: none; border: none;
  color: rgba(42, 31, 92, 0.2); transition: color 0.1s ease, transform 0.1s ease;
  padding: 0 2px;
}
.star:hover { transform: scale(1.15); }
.star.on { color: var(--gold); text-shadow: 0 0 10px rgba(212, 146, 10, 0.45); }
.rate-success { margin: 10px 0; display: flex; }
.tag-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.tag-pill {
  font-family: "Bebas Neue", sans-serif; letter-spacing: 1px; font-size: 13px;
  cursor: pointer; color: var(--ink); background: #fff;
  border: 1.5px solid var(--stroke-warm); border-radius: 999px; padding: 5px 15px;
  transition: all 0.12s ease;
}
.tag-pill.on { background: rgba(123, 61, 255, 0.14); border-color: var(--fn-purple); color: #4c1d95; font-weight: 700; }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .trade-actions { gap: 6px; }
  .trade-auth-btn { font-size: 11px; padding: 8px 10px; }
  .safety-ack { justify-content: center; }
  .browse-filters label { flex: 1 1 40%; }
  .manage-listing-row, .settings-row { flex-direction: column; align-items: stretch; }
}
