/**
 * grrd's Dice
 * Copyright (c) 2015 Gerard Tyedmers, grrd@gmx.net
 * @license MPL-2.0
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at https://mozilla.org/MPL/2.0/.
 */

html {
    height: 100%;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

body {
    background: linear-gradient(#444, #222);
    min-width: 100vw;
    margin: 0;
    position:fixed;
    overflow:hidden;
    font-family: Arial, sans-serif;
    font-size: large;
    color: white;
    text-shadow: 1px 1px 2px #000;
}

.page {
    width: 100vw;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(#444, #222);
}

fieldset {
    padding: 0;
    margin: 0;
    border: none;
    display: grid;
}

.content {
    margin: 5px;
}

#iGame {
    transform: translateX(100vw);
    visibility: hidden;
    opacity: 0;
}

.swipe-in {
    animation-name: swipe-in;
    animation-fill-mode: forwards;
    animation-duration: 0.7s;
}

@keyframes swipe-in {
    0% {
        transform: translateX(100vw);
        visibility: hidden;
        opacity: 0;
    }
    1% {
        transform: translateX(100vw);
        visibility: visible;
        opacity: 1;
    }
    100% {
        transform: translateX(0);
        visibility: visible;
        opacity: 1;
    }
}

.swipe-out {
    animation-name: swipe-out;
    animation-fill-mode: forwards;
    animation-duration: 0.7s;
}

@keyframes swipe-out {
    0% {
        transform: translateX(0);
        visibility: visible;
        opacity: 1;
    }
    99% {
        transform: translateX(-100vw);
        visibility: visible;
        opacity: 1;
    }
    100% {
        transform: translateX(-100vw);
        visibility: hidden;
        opacity: 0;
    }
}
.swipe-in-left {
    animation-name: swipe-in-left;
    animation-fill-mode: forwards;
    animation-duration: 0.7s;
}

@keyframes swipe-in-left {
    0% {
        transform: translateX(0);
        visibility: visible;
        opacity: 1;
    }
    99% {
        transform: translateX(100vw);
        visibility: visible;
        opacity: 1;
    }
    100% {
        transform: translateX(100vw);
        visibility: hidden;
        opacity: 0;
    }
}

.swipe-out-right {
    animation-name: swipe-out-right;
    animation-fill-mode: forwards;
    animation-duration: 0.7s;
}

@keyframes swipe-out-right {
    0% {
        transform: translateX(-100vw);
        visibility: hidden;
        opacity: 0;
    }
    1% {
        transform: translateX(-100vw);
        visibility: visible;
        opacity: 1;
    }
    100% {
        transform: translateX(0);
        visibility: visible;
        opacity: 1;
    }
}

.swipe-in-bottom {
    animation-name: swipe-in-bottom;
    animation-fill-mode: forwards;
    animation-duration: 0.7s;
}

@keyframes swipe-in-bottom {
    0% {
        transform: translateY(100vh);
        visibility: hidden;
        opacity: 0;
    }
    1% {
        transform: translateY(100vh);
        visibility: visible;
        opacity: 1;
    }
    100% {
        transform: translateY(0);
        visibility: visible;
        opacity: 1;
    }
}

.swipe-out-bottom {
    animation-name: swipe-out-bottom;
    animation-fill-mode: forwards;
    animation-duration: 3s;
}

@keyframes swipe-out-bottom {
    0% {
        transform: translateY(0);
        visibility: visible;
        opacity: 1;
    }
    99% {
        transform: translateY(100vw);
        visibility: visible;
        opacity: 1;
    }
    100% {
        transform: translateY(100vw);
        visibility: hidden;
        opacity: 0;
    }
}

.out-bottom {
    transform: translateY(100vw);
    visibility: hidden;
    opacity: 0;
}
.list-button, .mini-button, .close-button {
    border:  1px transparent;
    background-image: linear-gradient(#444,#2d2d2d), linear-gradient(#999, #444 10px, #111 100%);
    background-origin: border-box;
    background-clip: content-box, border-box;
    cursor: pointer;
}
.list-button {
    display: inline-block;
    flex-grow: 1;
    text-align: center;
    padding: 1px 0 1px 0;
    margin-left: 1px;
}
.list-button:first-child, .mini-buttonlist > .mini-button:first-child {
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
    padding: 1px 0 1px 1px;
    margin-left: 0;
}
.list-button:last-child, .mini-buttonlist > .mini-button:last-child {
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
    padding: 1px 1px 1px 0;
    margin-left: 1px;
}
.mini-button, .close-button {
    padding: 1px;
}
nav, .mini-buttonlist {
    margin: 5px 5px 10px 5px;
    background-color: #111;
    display: flex;
}
nav, .mini-buttonlist, .close-button, .xs {
    border-radius: 10px;
    box-shadow: 0 0 0.5vmin 2px #111;
}
#grp_col {
    margin: 0;
}
.bottom {
    position: absolute;
    bottom: 0;
    width: calc(100% - 10px);
}
.list-button:hover, .mini-button:hover, .close-button:hover, .list-button:focus, .mini-button:focus, .close-button:focus {
    background-image: linear-gradient(#555555, #383838), linear-gradient(#ccc, #555 10px, #222 100%);
}
.list-button:active, .mini-button:active, .close-button:active {
    background-image: linear-gradient(#202020, #2c2c2c), linear-gradient(#222, #111 calc(100% - 10px), #aaa 100%);
}
.selected {
    background-image: linear-gradient(#ff0142, #830110), linear-gradient(#ffbabc, #e33a33 12px, #55010a 100%);
}
.mini-button:active > img, .list-button:active > img {
    margin-top: 7px;
    margin-bottom: 3px;
}
.mini-button:active > .bttxt {
    margin-top: 12px;
    margin-bottom: 8px;
}
.button-img {
    margin: 5px 10px 5px 10px;
    vertical-align: middle;
    pointer-events: none;
    border-radius: 20%;
}
.list-img {
    border-radius: 20%;
}
.popup {
    display: block;
    left: 0;
    right: 0;
    margin: auto;
    border:  1px transparent;
    border-radius: 15px;
    box-shadow: 3px 3px 3vmin 3px #000;
    background-image: linear-gradient(#333, #444 35%, #222 100%), linear-gradient(#bbb, #444 10%, #111 100%);
    background-origin: border-box;
    background-clip: content-box, border-box;
    padding: 2px;
    width: 400px;
    max-width: calc(100vw - 40px);
}
.popup-mini {
    width: 300px;
    min-height: 80px;
    box-shadow: 2px 2px 2vmin 2px #000;
    max-width: calc(100vw - 40px);
    margin-top: calc(50vh - 40px);
}
.popup-init {
    visibility: hidden;
    opacity: 0;
}
.popup-show {
    animation: 1s fadeIn;
    animation-fill-mode: forwards;
}
.popup-show > div:first-child {
    animation: 1s zoomIn;
    animation-fill-mode: forwards;
}
.popup-hide {
    animation: 1s fadeOut;
    animation-fill-mode: forwards;
}
.popup-hide > div:first-child {
    animation: 1s zoomOut;
    animation-fill-mode: forwards;
}
@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        visibility: visible;
        opacity: 1;
    }
}
@keyframes zoomIn {
    0% {
        transform: scale(0.75);
    }
    100% {
        transform: scale(1);
    }
}
@keyframes fadeOut {
    0% {
        opacity: 1;
    }
    100% {
        visibility: hidden;
        opacity: 0;
    }
}
@keyframes zoomOut {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(0.75);
    }
}
.popup-head {
    height: 50px;
    margin: 10px;
}
.popup-body {
    margin: 20px;
}
.popup-content {
    margin-bottom: 20px;
}
.popup-footer {
    height: 50px;
    margin: 20px;
}
#iPopupScore {
    position:absolute;
    top: 123px;
}
.popup-title1 {
    width:calc(46% - 15px);
    margin-left: 10px;
    margin-bottom:20px;
}
.popup-title2 {
    width:calc(31% - 10px);
    margin:0 10px 20px 10px;
}
.popup-title3 {
    margin-bottom:15px;
    width:calc(20% - 15px);
}
.popup-title-mini {
    float: left;
    margin: 10px 20px 0 20px;
    width: 20%;
}
.overflow {
    display: block;
    position:absolute;
    top: 0;
    left: 0;
    right: 0;
    margin: 0 auto 0 auto;
    padding-top: 20px;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
}
@supports (-webkit-overflow-scrolling: touch) {
    .overflow {
        overflow-y: scroll;
        -webkit-overflow-scrolling: touch;
    }
}
@supports not (-webkit-overflow-scrolling: touch) {
    .overflow {
        overflow-y: auto;
    }
}
.buffer {
    height: 40px;
}
button {
    color: white;
    font-size: 0;
}

button > span {
    font-size: large;
    display: block;
}
button:focus {
    outline: none;
}
.button {
    float: right;
    border:  1px transparent;
    border-radius: 10px;
    box-shadow: 0 0 0.5vmin 2px #000;
    text-shadow: 1px 1px 2px #500000;
    background-image: linear-gradient(#ff0142, #830110), linear-gradient(#ffbabc, #e33a33 12px, #55010a 100%);
    background-origin: border-box;
    background-clip: content-box, border-box;
    padding: 1px;
    height: 42px;
    width: 102px;
    cursor: pointer;
    text-align: center;
    font-weight: bold;
}
.button:hover, .selected:hover, .button:focus, .selected:focus {
    background-image: linear-gradient(#ff2162, #931120), linear-gradient(#ffcacc, #f34a43 12px, #65111a 100%);
}
.button:active, .selected:active {
    background-image: linear-gradient(#830110, #de0139), linear-gradient(#55010a, #e33a33 calc(100% - 12px), #ffbabc 100%);;
}
.button:active > .button-span {
    margin-top: 5px;
}
.button-span > img {
    margin-bottom: -3px;
}
.mini-button {
    width: 60px;
    height: 42px;
    padding: 1px 0 1px 0;
    display: inline-block;
}
.mini-buttonlist {
    height: 42px;
}
.mini-img {
    margin: 5px 15px 5px 15px;
    max-height: calc(100% - 10px);
}
.xs {
    width: 40px;
}
.right {
    display: flex;
    justify-content: flex-end
}
.top-right {
    position: absolute;
    top: 10px;
    right: 10px;
}
.top-left {
    position: absolute;
    top: 10px;
    left: 10px;
}
.close-button {
    border-radius: 25px;
    width: 25px;
    height: 25px;
    margin: 5px;
}
.close-popup {
    float: right;
    margin-top: -7px;
    margin-right: -7px;
}
.close-button-list {
    left: 10px;
}
.close-button img {
    margin: 2px;
}
.text-img {
    height: 20px;
    margin-top: 3px;
    margin-bottom: -3px;
}
.help {
    cursor: pointer;
}
#lb_helptit {
    font-weight: bold;
}

/* unvisited link */
a:link {
    color: #ee1149;
    font-weight: bold;
}
a:visited {
    color: #de0139;
}
a:hover, a:focus {
    color: #ff2162;
    outline: none;
}
a:active {
    color: #ff2162;
}
.w16 {
    width: 16%;
}
.w60 {
    width: 60px;
}
.w25 {
    width: calc(25% - 4px);
}
table {
    border-collapse: collapse;
    width: 100%;
}
#tLinks tr {
    height: 65px;
}
.abs {position: absolute; pointer-events: none;}
.txt_bottom {margin: 20px; bottom: 0;}
.r0 {right: 0;}
.help {width: 100%}
tr.lineup > td {border-top: medium solid #fff;padding-top: 5px;}
div.score {text-align: right; float: right;}
td.score {text-align: right;}
td.bold {font-weight: bold;}
.bttxt {text-align: right; margin: 10px; pointer-events: none;}
.shadow {
    filter: drop-shadow( 2px 2px 2px #111);
}

.red {background-color: #CC002F;}
.blue {background-color: #6666FF;}
.yellow {background-color: #FFA319;}
.green {background-color: #449977;}
.white {background-color: #BBBBBB;}

@media (orientation: landscape) {
    #img_title {
        width:calc(46% - 15px);
        margin-bottom:20px;
        margin-left: 10px;
    }
    #img_title2 {
        width:calc(31% - 10px);
        margin-top:20px;margin-bottom:23px;
        margin-left:30px;
    }
    #img_title3q {width:calc(22% - 40px); margin-left: 20px;}
    #img_title3h {display: none;}
    .list-button > span {
        margin-top: 10vh;
        margin-bottom: 10vh;
        pointer-events: none;
    }
    .list-button:active > div {
        margin-top: calc(10vh + 2px);
        margin-bottom: calc(10vh - 2px);
    }
    .button-img {
        max-height: calc(40vh - 47px - 5.5vw);
    }
    .lock {height: 20vh; width: 20vh;}

    #img_lock0 {
        top: calc(50vh - 29vh);
        left: calc(50vw + 28vh);
    }
    #img_lock1 {
        top: calc(50vh + 9vh);
        left: calc(50vw + 28vh);
    }
    #img_lock2 {
        top: calc(50vh - 10vh);
        left: calc(50vw - 10vh);
    }
    #img_lock3 {
        top: calc(50vh - 29vh);
        left: calc(50vw - 48vh);
    }
    #img_lock4 {
        top: calc(50vh + 9vh);
        left: calc(50vw - 48vh);
    }
}

@media (orientation: portrait) {
    #img_title {
        width:100%;
        margin-top:-10px;
    }
    #img_title2 {
        width:100%;
        margin-top:-20px;
    }
    #img_title3q {display: none;}
    #img_title3h {display: block; margin: 40px auto 0 auto; width: 55%;}
    .list-button > span {
        margin-top: 20px;
        margin-bottom: 20px;
        pointer-events: none;
    }
    .list-button:active > div {
        margin-top: 22px;
        margin-bottom: 18px;
    }
    .button-img {
        max-height: calc(23vh - 47px - 5.5vw);
    }
    .lock {height: 15vh; width: 15vh;}
    #img_lock0 {
        top: calc(50vh - 34vh);
        left: calc(50vw + 6vh);
    }
    #img_lock1 {
        top: calc(50vh + 19vh);
        left: calc(50vw + 6vh);
    }
    #img_lock2 {
        top: calc(50vh - 7.5vh);
        left: calc(50vw - 7.5vh);
    }
    #img_lock3 {
        top: calc(50vh - 34vh);
        left: calc(50vw - 21vh);
    }
    #img_lock4 {
        top: calc(50vh + 19vh);
        left: calc(50vw - 21vh);
    }
}


