/*! HTML5 Boilerplate v5.0 | MIT License | http://h5bp.com/ */

html {
    color: #222;
    font-size: 1em;
    line-height: 1.4;
}

::-moz-selection {
    background: #b3d4fc;
    text-shadow: none;
}

::selection {
    background: #b3d4fc;
    text-shadow: none;
}

hr {
    display: block;
    height: 1px;
    border: 0;
    border-top: 1px solid #ccc;
    margin: 1em 0;
    padding: 0;
}

audio,
canvas,
iframe,
img,
svg,
video {
    vertical-align: middle;
}

fieldset {
    border: 0;
    margin: 0;
    padding: 0;
}

textarea {
    resize: vertical;
}

.browserupgrade {
    margin: 0.2em 0;
    background: #ccc;
    color: #000;
    padding: 0.2em 0;
}


/* ===== Initializr Styles ==================================================
   Author: Jonathan Verrecchia - verekia.com/initializr/responsive-template
   ========================================================================== */

body {
    font: 16px/26px Helvetica, Helvetica Neue, Arial;
}

.wrapper {
    width: 90%;
    margin: 0 5%;
}

/* ===================
    ALL: Orange Theme
   =================== */

.header-container {
    border-bottom: 2px solid #444;
}

.footer-container,
.main aside {
    border-top: 20px solid #444;
}

.header-container,
.footer-container,
.main aside {
    background: #333;
}

.main-container {
    background: #222;
}

.title {
    color: white;
}

/* ==============
    MOBILE: Menu
   ============== */

nav ul {
    margin: 0;
    padding: 0;
    list-style-type: none;
}

nav a {
    display: block;
    margin-bottom: 10px;
    padding: 15px 0;

    text-align: center;
    text-decoration: none;
    font-weight: bold;

    color: white;
    background: #333;
}

nav a:hover,
nav a:visited {
    color: white;
}

nav a:hover {
    text-decoration: underline;
}

/* ==============
    MOBILE: Main
   ============== */

.main {
    padding: 30px 0;
}

.main article h1 {
    font-size: 2em;
}

.main aside {
    color: white;
    padding: 0px 5% 10px;
}

.footer-container footer {
    color: white;
    padding: 20px 0;
}

/* ===============
    ALL: IE Fixes
   =============== */

.ie7 .title {
    padding-top: 20px;
}

/* ==========================================================================
   Author's custom styles
   ========================================================================== */

html {
    background-color: #333;
}

body {
    font: 16px/26px 'Open Sans', Helvetica, Helvetica Neue, Arial;
    text-align: center;
    color: white;
    min-height: 100vh;
    overflow: hidden;
    overflow-y: scroll;
    scrollbar-width: none;
}

body::-webkit-scrollbar {
    display: none;
}

.header-container {
    -webkit-user-select: none; /* Safari */        
    -moz-user-select: none; /* Firefox */
    -ms-user-select: none; /* IE10+/Edge */
    user-select: none; /* Standard */
}

.main-container {
    height: 100%;
}

.main-wrapper {
    margin: auto;
}

.title {
    display: inline-block;
    color: #444;
    text-shadow: 0px 1px 1px #666;
}

.title a,
.title a:visited {
    color: #666;
    text-decoration: none;
}

form button {
    width: 98%;
    padding: 8px 14px;
    font-weight: bold;
    font-size: 18px;
    background-color: #444;
    border: 1px solid #A5DC86;
    border-radius: 8px;
}

.material-icons {
    vertical-align: middle;
}

.soft-corners {
    border-radius: 8px;
}

footer a,
footer a:visited,
footer a:hover {
    text-decoration: none;
    color: #A5DC86;
}

footer h3 {
    color: #888;
}

/**
 * Controls Panel
 */
#bggl-ctl-tray {
    margin: 6px auto;
    width: 180px;
    display: inline-block;
}

#bggl-ctl-tray>div {
    display: inline-block;
    width: 50px;
    margin: 5px 2.5px 5px 0;
    font-weight: bold;
    font-size: 18px;
    background-color: #444;
    border-radius: 8px;
    vertical-align: middle;
    cursor: pointer;
}

#bggl-ctl-tray .material-icons {
    padding: 13px;
}

#bggl-people-count {
    position: absolute; right: 1px; top: 1px;
    color: #A5DC86;
}

/**
 * Board
 */

.board {
    width: 100%;
    height: 100%;
    margin: 0 auto;
    display: none;
}

