/* ---------- Terminal (FOX LIVE): one look for every section ----------
   Mint · Buy · List · Rare NFTs · Claim offers · Profit & loss · Fees & spend · Activity.
   Loaded after style.css and fox.css; only styles, no behaviour. Each section has its own colour (--sec). */

#mintCard  { --sec: linear-gradient(90deg, #ffc98a, #ff7a2a); --sec-c: #ff8a3d; }
#buyCard   { --sec: linear-gradient(90deg, #a9dcff, #5fb4ff); --sec-c: #6fbcff; }
#listCard  { --sec: linear-gradient(90deg, #fff1dc, #ffb86b); --sec-c: #ffb86b; }
#rareCard  { --sec: linear-gradient(90deg, #fff0a6, #ffd84d); --sec-c: #ffd84d; }
#offerCard { --sec: linear-gradient(90deg, #d0bdff, #9a7bff); --sec-c: #a98bff; }
#pnlCard   { --sec: linear-gradient(90deg, #b8f5cf, #4fd68a); --sec-c: #5ee08a; }
#feesCard  { --sec: linear-gradient(90deg, #ffe0a3, #f0a63a); --sec-c: #f0a63a; }
#logCard   { --sec: linear-gradient(90deg, #c9d4e3, #8a9bb3); --sec-c: #9aaac0; }

