/* "Buchtausch" at Soon (ui/bookswap.js) */
#bookswap .win-body { padding: 5px 6px; }
.bs-intro { font-size: 7px; line-height: 8px; margin-bottom: 4px; }
.bs-head { display: flex; justify-content: space-between; align-items: center; gap: 4px; min-height: 11px; padding: 1px 3px; margin-bottom: 2px;
  background: #1d1712; box-shadow: inset 0 0 0 1px var(--bronze-d); font-size: 8px; line-height: 9px; color: var(--gold); }
.bs-cnt { flex: none; text-shadow: var(--ol); }
.bs-list { max-height: 120px; min-height: 30px; overflow-y: auto; overflow-x: hidden; padding-right: 3px; margin-bottom: 4px; }
.bs-empty { font-size: 7px; line-height: 8px; text-align: center; padding: 10px 4px; }
.bs-row { display: flex; align-items: center; gap: 4px; min-height: 20px; padding: 0 3px; margin-top: 1px; cursor: pointer; }
.bs-row:first-child { margin-top: 0; }
.bs-row:hover { background: #241c15; }
.bs-row.on { background: rgba(120, 214, 90, .12); box-shadow: inset 0 0 0 1px rgba(120, 214, 90, .4); }
.bs-row.off { opacity: .5; cursor: default; }
.bs-row .slot { flex: none; }
.bs-mid { flex: 1; min-width: 0; }
.bs-nm, .bs-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bs-nm { font-size: 8px; line-height: 9px; }
.bs-sub { font-size: 7px; line-height: 8px; }
.bs-n { flex: none; min-width: 22px; text-align: center; font-size: 8px; line-height: 9px; }
/* - and + of a row: small framed squares like the slots */
.bs-pm { flex: none; width: 9px; height: 9px; text-align: center; font-size: 8px; line-height: 9px; color: var(--gold); cursor: pointer;
  background: #0f0c0a; box-shadow: inset 0 0 0 1px var(--bronze-d); }
.bs-pm:hover { box-shadow: inset 0 0 0 1px var(--bronze-l); color: #fff; }
.bs-pm.off { color: var(--dim); opacity: .4; pointer-events: none; }
.bs-skills { display: flex; justify-content: center; gap: 3px; margin: 1px 0 2px; }
/* a row per path of the class, its name above it (the own path gold) */
#bookswap .bs-way { font-size: 7px; line-height: 8px; text-align: center; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bs-sk { cursor: pointer; }
.bs-sk.picked { box-shadow: inset 0 0 0 1px var(--gold), inset 1px 1px 0 1px var(--edge); }
.bs-sk.late img { filter: grayscale(.8) brightness(.7); }
.bs-lv { position: absolute; right: 2px; bottom: 1px; font-size: 6px; line-height: 6px; pointer-events: none; text-shadow: var(--ol); }
.bs-lv.g0 { color: #fff; }
.bs-lv.g1 { color: var(--gold); }
.bs-lv.g2 { color: #ff8a4a; }
.bs-lv.g3 { color: #c890ff; }
.bs-pick { font-size: 8px; line-height: 9px; text-align: center; min-height: 9px; margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bs-btns { width: 100%; }
.bs-keys { text-align: center; margin-top: 3px; line-height: 7px; }

/* "Schriftrollentausch" at Soon (ui/scrollswap.js): what goes | the golden arrow with the rate | what comes, the amount, a note
   line of fixed height (why not / what happens to bound ones) and the buttons; the window keeps its size whatever it shows */
#ui #scrollswap .win-body { padding: 5px 6px; }
/* the trades (SCROLL_TRADES) as tabs in the head bar: icon of what goes and the rate, equally wide, the chosen one gold */
#ui #scrollswap .ss-h { padding: 0 5px 0 1px; }
#ui #scrollswap .ss-kinds { width: auto; margin: 0; gap: 2px; }
#ui #scrollswap .ss-kinds > .btn { display: flex; align-items: center; justify-content: center; gap: 2px; padding: 0 3px; white-space: nowrap; }
#ui #scrollswap .ss-kinds > .btn > img { flex: none; width: 9px; height: 9px; object-fit: contain; image-rendering: auto; }
#ui #scrollswap .ss-trade { display: grid; grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr); align-items: start; gap: 2px; padding: 4px 3px 5px;
  background: radial-gradient(ellipse 60% 70% at 50% 40%, rgba(242, 196, 90, .07), transparent 70%); }
#ui #scrollswap .ss-side { display: flex; flex-direction: column; align-items: center; min-width: 0; text-align: center; }
#ui #scrollswap .ss-side > div:not(.ss-slot) { width: 100%; font-size: 7px; line-height: 8px; overflow: hidden; }
#ui #scrollswap .ss-cap, #ui #scrollswap .ss-have, #ui #scrollswap .ss-b { height: 8px; text-overflow: ellipsis; white-space: nowrap; }
#ui #scrollswap .ss-cap { margin-bottom: 2px; }
#ui #scrollswap .ss-slot { width: 24px; height: 24px; margin-bottom: 2px; }
#ui #scrollswap .ss-slot > img { left: 4px; top: 4px; }
#ui #scrollswap .ss-slot > .n { right: 2px; bottom: 2px; font-size: 7px; line-height: 7px; }
#ui #scrollswap .ss-slot.short > img { opacity: .45; }
#ui #scrollswap .ss-get .ss-slot { box-shadow: inset 0 0 0 1px #c9a24a, inset 0 0 0 2px #0a0907, 0 0 5px #f2c45a55; }
/* the name in at most two lines, always the room of two, one line in the middle of it */
#ui #scrollswap .ss-nm { display: flex; align-items: center; justify-content: center; height: 16px; color: #eee3c8; }
#ui #scrollswap .ss-nm > span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
#ui #scrollswap .ss-mid { display: flex; flex-direction: column; align-items: center; padding-top: 14px; }
#ui #scrollswap .ss-arrow { width: 12px; height: 12px; animation: ss-nudge 1.6s ease-in-out infinite; }
#ui #scrollswap .ss-rate { margin-top: 2px; font-size: 7px; line-height: 8px; white-space: nowrap; text-shadow: var(--ol); }
@keyframes ss-nudge { 50% { transform: translateX(2px); } }
/* the new scrolls light up once after a swap (only opacity, on its own layer) */
#ui #scrollswap .ss-slot::after { content: ''; position: absolute; inset: -2px; pointer-events: none; opacity: 0;
  box-shadow: 0 0 0 1px #ffe8a0, 0 0 8px 2px #f2c45a; }
#ui #scrollswap .ss-slot.ss-done::after { animation: ss-done .9s ease-out; }
@keyframes ss-done { 0% { opacity: 1; } 100% { opacity: 0; } }
#ui #scrollswap .ss-amt { width: 100%; margin-top: 5px; }
/* the chosen amount in gold (imperial.css: gold denotes selection) */
#ui #scrollswap :is(.ss-amt, .ss-kinds) > .btn.on { color: #ffe39a; background: linear-gradient(#5a4a2c, #3a2f1c 55%, #2a2214); box-shadow: 0 0 0 1px #060504, inset 0 0 0 1px #e2bf72; }
#ui #scrollswap .ss-note { height: 16px; margin: 4px 0; font-size: 7px; line-height: 8px; text-align: center; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
#ui #scrollswap .ss-btns { width: 100%; }

/* phones: a finger for every target (the buttons get it from imperial.css), a little wider */
html.touch #ui #scrollswap { width: min(230px, calc((100% - 8px) / var(--wz))) !important; }
html.touch #ui #scrollswap .fp-h { height: auto; min-height: 16px; line-height: 16px; padding-top: 2px; padding-bottom: 2px; }
html.touch #ui #scrollswap .ss-kinds > .btn { min-width: calc(var(--finger) * 1.3); }
html.touch #ui #scrollswap .ss-kinds > .btn > img { width: 12px; height: 12px; }