.die {
    position: relative;
    border-radius: 8px;
    background: whitesmoke;
    color: royalblue;
    -moz-box-shadow: inset 4px 4px 2px rgba(255, 255, 255, .4), inset -3px -3px 2px rgba(0, 0, 0, .4);
    -webkit-box-shadow: inset 4px 4px 2px rgba(255, 255, 255, .4), inset -3px -3px 2px rgba(0, 0, 0, .4);
    box-shadow: inset 4px 4px 2px rgba(255, 255, 255, .4), inset -3px -3px 2px rgba(0, 0, 0, .4);
}

#board.disabled .die {
    background: rgb(211, 210, 210);
}

.die.selected {
    background: blanchedalmond;
    color: royalblue;
}

.underline {
    text-decoration: underline;
}

.letters {
    position: absolute;
    height: 90%;
    width: 90%;
    padding: 5%;
    overflow: hidden;
    font-weight: 700;
    -webkit-user-select: none; /* Safari */        
    -moz-user-select: none; /* Firefox */
    -ms-user-select: none; /* IE10+/Edge */
    user-select: none; /* Standard */
}

.r0 {
    text-shadow: 1px 2px 1px darkgray;
}

.r90 {
    text-shadow: -2px 1px 1px darkgray;
    -webkit-transform: rotate(-90deg);
    transform: rotate(-90deg);
}

.r180 {
    text-shadow: -1px -2px 1px darkgray;
    -webkit-transform: rotate(-180deg);
    transform: rotate(-180deg);
}

.r270 {
    text-shadow: 2px -1px 1px darkgray;
    -webkit-transform: rotate(-270deg);
    transform: rotate(-270deg);
}

/**
 * 4x4
 */
.four-by-four .die {
    display: inline-block;
    width: 23%;
    padding-bottom: 23%;
    margin: 0 0.5%;
}

.four-by-four .letters {
    font-size: 10vw;
    line-height: 10vw;
}

.four-by-four .r0 {
    left: 0;
    top: 20%;
}

.four-by-four .r90 {
    left: 20%;
    top: 0;
}

.four-by-four .r180 {
    left: 0;
    top: -20%;
}

.four-by-four .r270 {
    left: -20%;
    top: 0;
}

/**
 * 5x5
 */
.five-by-five .die {
    display: inline-block;
    width: 18%;
    padding-bottom: 18%;
    margin: 0 0.5%;
}

.five-by-five .letters {
    font-size: 10vw;
    line-height: 10vw;
}

.five-by-five .r0 {
    left: 0;
    top: 10%;
}

.five-by-five .r90 {
    left: 10%;
    top: 0;
}

.five-by-five .r180 {
    left: 0;
    top: -10%;
}

.five-by-five .r270 {
    left: -10%;
    top: 0;
}

/**
 * Progress bars
 */
.progress-bar {
    position: absolute;
    display: none;
}

.progress-bar .progress-inner {
    background-color: #A5DC86;
    border-radius: 2px;
}

#pbarx {
    bottom: 0px;
    left: 0px;
    height: 5px;
    width: 100%;
}

#pbarxinv {
    top: 0px;
    left: 0px;
    height: 5px;
    width: 100%;
}

#pbary {
    top: 0px;
    right: 0px;
    height: 100%;
    width: 5px;
}

#pbaryinv {
    top: 0px;
    left: 0px;
    height: 100%;
    width: 5px;
}


/**
 * Settings
 */
#settings {
    text-align: center;
}

#settings form {
    margin: auto;
    padding: none;
}

.switch-field {
    overflow: hidden;
    text-align: center;
    /* padding: 5px; */
}

.switch-field input {
    position: absolute !important;
    clip: rect(0, 0, 0, 0);
    height: 1px;
    width: 1px;
    border: 0;
    overflow: hidden;
}

.switch-field label {
    float: left;
}

.switch-field label {
    display: inline-block;
    width: 48%;
    background-color: #e4e4e4;
    color: rgba(0, 0, 0, 0.6);
    font-weight: bold;
    text-align: center;
    text-shadow: none;
    padding: 0 1%;
    -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px rgba(255, 255, 255, 0.1);
    -webkit-transition: all 0.1s ease-in-out;
    -moz-transition: all 0.1s ease-in-out;
    -ms-transition: all 0.1s ease-in-out;
    -o-transition: all 0.1s ease-in-out;
    transition: all 0.1s ease-in-out;
}

.switch-field label:hover {
    cursor: pointer;
}

.switch-field input:checked+label {
    background-color: #A5DC86;
    -webkit-box-shadow: none;
    box-shadow: none;
}

.switch-field label:nth-of-type(even) {
    border-radius: 0 4px 4px 0;
}

.switch-field label:nth-of-type(odd) {
    border-radius: 4px 0 0 4px;
}


#settings form {
    width: 90%;
    max-width: 400px;
    margin: 0 auto !important;
    font-size: min(max(4vw, 1.2rem), 1.6rem);
}