/* ---- the section card ---- */
:is(.mm-card, #pnlCard, #feesCard, #logCard) {
  position: relative; overflow: hidden; border-radius: 20px; padding: 22px 22px 20px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--panel) 94%, #fff 6%), var(--panel) 120px);
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .04);
}
:is(.mm-card, #pnlCard, #feesCard, #logCard)::before {   /* thin colour line on top */
  content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: var(--sec); opacity: .9; pointer-events: none;
}
/* header row: icon · title · subtitle, then a divider */
:is(.mm-card, #pnlCard, #feesCard, #logCard) > :first-child { padding-bottom: 14px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.mm-head { gap: 12px; align-items: center; }
.mm-head h2 { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.mm-head > .muted { flex-basis: 100% !important; margin: -8px 0 0 48px !important; font-size: 12.5px; line-height: 1.4; }
.mm-ic { width: 36px; height: 36px; border-radius: 11px; flex: none; }
.mm-ic.pnl  { background: linear-gradient(135deg, #b8f5cf, #4fd68a); }
.mm-ic.fees { background: linear-gradient(135deg, #ffe0a3, #f0a63a); }
.mm-ic.act  { background: linear-gradient(135deg, #e3e9f2, #8a9bb3); }

/* ---- fields ---- */
.mm-card .offer-grid { gap: 16px 14px; margin-top: 14px; }
:is(.mm-card, #pnlCard, #feesCard) label:not(:has(input)) {
  display: block; margin: 0 0 7px; font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--muted);
}
.mm-card :is(input:not([type=checkbox]):not([type=radio]):not(.qty), select) {
  min-height: 44px; border-radius: 12px; background: rgba(0, 0, 0, .28); border: 1px solid var(--line);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.mm-card :is(input, select):hover { border-color: color-mix(in srgb, var(--sec-c, var(--fox)) 35%, var(--line)); }
.mm-card :is(input, select):focus {
  outline: none; background: rgba(0, 0, 0, .36);
  border-color: color-mix(in srgb, var(--sec-c, var(--fox)) 75%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--sec-c, var(--fox)) 18%, transparent);
}
.mm-card .offer-grid .muted.small, .mm-card .field-help { display: block; margin-top: 6px; font-size: 11.5px; line-height: 1.45; opacity: .85; }
.mm-card input[type=checkbox] { accent-color: var(--sec-c, var(--fox)); width: 16px; height: 16px; }

/* ---- buttons in a section's action row ---- */
.mm-card .row > :is(button.primary, button.ghost):not(.chip):not(.os-key) { min-height: 46px; padding: 0 22px; border-radius: 12px; font-weight: 700; }
.mm-card .row > button.primary.big { min-width: 150px; }
.mm-card .row > button.primary:not(:disabled):hover { transform: translateY(-1px); }
.mm-card .row > button { transition: transform .12s ease, filter .12s ease; }

/* ---- fold-out panels (Advanced, Wallets to buy with, Repeat…) ---- */
.mm-card details:not(.mc-more) {
  margin-top: 14px; padding: 12px 16px; border-radius: 14px; background: rgba(0, 0, 0, .18); border: 1px solid var(--line);
}
.mm-card details:not(.mc-more) > summary { cursor: pointer; list-style: none; font-size: 13px; }
.mm-card details > summary::-webkit-details-marker { display: none; }
.mm-card details:not(.mc-more) > summary::before {
  content: "›"; display: inline-block; width: 14px; margin-right: 6px; color: var(--sec-c, var(--fox)); font-weight: 700; transition: transform .15s;
}
.mm-card details[open]:not(.mc-more) > summary::before { transform: rotate(90deg); }
.mm-card details[open]:not(.mc-more) > summary { margin-bottom: 10px; }

/* ---- stat tiles: quotes, Profit & loss, Fees & spend (same look as the confirm boxes) ---- */
:is(.oq-tiles, .pnl-top, .fee-top) { gap: 10px !important; }
:is(.oq-tiles, .pnl-top, .fee-top) > div {
  display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 12px 14px; border-radius: 14px;
  background: var(--panel2); border: 1px solid var(--line);
}
:is(.oq-tiles, .pnl-top, .fee-top) span, .fee-top .muted.small {
  font-size: 11px !important; letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
}
:is(.oq-tiles, .pnl-top, .fee-top) em { text-transform: none; letter-spacing: 0; }
:is(.oq-tiles, .pnl-top, .fee-top) b {
  font-family: var(--mono); font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
:is(.pnl-top .pnl-main, .fee-top .fee-main) {
  border-color: color-mix(in srgb, var(--sec-c) 45%, var(--line));
  background: linear-gradient(135deg, color-mix(in srgb, var(--sec-c) 14%, var(--panel2)), color-mix(in srgb, var(--sec-c) 4%, var(--panel2)));
}
:is(.pnl-top .pnl-main, .fee-top .fee-main) b { font-size: 24px; }
.pnl-top small { font-size: 11px; color: var(--muted); white-space: normal; }

/* ---- sub-panels (By type / By wallet, sales columns) ---- */
#feesCard .sub, #pnlCard .sales-col { background: var(--panel2); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
#feesCard .sub h3 { margin: 0 0 8px; font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.fee-row { padding: 8px 0; border-bottom: 1px solid rgba(255, 255, 255, .05); font-variant-numeric: tabular-nums; }
.fee-row:last-child { border-bottom: none; }

/* ---- tables ---- */
:is(.mm-card, #pnlCard, #feesCard) table { width: 100%; border-collapse: separate; border-spacing: 0; font-variant-numeric: tabular-nums; }
:is(.mm-card, #pnlCard, #feesCard) th {
  padding: 9px 10px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
  text-align: left; border-bottom: 1px solid var(--line); background: rgba(0, 0, 0, .12);
}
:is(.mm-card, #pnlCard, #feesCard) td { padding: 10px; border-bottom: 1px solid rgba(255, 255, 255, .045); }
:is(.mm-card, #pnlCard, #feesCard) tbody tr:hover td { background: rgba(255, 255, 255, .025); }
:is(.mm-card, #pnlCard, #feesCard) tbody tr:last-child td { border-bottom: none; }

/* ---- price levels (Buy) and wallet-group chips ---- */
.price-levels { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.price-levels .chip {
  border-radius: 999px; padding: 6px 12px; font-family: var(--mono); font-size: 12.5px; background: rgba(0, 0, 0, .22);
  border: 1px solid var(--line); transition: border-color .15s, background .15s;
}
.price-levels .chip:hover { border-color: color-mix(in srgb, var(--sec-c, var(--fox)) 60%, var(--line)); background: color-mix(in srgb, var(--sec-c, var(--fox)) 10%, transparent); }
.mm-card .subtabs .tab { border-radius: 999px; }

/* ---- Activity: one line per event, coloured edge by kind ---- */
#log { max-height: 440px; gap: 0; font-size: 12.5px; }
#log > div {
  display: flex; gap: 12px; align-items: baseline; padding: 8px 10px; margin: 0; border-bottom: 1px solid rgba(255, 255, 255, .045);
  border-left: 2px solid transparent; word-break: break-word;
}
#log > div:hover { background: rgba(255, 255, 255, .025); }
#log > div .t { flex: none; min-width: 64px; color: var(--muted); }
#log > div:has(> .ok) { border-left-color: var(--ok); }
#log > div:has(> .warn) { border-left-color: var(--warn, #e0a040); }
#log > div:has(> .bad) { border-left-color: var(--bad); }
#log:empty::after { content: "Nothing yet — mints, buys, listings and sends show up here."; display: block; padding: 18px 10px; color: var(--muted); font-family: inherit; }

/* ---- phones ---- */
@media (max-width: 640px) {
  :is(.mm-card, #pnlCard, #feesCard, #logCard) { padding: 16px; border-radius: 16px; }
  .mm-head > .muted { margin-left: 0 !important; margin-top: 2px !important; }
  .mm-card .row > :is(button.primary, button.ghost) { flex: 1 1 auto; }
  :is(.pnl-top .pnl-main, .fee-top .fee-main) { grid-column: 1 / -1; }
  :is(.oq-tiles, .pnl-top, .fee-top) b { font-size: 16px; }
}

/* ---- Profit & loss: quieter explanations, tidy sub-headings ---- */
#pnlCard p.muted.small { font-size: 11.5px; line-height: 1.5; opacity: .75; max-width: 78ch; }
#pnlCard .pnl-sub-h { margin: 22px 0 10px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 15px; font-weight: 700; }
#pnlCard .mp-h {
  margin: 22px 0 8px; font-size: 11px !important; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
#pnlCard .mp-h .muted, #pnlCard .mp-h span { font-weight: 500; }

/* ---- "I'm the dev" (Mint) and the Creator P&L collection list ---- */
.dev-check { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 11px 14px; border-radius: 12px; cursor: pointer;
  background: color-mix(in srgb, #ffd84d 7%, transparent); border: 1px solid color-mix(in srgb, #ffd84d 28%, var(--line)); font-size: 13px; }
.dev-check input { accent-color: #ffd84d; width: 16px; height: 16px; flex: none; }
.cp-cols { margin-top: 18px; }
.cp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cp-chips .chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 6px 5px 12px; border-radius: 999px; background: rgba(0,0,0,.22); border: 1px solid var(--line); font-size: 12.5px; }
.cp-x { all: unset; cursor: pointer; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); }
.cp-x:hover { background: rgba(255,255,255,.08); color: var(--bad); }

/* ---- PNL Calendar: which view it shows ---- */
.cal-seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: rgba(255,255,255,.05); border: 1px solid var(--line); }
.cal-seg button { all: unset; cursor: pointer; font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: 999px; color: var(--muted); }
.cal-seg button:hover { color: var(--text); }
.cal-seg button.on { background: var(--accent); color: #111; }
.cal-view { font-size: 12px; font-weight: 600; padding: 3px 9px; margin-left: 6px; border-radius: 999px; vertical-align: middle;
  background: rgba(255,255,255,.07); border: 1px solid var(--line); color: var(--muted); }

/* ---- Swap activity ---- */
.sx-hist { margin-top: 16px; padding: 18px 22px; }
.sx-hist-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.sx-hist-head h3 { margin: 0; font-size: 17px; }
.sx-row { display: grid; grid-template-columns: 34px 1fr auto auto; align-items: center; gap: 12px; padding: 11px 4px; border-top: 1px solid var(--line); }
.sx-row:first-child { border-top: 0; }
.sx-ic { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: var(--accent-ink, #0a0d0b);
  background: linear-gradient(135deg, var(--fox2, #ffb25c), var(--fox, #ff7a2a)); }
.sx-row.failed .sx-ic { background: rgba(255,107,107,.18); color: var(--bad); }
.sx-row.pending .sx-ic { background: rgba(255,255,255,.08); color: var(--muted); }
.sx-what, .sx-amts { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sx-what b { font-size: 14px; }
.sx-what .small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sx-amts { text-align: right; align-items: flex-end; }
.sx-out { font-family: var(--mono); font-weight: 600; color: var(--ok); }
.sx-row.failed .sx-out { color: var(--muted); }
.sx-side { display: flex; align-items: center; gap: 8px; }
.sx-st { font-size: 11.5px; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line); }
.sx-st.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.sx-st.bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.sx-st.wait { color: var(--warn, #f5c542); border-color: color-mix(in srgb, var(--warn, #f5c542) 40%, transparent); }
.sx-link { color: var(--muted); text-decoration: none; font-size: 14px; }
.sx-link:hover { color: var(--text); }
.sx-empty { margin: 4px 0; }
@media (max-width: 560px) { .sx-row { grid-template-columns: 30px 1fr auto; } .sx-side { grid-column: 2 / -1; justify-content: flex-end; } .sx-ic { width: 30px; height: 30px; } }

/* ---- section buttons under the main tabs: one centred pill switch (scrolls sideways on small screens) ---- */
header .fox-sections { padding: 6px 2px 2px; }
.fox-sec-track { flex: none; display: flex; align-items: center; gap: 3px; margin: 0 auto; padding: 4px;
  border: 1px solid var(--glass-line, rgba(255,255,255,.1)); border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.015)); box-shadow: inset 0 1px 0 rgba(255,255,255,.04); }
header .fox-sections .fox-sec-track button { flex: none; border: 0; border-radius: 999px; padding: 7px 15px; background: transparent;
  color: var(--muted); font: 600 12.5px/1.2 var(--sans, inherit); letter-spacing: .15px; transition: color .15s, background .15s, box-shadow .15s; }
header .fox-sections .fox-sec-track button:hover { color: var(--text); background: rgba(255,255,255,.06); }
header .fox-sections .fox-sec-track button.on { color: #1a0d05; background: linear-gradient(135deg, var(--fox2, #ffb25c), var(--fox, #ff7a2a));
  box-shadow: 0 6px 18px -6px rgba(255,106,31,.6), inset 0 1px 0 rgba(255,255,255,.35); }
.fox-sec-track .fox-sep { margin: 4px 5px; }
/* Fees & spend sits right under Profit & loss (same button) */
#feesCard { margin-top: -2px; }

/* ---- section buttons as a menu fixed on the left (wide screens; fox.js moves the bar out of the top bar) ----
   The original button style (outlined pills, orange when picked), stacked. The page stays centred: it only gets
   narrower, the same on both sides, when the window is too narrow for the menu to sit beside it. */
.fox-sections.side { position: fixed; z-index: 6; left: 18px; top: calc(var(--fox-head, 64px) + 20px); width: 160px;
  display: block; padding: 0; margin: 0; overflow: visible; flex-basis: auto; }
body:has(#appView.hidden) .fox-sections.side { display: none; }
.fox-sections.side .fox-sec-track { flex-direction: column; align-items: stretch; gap: 6px; margin: 0; padding: 0; border: 0; border-radius: 0;
  background: none; box-shadow: none; }
.fox-sections.side .fox-sec-track button { width: 100%; text-align: left; background: transparent; color: var(--muted);
  border: 1px solid var(--glass-line, rgba(255,255,255,.12)); border-radius: 999px; padding: 8px 14px; font: 600 12.5px/1.2 var(--sans, inherit);
  box-shadow: none; transition: all .15s; }
.fox-sections.side .fox-sec-track button:hover { color: var(--text); border-color: rgba(255,170,110,.3); background: rgba(255,255,255,.03); }
.fox-sections.side .fox-sec-track button.on { color: var(--fox2, #ffb25c); border-color: rgba(255,138,61,.5); background: rgba(255,122,42,.1); box-shadow: none; }
.fox-sections.side .fox-sep { display: block; width: auto; height: 1px; margin: 4px 10px; background: var(--glass-line, rgba(255,255,255,.1)); }
body:has(.fox-sections.side .fox-sec-track) main { max-width: min(1180px, calc(100vw - 2 * (160px + 18px + 16px))); }

/* PNL Calendar header on phones: title + Trading/Creator + time zone on one line, month arrows on the next */
@media (max-width: 600px) {
  #calDlg .dist-head { flex-wrap: wrap; gap: 10px; }
  #calDlg .dist-head > .row { flex-wrap: wrap; flex-direction: row; }
  #calDlg .dist-head > .row:last-child { width: 100%; justify-content: space-between; }
  #calDlg .cal-tz { width: auto; }
}

/* "How these work" under the mint buttons */
.mint-how { margin: 10px 0 2px; }
.mint-how summary { cursor: pointer; width: max-content; font-size: 12.5px; font-weight: 600; color: var(--fox2, #ffb25c); list-style: none; }
.mint-how summary::-webkit-details-marker { display: none; }
.mint-how[open] summary { margin-bottom: 8px; }
.mint-how-body { padding: 2px 2px 4px; font-size: 12.5px; line-height: 1.55; display: grid; gap: 8px; }
.mint-how-body p { margin: 0; }
