/* NsSession showcase: a host and a friend that use a room code */

.ns-rooms {
    margin: 0;
    padding: 20px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
}

.ns-rooms figcaption {
    margin: 0 0 12px;
    font-size: 14px;
    line-height: 150%;
    color: #989898;
}

.ns-rooms-rules {
    margin: 0 0 16px;
    font-size: 14px;
    line-height: 150%;
    color: #ffffff;
}

.ns-rooms-lines {
    margin: 0;
    padding-left: 20px;
    font-size: 14px;
    line-height: 150%;
    color: #989898;
}

.ns-rooms-lines b {
    font-family: "Overpass Mono", monospace;
    font-weight: normal;
    font-size: 12px;
    color: #ffffff;
}

/* The status log shows the lines, so the full list only reads without the script */
.ns-rooms.is-live .ns-rooms-lines {
    display: none;
}

.ns-rooms-app {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.ns-rooms-machine {
    display: grid;
    align-content: start;
    gap: 10px;
    min-width: 0;
    padding: 14px;
    border-radius: 6px;
    background: #101114;
    font-size: 14px;
    color: #ffffff;
}

.ns-rooms-title {
    margin: 0;
    font-size: 16px;
    color: #ffffff;
}

.ns-rooms-check {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 13px;
    color: #989898;
}

.ns-rooms-check input {
    margin: 0;
    accent-color: #f03a6c;
}

.ns-rooms-field {
    display: grid;
    gap: 4px;
    font-size: 13px;
    color: #989898;
}

.ns-rooms-field input,
.ns-rooms-field select {
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 7px 9px;
    border: 1px solid #333333;
    border-radius: 6px;
    background: #15161a;
    color: #ffffff;
    font-size: 14px;
    accent-color: #f03a6c;
}

.ns-rooms-field input {
    font-family: "Overpass Mono", monospace;
    letter-spacing: 0.1em;
}

.ns-rooms-field input[aria-invalid="true"] {
    border-color: #f03a6c;
}

.ns-rooms-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ns-rooms-machine button {
    padding: 8px 12px;
    border: 1px solid #f03a6c;
    border-radius: 6px;
    background: transparent;
    color: #ffffff;
    font: inherit;
    font-size: 14px;
    cursor: pointer;
}

.ns-rooms-machine button:hover:not(:disabled) {
    background: #190d0f;
}

.ns-rooms-machine button:disabled {
    border-color: #333333;
    color: #666666;
    cursor: default;
}

.ns-rooms-machine .ns-rooms-give {
    justify-self: start;
    border-color: #333333;
    font-size: 13px;
}

.ns-rooms-code {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ns-rooms-slot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 40px;
    border: 1px solid #333333;
    border-radius: 6px;
    font-family: "Overpass Mono", monospace;
    font-size: 20px;
    color: #ffffff;
}

.ns-rooms-code.is-open .ns-rooms-slot {
    border-color: #f03a6c;
}

.ns-rooms-typed .ns-rooms-slot {
    width: 26px;
    height: 30px;
    font-size: 15px;
}

.ns-rooms-slot.is-bad,
.ns-rooms-slot.is-extra {
    border-color: #f03a6c;
    color: #f03a6c;
}

.ns-rooms-hint,
.ns-rooms-state {
    margin: 0;
    font-size: 13px;
    line-height: 150%;
    color: #989898;
}

.ns-rooms-hint.is-ok {
    color: #ffffff;
}

.ns-rooms-log {
    display: grid;
    gap: 4px;
    margin: 0;
    padding: 10px 0 0;
    border-top: 1px solid #222222;
    list-style: none;
    font-size: 13px;
    line-height: 145%;
}

.ns-rooms-log:empty {
    display: none;
}

.ns-rooms-log li {
    overflow-wrap: anywhere;
    color: #ffffff;
}

.ns-rooms-log li code {
    margin-right: 4px;
    padding: 0;
    background: none;
    font-family: "Overpass Mono", monospace;
    font-size: 11px;
    color: #666666;
}

.ns-rooms-log li.is-failed {
    color: #f03a6c;
}

.ns-rooms-log li.is-note {
    color: #666666;
}

.ns-rooms-machine button:focus-visible,
.ns-rooms-field input:focus-visible,
.ns-rooms-field select:focus-visible,
.ns-rooms-check input:focus-visible {
    outline: 2px solid #f03a6c;
    outline-offset: 2px;
}

@media (max-width: 760px) {
    .ns-rooms {
        padding: 12px;
    }
}

@media (max-width: 600px) {
    .ns-rooms-app {
        grid-template-columns: minmax(0, 1fr);
    }
}
