/* Trading! */

.tr-tabs { margin-bottom: 18px; flex-wrap: wrap; }
.tr-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 6px; }
.tr-intro { margin: 0 0 14px; color: var(--muted); font-weight: 600; }
.tr-h2 { font: 600 1.25rem/1.2 var(--font-display); margin: 22px 0 12px; }
.tr-h2:first-child { margin-top: 0; }
.tr-h3 { font: 600 1.1rem/1.2 var(--font-display); margin: 0 0 10px; }
.tr-none { margin: 6px 0; font-size: .92rem; }
.tr-small { margin: 10px 0 0; font-size: .88rem; text-align: center; }
a.cd-mini { color: inherit; text-decoration: none; }

/* a trade */
.tr-list { display: flex; flex-direction: column; gap: 14px; }
.tr-trade {
  padding: 16px 18px;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.tr-trade.focus { border: 2.5px solid var(--ink); box-shadow: 0 0 0 4px var(--accent), var(--shadow); }
.tr-trade-head, .tr-trade-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.tr-trade-head { margin-bottom: 12px; font-weight: 700; }
.tr-trade-head a, .tr-trade-foot a { color: var(--ink); }
.tr-trade-foot { margin-top: 12px; font-size: .9rem; font-weight: 600; }
.tr-btns { display: flex; gap: 8px; }
.tr-status { padding: 2px 10px; border-radius: 99px; background: var(--soft); font-size: .82rem; font-weight: 800; }
.tr-status.s-open { background: #fff1b8; }
.tr-status.s-done { background: #c9f5d2; }
.tr-status.s-declined, .tr-status.s-failed { background: #ffd6d6; color: #a30000; }
.tr-status.s-gift { background: #ffd6ec; }
.tr-status.s-countered { background: #e3dcff; }
.tr-sides { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: start; }
.tr-side { min-width: 0; padding: 12px; border-radius: 14px; background: var(--soft); }
.tr-side-h { margin-bottom: 8px; font-weight: 800; font-size: .9rem; color: var(--muted); }
.tr-arrow { align-self: center; font: 700 1.6rem/1 var(--font-display); }
.tr-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 12px 10px; margin-bottom: 6px; }
.tr-quote { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.tr-quote span:first-child { flex: 1; min-width: 0; font-family: var(--font-serif, Georgia, serif); font-style: italic; overflow-wrap: anywhere; }
.tr-money { font: 700 1.3rem/1.2 var(--font-display); }
.tr-note { margin: 12px 0 0; font-style: italic; overflow-wrap: anywhere; }
.tr-why { margin: 8px 0 0; color: #a30000; font-weight: 700; font-size: .9rem; }

/* making a trade */
.tr-form { display: flex; flex-direction: column; gap: 16px; }
.tr-lbl { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-weight: 700; }
.tr-lbl .input { flex: 1; min-width: 140px; }
.tr-to { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.tr-to .tr-lbl { flex: 1; min-width: 240px; }
.tr-check { display: flex; align-items: center; gap: 8px; font-weight: 700; cursor: pointer; }
.tr-check input { width: 18px; height: 18px; accent-color: var(--ink); }
.tr-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.tr-col { min-width: 0; display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 14px; background: var(--soft); }
.tr-pick-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 14px 10px; max-height: 360px; overflow-y: auto; padding: 6px 4px; }
.tr-pick-quotes { display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow-y: auto; }
.tr-pick { position: relative; }
.tr-pick.on .cd-mini-card { outline: 4px solid var(--accent); outline-offset: 3px; border-radius: 10px; }
.tr-pick.on::after {
  content: '✓';
  position: absolute;
  top: -6px;
  right: -4px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--card);
  font: 700 .8rem/1 var(--font-display);
}
.tr-qpick { width: 100%; padding: 4px 10px; text-align: left; border: 2px solid transparent; border-radius: 10px; background: var(--card); cursor: pointer; font: inherit; color: inherit; }
.tr-qpick.on { border-color: var(--ink); background: #fff6cc; }
.tr-qpick.on::after { top: 50%; right: -8px; transform: translateY(-50%); }
/* fish in auctions */
.tr-fishes { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 0; }
.tr-pick-fish { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; max-height: 300px; overflow-y: auto; padding: 6px 4px; }
.tr-fish { display: flex; flex-direction: column; align-items: center; gap: 1px; width: 118px; padding: 6px 6px 8px; border: 2.5px solid var(--tc, var(--ink)); border-radius: 12px; background: var(--card); text-align: center; line-height: 1.2; }
.tr-fish b { font-size: .9rem; }
.tr-fish small { color: var(--muted); font-size: .72rem; }
.tr-fish-art { width: 92px; height: 52px; }
.tr-rod-art { width: 52px; height: 52px; }
.tr-fish-p { font-weight: 800; font-size: .85rem; }
.tr-fpick { padding: 0; border: 0; background: none; cursor: pointer; font: inherit; color: inherit; }
.tr-fpick .tr-fish { width: 100%; }
.tr-fpick.on .tr-fish { outline: 4px solid var(--accent); outline-offset: 2px; }
.tr-gpick { display: flex; flex-direction: column; gap: 4px; }
.tr-gn { display: flex; align-items: center; gap: 6px; white-space: nowrap; font-size: .75rem; color: var(--muted); }
.tr-gn .input { width: 100%; min-width: 0; padding: 2px 6px; }

@media (max-width: 640px) {
  .tr-sides { grid-template-columns: 1fr; }
  .tr-arrow { justify-self: center; transform: rotate(90deg); }
  .tr-cols { grid-template-columns: 1fr; }
  .tr-trade { padding: 14px; }
}

/* gifts and counter-offers */
.tr-gift { border-color: #ffb3d4; }
.tr-gift .tr-side { background: #fff0f7; }
.tr-counter { margin: 0; padding: 10px 14px; border-radius: 12px; background: #efe9ff; border: 1.5px solid #cbbcff; font-weight: 600; }
.tr-counter .link-btn { margin-left: 4px; }

/* auctions */
.tr-auc-start { margin-bottom: 18px; }
.tr-auc-start > .btn { display: inline-flex; align-items: center; gap: 8px; }
.tr-auc-n { font: 700 .9rem/1 var(--font-body, inherit); }
.tr-auc-terms { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px 16px; }
.tr-auc-terms .tr-lbl { flex-direction: column; align-items: stretch; gap: 6px; }
.tr-auc-terms .tr-lbl .input { flex: none; min-width: 0; width: 100%; }
.tr-auc .tr-side { margin-bottom: 4px; }
.tr-auc-price { margin: 10px 0 0; font-weight: 600; }
.tr-auc-price a { color: var(--ink); }
.tr-status.s-auction { background: #f2d4b0; }
.tr-bid { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.tr-bid .input { width: 120px; padding-top: 6px; padding-bottom: 6px; }

/* ------------------------------------------------------------ dark mode (see the end of assets/css/style.css) */
html[data-dark] .tr-status:is(.s-open, .s-done, .s-gift, .s-countered) { color: #1d1b16; }
html[data-dark] .tr-why { color: #ff9b9b; }
html[data-dark] .tr-qpick.on { background: #3a3220; }
html[data-dark] .tr-gift .tr-side { background: #3d2433; }
html[data-dark] .tr-counter { background: #2c2740; }
html[data-dark] .tr-status.s-auction { color: #1d1b16; }
