/* The server list of the Online part (ui/servers.js) and the name editor of the first view (ui/gametext.js). */
/* the public servers: one row a server, five columns; on a phone the name has a line of its own. On a desktop the
   Online part takes the whole width (the key hints give way) and the list most of the height. */
#slist { grid-column: 1 / -1; display: grid; gap: 8px; min-width: 0; } #slist[hidden] { display: none; }
#slist-bar { gap: 6px 12px; } #slist-bar #slist-find { flex: 1 1 12em; min-width: 0; max-width: 26em; }
#slist-modes { display: flex; flex-wrap: wrap; gap: 6px; } #slist-modes:empty { display: none; }
#slist-modes button { font: inherit; font-size: 12px; padding: 3px 9px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--hue, var(--line)) 55%, transparent); background: color-mix(in srgb, var(--hue, transparent) 12%, transparent); color: var(--cloud); cursor: pointer; }
#slist-modes button small { color: var(--haze); margin-left: .45em; } #slist-modes button.is-current { background: color-mix(in srgb, var(--hue, var(--limb)) 38%, transparent); border-color: var(--hue, var(--limb)); }
#slist-head, #slist-rows > button { display: grid; grid-template-columns: minmax(0, 1fr) 9em 4.6em 5.4em 4.4em; gap: 0 12px; align-items: center; padding: 6px 12px; text-align: left; }
#slist-head { padding-block: 0; } #slist-head button { font: inherit; font-size: 12px; text-align: inherit; color: var(--haze); background: none; border: 0; padding: 2px 0; cursor: pointer; } #slist-head button:hover { color: var(--cloud); }
#slist-head button[aria-sort]::after { content: " ▾"; color: var(--limb); } #slist-head button[aria-sort=ascending]::after { content: " ▴"; }
#slist-head > :nth-child(n+4), #slist-rows > button > :nth-child(n+4) { text-align: right; font-variant-numeric: tabular-nums; }
#slist-rows { display: grid; align-content: start; max-height: min(19em, 42vh); overflow-y: auto; overscroll-behavior: contain; border: 1px solid var(--line); border-radius: 4px; background: var(--well); }
#slist-rows > button { width: 100%; font: inherit; font-size: 14px; color: var(--cloud); background: none; border: 0; border-bottom: 1px solid var(--line-soft); border-radius: 0; cursor: pointer; }
#slist-rows > button:last-child { border-bottom: 0; } #slist-rows > button:is(:hover, :focus-visible) { background: rgb(109 180 242 / .1); outline: none; }
#slist-rows > button.is-current { background: rgb(109 180 242 / .2); box-shadow: inset 0 0 0 1px var(--limb); }
#slist-rows > button > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } #slist-rows > button > :nth-child(2) { color: var(--haze); font-size: 13px; }
#slist-rows > button:not(.has-players) > :first-child { opacity: .62; }
#slist-rows .mode { justify-self: start; padding: 1px 7px; border-radius: 3px; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: #fff; background: color-mix(in srgb, var(--hue) 42%, #0a1220); border: 1px solid color-mix(in srgb, var(--hue) 70%, transparent); }
#slist-rows .count { display: grid; gap: 3px; color: var(--haze); font-size: 13px; } #slist-rows .has-players .count { color: #fff; font-weight: 600; }
#slist-rows .count i { display: block; height: 3px; border-radius: 2px; background: rgb(255 255 255 / .09); overflow: hidden; } #slist-rows .count i b { display: block; height: 100%; width: var(--fill); background: var(--limb); } #slist-rows .count.full i b { background: #f0a53a; }
#slist-rows .ping { font-size: 13px; color: var(--good); } #slist-rows .ping.mid { color: #e6c35c; } #slist-rows .ping.far { color: #e8836f; }
#slist-rows > p { margin: 0; padding: 12px; color: var(--haze); font-size: 13px; }
@media (min-width: 861px) and (pointer: fine) {
	/* one column: the address field, the list and the button all start at the same edge */
	#loader[data-view=online] #setup .view[data-view=online] { grid-template-columns: minmax(0, 1fr); } #setup .view[data-view=online] > #slist { margin-top: 12px; } #setup .view[data-view=online] #opt-server { max-width: 26em; }
	#slist-head, #slist-rows > button { grid-template-columns: minmax(0, 1fr) minmax(8em, 15em) 6em 7em 5em; gap: 0 18px; padding: 9px 16px; } #slist-head { padding-block: 0; }
	#slist-rows { max-height: max(15em, calc(100vh - 31em)); } #slist-rows > button { font-size: 16px; } #slist-rows > button > :nth-child(2) { font-size: 14px; } #slist-rows .mode { font-size: 12px; padding: 2px 9px; } #slist-rows .count, #slist-rows .ping { font-size: 14px; }
}
@media (max-width: 560px) { #slist-head { display: none; } #slist-rows > button { grid-template-columns: minmax(0, 1fr) auto auto auto; padding: 8px 10px; } #slist-rows > button > :first-child { grid-column: 1 / -1; } #slist-rows .count i { display: none; } }

/* the name, dressed up: what it will look like, colours to put in, the game's symbols */
#setup .view:has(#name-fancy[open]) #opt-name { max-width: 30em; font-family: var(--mono); }
#name-fancy { max-width: 30em; } #name-fancy summary { cursor: pointer; color: var(--limb); font-size: 13px; padding: 4px 0; width: max-content; } #name-fancy summary:hover { color: #fff; }
#name-fancy[open] { display: grid; gap: 8px; padding: 2px 0 6px; }
#name-preview { padding: 10px 14px; font-size: 22px; font-weight: 700; border: 1px solid var(--line-soft); border-radius: 4px; background: rgb(3 6 13 / .78); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-height: 1.3em; } #name-preview.is-empty { color: var(--haze); font-size: 14px; font-weight: 400; }
.old-letters { color: #e8b84a; font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 700; text-shadow: 0 1px 0 #5a3a00; }
#name-colours { gap: 6px; } #name-colours .swatch { width: 26px; height: 26px; padding: 0; border-radius: 50%; border: 1px solid rgb(255 255 255 / .35); } #name-colours .swatch:hover { transform: scale(1.12); }
#name-colours input[type=color] { width: 30px; height: 28px; padding: 0; border: 1px solid var(--line); border-radius: 3px; background: none; } #name-colours button:not(.swatch) { padding: 4px 10px; font-size: 13px; } #name-colours label.pick { font-size: 13px; margin-left: 6px; }
.name-keys { display: grid; grid-template-columns: repeat(auto-fill, minmax(30px, 1fr)); gap: 3px; } .name-keys button { padding: 0; height: 30px; font-size: 16px; line-height: 1; }
@media (pointer: coarse) { .name-keys { grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); } .name-keys button { height: 40px; } #name-colours .swatch { width: 36px; height: 36px; } }
/* the name field wears the name in the game's colours until the cursor is in it */
.name-box { position: relative; display: block; width: 100%; max-width: 17em; } #setup .view:has(#name-fancy[open]) .name-box { max-width: 30em; } .name-box > input { max-width: none !important; }
.name-worn { display: none; position: absolute; inset: 1px; padding: 0 10px; align-items: center; gap: 0; white-space: pre; overflow: hidden; pointer-events: none; font-weight: 700; }
.name-box.is-worn:not(:focus-within) > input { color: transparent; } .name-box.is-worn:not(:focus-within) > .name-worn { display: flex; }
@media (max-width: 560px) { .name-box { max-width: none; } }
/* a row's star, and under the chosen row who is playing there */
#slist-rows .star { display: inline-block; width: 1.5em; margin-left: -.2em; text-align: center; color: var(--haze); opacity: .55; } #slist-rows button:is(:hover, .is-current) .star, #slist-rows .star.is-on { opacity: 1; } #slist-rows .star.is-on { color: #ffd76a; } #slist-rows .star:hover { color: #fff; }
#slist-rows .who { padding: 8px 16px 12px 2.9em; font-size: 13px; color: var(--haze); border-bottom: 1px solid var(--line-soft); background: rgb(109 180 242 / .06); }
#slist-rows .who ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(17em, 1fr)); gap: 3px 28px; }
#slist-rows .who li { display: grid; grid-template-columns: minmax(0, 1fr) 4em 4.5em; gap: 8px; color: var(--cloud); } #slist-rows .who li > :first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } #slist-rows .who li > :not(:first-child) { text-align: right; color: var(--haze); font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { #slist-rows .who { padding-left: 10px; } }