#settings button {
    display: inline-block;
    margin: 30px 0;
    padding: 1.2rem 0;
    font-size: min(max(4vw, 1.2rem), 1.6rem);
}

#settings button i.material-icons {
    padding-bottom: 2px;
}

#settings form label {
    display: block;
    padding: min(max(4vw, 1.2rem), 1.6rem) 0;
    width: 50%;
}


/**
 * Solution pane
 */
#bggl-solution {
    display: none;
    color: #222;
    background-color: #e4e4e4;
    padding: 1vmin 4vmin;
    text-align: left;
    font-family: 'Times New Roman', Times, serif;
    max-height: 80vh;
    overflow-y: scroll;
    font-size: 120%;
}

#bggl-solution>div {
    padding: 1vmin 4vmin;
}

/**
 * overlay with animation
 */
.overlay {
    -webkit-animation: fadein 0.6s; /* Safari, Chrome and Opera > 12.1 */
       -moz-animation: fadein 0.6s; /* Firefox < 16 */
        -ms-animation: fadein 0.6s; /* Internet Explorer */
         -o-animation: fadein 0.6s; /* Opera < 12.1 */
            animation: fadein 0.6s;
}

@keyframes fadein {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Firefox < 16 */
@-moz-keyframes fadein {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Safari, Chrome and Opera > 12.1 */
@-webkit-keyframes fadein {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Internet Explorer */
@-ms-keyframes fadein {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Opera < 12.1 */
@-o-keyframes fadein {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ==========================================================================
   Media Queries
   ========================================================================== */

@media only screen and (min-width: 480px) {

    /* ====================
    INTERMEDIATE: Menu
   ==================== */

    nav a {
        width: 27%;
        margin: 0 1.7%;
        padding: 25px 2%;
        margin-bottom: 0;
    }

    nav li:first-child a {
        margin-left: 0;
    }

    nav li:last-child a {
        margin-right: 0;
    }

    /* ========================
    INTERMEDIATE: IE Fixes
   ======================== */

    nav ul li {
        display: inline;
    }

    .oldie nav a {
        margin: 0 0.7%;
    }
}

@media only screen and (min-width: 768px) {

    /* ====================
    WIDE: CSS3 Effects
   ==================== */

    .header-container,
    .main aside {
        -webkit-box-shadow: 0 2px 2px #888;
        -moz-box-shadow: 0 2px 2px #888;
        box-shadow: 0 2px 2px #888;
    }

    #settings form {
        font-size: 2rem;
    }

    .four-by-four .die {
        width: 159px;
    }

    .five-by-five .die {
        width: 124px;
    }

    .four-by-four .letters {
        font-size: 77px;
        line-height: 77px;
    }
    .five-by-five .letters {
        font-size: 77px;
        line-height: 77px;
    }

    
    #board {
        width: 692px;
    }



    /* ============
    WIDE: Menu
   ============ */

    /* .title {
        float: left;
    }

    nav {
        float: right;
        width: 38%;
    } */

    /* ============
    WIDE: Main
   ============ */

    .main article {
        float: left;
        width: 57%;
    }

    .main aside {
        float: right;
        width: 28%;
    }
}

@media only screen and (min-width: 1140px) {

    /* ===============
    Maximal Width
   =============== */

    .wrapper {
        /*width: 1026px; /* 1140px - 10% for margins */
        margin: 0 auto;
    }


}

/* ==========================================================================
   Helper classes
   ========================================================================== */

.hidden {
    display: none !important;
    visibility: hidden;
}

.visuallyhidden {
    border: 0;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
}

.visuallyhidden.focusable:active,
.visuallyhidden.focusable:focus {
    clip: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    position: static;
    width: auto;
}

.invisible {
    visibility: hidden;
}

.clearfix:before,
.clearfix:after {
    content: " ";
    display: table;
}

.clearfix:after {
    clear: both;
}

.clearfix {
    *zoom: 1;
}

/* ==========================================================================
   Print styles
   ========================================================================== */

@media print {

    *,
    *:before,
    *:after {
        background: transparent !important;
        color: #000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    a,
    a:visited {
        text-decoration: underline;
    }

    a[href]:after {
        content: " ("attr(href) ")";
    }

    abbr[title]:after {
        content: " ("attr(title) ")";
    }

    a[href^="#"]:after,
    a[href^="javascript:"]:after {
        content: "";
    }

    pre,
    blockquote {
        border: 1px solid #999;
        page-break-inside: avoid;
    }

    thead {
        display: table-header-group;
    }

    tr,
    img {
        page-break-inside: avoid;
    }

    img {
        max-width: 100% !important;
    }

    p,
    h2,
    h3 {
        orphans: 3;
        widows: 3;
    }

    h2,
    h3 {
        page-break-after: avoid;
    }
}