/* Toggle-Button */
.tgl {
    opacity: 0;
    position: absolute;
}
.tgl, .tgl:after, .tgl:before, .tgl *, .tgl *:after, .tgl *:before, .tgl + .tgl-btn {
    box-sizing: border-box;
}
.tgl::-moz-selection, .tgl:after::-moz-selection, .tgl:before::-moz-selection, .tgl *::-moz-selection, .tgl *:after::-moz-selection, .tgl *:before::-moz-selection, .tgl + .tgl-btn::-moz-selection {
    background: none;
}
.tgl::selection, .tgl:after::selection, .tgl:before::selection, .tgl *::selection, .tgl *:after::selection, .tgl *:before::selection, .tgl + .tgl-btn::selection {
    background: none;
}
.tgl + .tgl-btn {
    outline: 0;
    display: block;
    width: 4em;
    height: 2em;
    position: relative;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
.tgl + .tgl-btn:after, .tgl + .tgl-btn:before {
    position: relative;
    display: block;
    content: "";
    width: 50%;
    height: 100%;
}
.tgl + .tgl-btn:after {
    left: 0;
}
.tgl + .tgl-btn:before {
    display: none;
}
.tgl:checked + .tgl-btn:after {
    left: 50%;
}
/* Skewed */
.tgl-skewed + .tgl-btn {
    overflow: hidden;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transition: all .2s ease;
    font-family: sans-serif;
    background: linear-gradient(#999, #555), linear-gradient(#ccc, #555 10px, #222 100%);

    border:  1px transparent;
    border-radius: 10px;
    box-shadow: 0 0 0.5vmin 2px #000;
    background-origin: border-box;
    background-clip: content-box, border-box;
    padding: 1px;
}
.tgl-skewed + .tgl-btn:after, .tgl-skewed + .tgl-btn:before {
    display: inline-block;
    transition: all .2s ease;
    width: 100%;
    text-align: center;
    position: absolute;
    line-height: 2em;
    font-weight: bold;
    color: #fff;
    text-shadow: 1px 1px 2px #500000;
}
.tgl-skewed + .tgl-btn:after {
    left: 100%;
    content: attr(data-tg-on);
}
.tgl-skewed + .tgl-btn:before {
    left: 0;
    content: attr(data-tg-off);
}
.tgl-skewed + .tgl-btn:active {
    background: linear-gradient(#999, #555), linear-gradient(#ccc, #555 10px, #222 100%);
}
.tgl-skewed + .tgl-btn:active:before {
    left: -10%;
}
.tgl-skewed:checked + .tgl-btn {
    background: linear-gradient(#ff0142, #830110), linear-gradient(#fff, #e33a33 50%, #55010a 100%);
}
.tgl-skewed:checked + .tgl-btn:before {
    left: -100%;
}
.tgl-skewed:checked + .tgl-btn:after {
    left: 0;
}
.tgl-skewed:checked + .tgl-btn:active:after {
    left: 10%;
}
.tgl-skewed:checked:hover + .tgl-btn, .tgl-skewed:checked:focus + .tgl-btn {
    background-image: linear-gradient(#ff2162, #931120), linear-gradient(#ffcacc, #f34a43 12px, #65111a 100%);;
}
.tgl-skewed:not(:checked):hover + .tgl-btn, .tgl-skewed:not(:checked):focus + .tgl-btn {
    background: linear-gradient(#bbb, #666),
    linear-gradient(#ddd, #666 10px, #333 100%);
}

