@import url('https://fonts.googleapis.com/css?family=Nova+Mono');
@font-face {
  font-family: 'DSEG7Classic';
  font-style: normal;
  font-weight: 400;
  src: local('DSEG7Classic Regular'), local('DSEG7Classic-Regular'),
       url('font/DSEG7Classic-Regular.woff2') format('woff2'), /* Super Modern Browsers */
       url('font/DSEG7Classic-Regular.woff') format('woff'), /* Modern Browsers */
       url('font/DSEG7Classic-Regular.ttf') format('truetype'); /* Safari, Android, iOS */
}

* { box-sizing: border-box; }
html, body, #main { height: 100%; width: 100%; }
body {
    margin: 0;
    font: 14px system-ui, Helvetica, Arial, sans-serif,
        "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    background: url(bg.jpg) center top no-repeat #7b7b7b;
}

.online-only { display: none !important; }
.icon { width: 16px; height: 16px; }

#main { position: relative; }
#main > div { position: absolute; }
#main-game { left: 20vw; top: 16px; z-index: 1; }

.minefield-wrapper {
    background-color: #bdbdbd;
    resize: both;
    overflow: auto;
    height: 45vh;
    width: 60vw;
}
.minefield {
    display: inline-block;
    font-family: 'Nova Mono', monospace;
    font-size: 14px;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    transform-origin: center center;
}
.minefield .row {
    white-space: nowrap;
    height: 1rem;
}
.minefield .tile {
    width: 1rem;
    height: 1rem;

    background: #bdbdbd;
    display: inline-block;
    line-height: 100%;
    vertical-align: top;
    text-align: center;
    /* user-select: none; */
}
.minefield .tile.closed {
    border-top: 0.125rem solid #fff;
    border-left: 0.125rem solid #fff;
    border-right: 0.125rem solid #7b7b7b;
    border-bottom: 0.125rem solid #7b7b7b;
}
.minefield .tile.open {
    border-top: 0.0625rem solid #7b7b7b;
    border-left: 0.0625rem solid #7b7b7b;
    border-right: 0.0625rem solid #bdbdbd;
    border-bottom: 0.0625rem solid #bdbdbd;
    font-weight: 600;
}
.minefield .tile.n1::before {
    content: '1';
    color: #00f;
}
.minefield .tile.n2::before {
    content: '2';
    color: #007b00;
}
.minefield .tile.n3::before {
    content: '3';
    color: #f00;
}
.minefield .tile.n4::before {
    content: '4';
    color: #00007b;
}
.minefield .tile.n5::before {
    content: '5';
    color: #7b0000;
}
.minefield .tile.n6::before {
    content: '6';
    color: #007b7b;
}
.minefield .tile.n7::before {
    content: '7';
    color: #007b7b;
}
.minefield .tile.n8::before {
    content: '8';
    color: #7b7b7b;
}
.minefield .tile.red {
    background: #f00;
}
.minefield .tile.flag::before {
    content: url(flag.svg);
    color: #f00;
}
.minefield .tile.mine::before {
    content: url(mine.svg);
}
.minefield .tile.nomine::before {
    content: url(mine_no.svg);
}

.yellow {
    line-height: 1px;
    text-align: center;
}
.yellow i { width: 32px; height: 32px; display: inline-block; }
.yellow.happy i::before { content: url(yellow_happy.svg); }
.yellow.surprise i::before { content: url(yellow_surprise.svg); }
.yellow.dead i::before { content: url(yellow_dead.svg); }
.yellow.cool i::before { content: url(yellow_cool.svg); }
.counter {
    background-color: #000;
    color: #f00;
    font: 1.3rem 'DSEG7Classic', monospace;
    text-align: center;
    line-height: 38px;
    padding: 0 4px;
    user-select: none;
}

.cursor {
    fill: currentColor;
    width: 24px;
    height: 24px;
    position: absolute;
    opacity: .6;
    top: 0;
    left: 0;
    pointer-events: none;
}

#tools {
    bottom: 0;
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: flex-end;
}
#w-room { margin: 0 4px; min-width: 250px; }
#w-list {
    flex: 1 1;
    margin: 0 auto 0 4px;
    max-width: 640px; min-width: 250px;
    max-height: 300px; min-height: 200px;
    display: flex; flex-direction: column;
}
#w-top { margin: 0 4px 0 auto; min-width: 210px; }
#recentrecordslist { min-height: unset; }

#settings, .alert { left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 2; }
#settings-container { display: flex; }
#settings-container > div { margin: 0 8px 8px 8px; }
#settings-container label { display: block; }
#settings-container header, .sc-header {
    font-variant: all-small-caps;
    font-size: 16px;
    font-weight: 700;
}

#w-room .toolbar .button {
    height: 24px; width: 24px;
    display: inline-block;
    text-align: center;
}

#w-list .container { display: flex; flex: 1 1; }
#userlist { max-height: unset; min-width: 150px; }
#log {
    max-height: unset;
    flex: 1 1;
    padding: .25rem;
    font-size: .72rem;
    font-family: monospace;
}
#chatinput {
    margin: -.25rem .25rem .25rem .25rem;
    font-family: monospace;
    font-size: .72rem;
}
#w-list .chat {
    flex: 1 1;
    display: flex;
    flex-direction: column;
}

#signin {
    text-align: center;
    display: none;
}
#signin > * { display: inline-block; margin: 4px 0; }

.data-entry {
    line-height: 15px;
    font-size: 11px;
}
.data-entry *:first-child {
    font-size: 14px;
}

.listui {
    border: inset;
    margin: .25rem;
    background-color: #fff;
    overflow: auto;
    max-height: 30vh;
    min-height: 50px;
}
.list-entry {
    margin: .25rem;
    font-size: 75%;
    user-select: none;
}
.list-entry *:not(:first-child) {
    font-size: 90%;
}
.list-entry.clickable { cursor: pointer; }
.list-entry.clickable:hover { border: blue dotted .01rem; }
.list-entry.clickable:active { background: rgba(0,0,255,0.2); }

.top-table {
    width: 100%;
    font-size: 80%;
}

.window {
    background: #bdbdbd;
    border: outset;
}
.alert div:nth-child(2) {
    text-align: center;
    padding: .5rem;
}
.window .titlebar {
    height: 20px;
    background: linear-gradient(to right, #00007b, #0884ce);
    line-height: 20px;
    color: #fff;
    font-weight: 700;
    padding: 0 2px;
    user-select: none;
    cursor: default;
}
.window .titlebar img, .window .titlebar svg {
    height: 16px; width: 16px;
    display: inline;
    margin: 2px;
    vertical-align: bottom;
    fill: currentColor;
}

.window .toolbar {
    display: flex;
    justify-content: space-between;
    line-height: 24px;
    padding: 4px;
}
.window .toolbar-bottom {
    padding: 4px;
    text-align: right;
}
.window .toolbar-bottom > a {min-width: 5rem; }
.button {
    border: outset;
    user-select: none;
    cursor: pointer;
}
.button:active { border: inset; }

