/* Main page, New game page and lobby: the colours and controls of the DSM game page (public/setup.css). */

:root {
    font-family: Inter, ui-sans-serif, system-ui, sans-serif;
    font-size: 16px;
    color: #e9f2f9;
    background: #081925;
    color-scheme: dark;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
}

button,
select,
input {
    font: inherit;
}

button {
    border: 1px solid #3b586b;
    background: #183448;
    color: #f4f8fb;
    border-radius: 8px;
    padding: 8px 14px;
    cursor: pointer;
}

button:hover {
    background: #254960;
}

button:disabled {
    opacity: .5;
    cursor: default;
}

button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible {
    outline: 3px solid #73e9d7;
    outline-offset: 3px;
}

.primary {
    background: #67d4c0;
    color: #072b2e;
    border-color: #67d4c0;
    font-weight: 700;
}

.primary:hover {
    background: #92e5d6;
}

input,
select {
    min-width: 0;
    background: #0b202e;
    border: 1px solid #486477;
    border-radius: 7px;
    padding: 9px 11px;
    color: #edf6fa;
}

a {
    color: #9bdcd6;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ---------------------------------------------------------------- frame */

.top {
    padding: 22px 3vw;
    border-bottom: 1px solid #294153;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.eyebrow {
    font-size: .75rem;
    letter-spacing: .19em;
    color: #89bbc8;
    font-weight: 700;
}

h1 {
    font-size: 1.8rem;
    margin: 4px 0 0;
}

h1 span {
    font-size: 1rem;
    font-weight: 400;
    color: #9fb7c8;
}

h2 {
    font-size: 1.2rem;
    margin: 0 0 12px;
}

main {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px 16px 48px;
}

.card {
    background: #102a3a;
    border: 1px solid #294858;
    border-radius: 14px;
    padding: 22px 24px;
    margin: 0 0 18px;
}

.muted {
    color: #9fb7c8;
}

.hint {
    font-size: .85rem;
}

.error {
    color: #ffc1b9;
    min-height: 1.4em;
    margin-top: 8px;
}

/* ---------------------------------------------------------------- main page */

.start-box {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.start-box .gamename {
    flex: 1 1 220px;
    font-size: 1.15rem;
    letter-spacing: .06em;
}

.start-box .error {
    flex-basis: 100%;
}

/* ---------------------------------------------------------------- tables */

table.list {
    width: 100%;
    border-collapse: collapse;
}

table.list th {
    text-align: left;
    font-size: .8rem;
    font-weight: 600;
    color: #89bbc8;
    padding: 4px 8px 8px;
}

table.list td {
    padding: 8px;
    border-top: 1px solid #22404f;
    vertical-align: middle;
}

table.list td.action {
    text-align: right;
    white-space: nowrap;
}

table.list tr.mine td {
    background: #15384c;
}

table.list tr.off td {
    color: #6f8a9a;
}

.animal {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: -1px;
}

.animal.crustaceans { background: #bca984; }
.animal.fishes { background: #39aee0; }
.animal.cephalopods { background: #f5aa31; }
.animal.reptiles { background: #b463d0; }

/* ---------------------------------------------------------------- forms */

fieldset {
    border: 1px solid #294858;
    border-radius: 10px;
    padding: 14px 18px;
    margin: 0 0 16px;
}

legend {
    padding: 0 6px;
    color: #89bbc8;
    font-weight: 600;
}

fieldset label {
    display: block;
    margin: 6px 0;
}

.seat-row {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 12px;
    align-items: center;
    margin: 8px 0;
}

.linkbox {
    display: flex;
    gap: 8px;
}

.linkbox input {
    flex: 1;
}

.row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

@media (max-width: 560px) {
    .seat-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}

/* ---------------------------------------------------------------- main page: the frames (names, links, keys) */

.frames {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(3, auto);
    gap: 16px;
    margin-bottom: 16px;
}

.frames .card {
    margin: 0;
}

/* the grid of HRAO.online: left New Game / Take Back Seat / Join; right Claim (Invite) / Login (Personal key) / Watch;
   the member card (and the new key) take the two upper right places; the lists hang under Join and Watch */
#f-new { grid-area: 1 / 1; }
#f-seat { grid-area: 2 / 1; }
#f-join { grid-area: 3 / 1; }
#f-claim { grid-area: 1 / 2; }
#f-login { grid-area: 2 / 2; }
#f-member { grid-area: 1 / 2 / span 2 / 2; }
#f-claim.keyed { grid-area: 1 / 2 / span 2 / 2; }
#f-watch { grid-area: 3 / 2; }
#f-forming { grid-area: 4 / 1; align-self: start; margin-top: -2px; }
#f-live { grid-area: 4 / 2; align-self: start; margin-top: -2px; }

.frame.member { text-align: center; }
.frame.member .rank { margin: 4px 0 10px; color: var(--muted, #8fa9b4); }
.frame.member .buttons { display: flex; justify-content: center; gap: 8px; }
.frame .error:empty { display: none; }

@media (max-width: 1000px) {
    .frames { grid-template-columns: 1fr; }
    .frames > .card { grid-area: auto !important; margin-top: 0 !important; }
}

.inputwrap {
    display: flex;
    gap: 8px;
}

.inputwrap input {
    flex: 1;
    letter-spacing: .06em;
}

.keybox {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin: 8px 0;
}

.keybox span,
.keycell {
    font-family: ui-monospace, Consolas, monospace;
    letter-spacing: .04em;
    word-break: break-all;
}

.member .who {
    font-size: 1.25rem;
    font-weight: 700;
}

.member .row {
    margin-top: 12px;
}

.ok {
    color: #9de8c8;
}

@media (max-width: 700px) {
    .frames {
        grid-template-columns: 1fr;
    }
}

/* ---------------------------------------------------------------- admin page */

.adminhead {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}

.inline {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 8px 14px;
}

.inline label {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: .8rem;
    color: #89bbc8;
}

.inline input[type="number"] {
    width: 6em;
}

.scroll {
    overflow-x: auto;
    margin-top: 6px;
}

table.keys input[type="text"] {
    width: 11em;
}

table.keys input.keyinput {
    width: 15em;
    font-family: ui-monospace, Consolas, monospace;
}

table.keys td,
table.keys th {
    white-space: nowrap;
}

table.keys tr.banned td {
    background: #3a2428;
}

table.keys tr.dirty td {
    background: #2f3a22;
}

.rowmsg {
    display: inline-block;
    margin-left: 10px;
    min-height: 1em;
    font-size: .8rem;
}

.newinv {
    font-family: ui-monospace, Consolas, monospace;
    line-height: 1.8;
}

main.wide {
    max-width: 1180px;
}

#inv-made {
    margin-bottom: 18px;
}

#inv-made button {
    margin-top: 8px;
}

/* the tabs of the admin page, the import messages, the choosing of rows */
.tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 10px 0; border-bottom: 1px solid #2c4a56; }
.tabs button { border-radius: 4px 4px 0 0; }
.tabs button[aria-selected="true"] { background: #2c4a56; }
.importmsg { margin-top: 6px; white-space: pre-line; min-height: 1em; }
.asklist { list-style: none; padding: 0; margin: 6px 0; }
.asklist li { margin-bottom: 6px; }
.asklist .diff { margin-left: 1.8em; font-size: .8rem; }
table.list td.action { white-space: nowrap; }
label.flag { margin-right: 8px; }
.addmember { margin-top: 10px; }
.addmember > button, #member-add { min-width: 2.4em; font-weight: bold; }
.addmember .inline { display: inline-flex; margin-left: 10px; vertical-align: middle; }

[hidden] {
    display: none !important;
}

/* names in the Ongoing Public Games list fill the Watch Game box */
b.pick { cursor: pointer; }
table.list th.c, table.list td.c { text-align: center; }
b.pick:hover { color: var(--accent, #6fd8c2); }
/* the long seat code must fit its box */
#seat { font-size: 12px; letter-spacing: 0; }
