/* The licensor model's pieces on /sell and /dashboard (licence.js): the payout details form, the
   statements list and the printable statement. board.css gives the tokens and the buttons. */

.po-form .field { margin: 0 0 16px; }
.po-form select, .po-form input[type="text"], .po-form input[type="email"] { width: 100%; }
.po-seg { border: 0; padding: 0; margin: 0 0 16px; min-width: 0; }
.po-seg .seg { display: flex; flex-wrap: wrap; gap: 8px; }
.po-seg .seg label { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 980px; background: var(--fill-strong); cursor: pointer; font-size: 15px; }
.po-seg .seg label:has(input:checked) { background: var(--accent-soft); color: var(--accent); }
.po-seg .seg input { margin: 0; }
.po-summary .po-line { margin: 0 0 2px; font-size: 16px; overflow-wrap: anywhere; }
.po-summary .po-fine { margin: 0 0 6px; font-size: 14px; color: var(--secondary); }
@media (min-width: 640px) { .po-form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; } }

.lic-balance { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 0 0 18px; }
.lic-balance > div { padding: 14px 16px; border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--hairline-strong); }
.lic-balance dt { font-size: 13px; color: var(--secondary); margin: 0 0 4px; }
.lic-balance dd { margin: 0; display: flex; flex-direction: column; gap: 2px; }
.lic-balance dd b { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.lic-balance dd span { font-size: 13px; color: var(--secondary); }
.lic-empty { color: var(--secondary); margin: 0; }
.lic-list { list-style: none; margin: 0; padding: 0 18px; }
.lic-row { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 12px 0; }
.lic-row + .lic-row { border-top: 0.5px solid var(--hairline-strong); }
.lic-row .what { display: flex; flex-direction: column; min-width: 0; }
.lic-row .m { font-size: 14px; color: var(--secondary); overflow-wrap: anywhere; }
.lic-row .st { font-size: 14px; color: var(--secondary); }
.lic-row.due .st { color: var(--accent); }

.statement { padding: 24px; border-radius: 18px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--hairline-strong); margin: 18px 0; overflow-x: auto; }
.statement h2 { margin: 0 0 14px; font-size: 26px; }
.statement h2:focus { outline: none; }
.statement .eyebrow { margin: 0 0 4px; }
.st-parties { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 24px; margin: 0 0 18px; }
.st-parties p { margin: 0; overflow-wrap: anywhere; }
.st-parties .m { color: var(--secondary); font-size: 14px; }
.lic-table { width: 100%; border-collapse: collapse; margin: 0 0 18px; font-size: 14px; font-variant-numeric: tabular-nums; }
.lic-table caption { text-align: left; font-weight: 600; font-size: 15px; padding: 0 0 6px; }
.lic-table th, .lic-table td { text-align: left; padding: 6px 8px 6px 0; border-top: 0.5px solid var(--hairline-strong); vertical-align: top; }
.lic-table td:not(:first-child), .lic-sum td { text-align: right; }
.lic-sum th { font-weight: 400; }
.st-actions { gap: 10px; flex-wrap: wrap; }

/* "Sell it" or "Give it away" on /sell's edition step (sell.js). */
.mode-seg { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 18px; border: 0; padding: 0; }
.mode-seg label { flex: 1 1 200px; display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--hairline-strong); cursor: pointer; }
.mode-seg label:has(input:checked) { box-shadow: inset 0 0 0 2px var(--accent); }
.mode-seg input { position: absolute; opacity: 0; pointer-events: none; }
.mode-seg label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.mode-seg b { font-size: 16px; }
.mode-seg span { font-size: 14px; color: var(--secondary); }

/* Print: only the statement (licence.js sets <html data-printing="statement"> while printing). */
@media print {
  html[data-printing="statement"] body * { visibility: hidden !important; }
  html[data-printing="statement"] .statement, html[data-printing="statement"] .statement * { visibility: visible !important; }
  html[data-printing="statement"] .statement { position: absolute; left: 0; top: 0; width: 100%; margin: 0; box-shadow: none; background: #fff; color: #000; }
  html[data-printing="statement"] .st-actions, html[data-printing="statement"] .statement .problem { display: none !important; }
}
