﻿form
{
    margin: auto 0 auto 0;
    padding: 25px 0 0 0;
    border: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    justify-content: center;
    position: relative;
}

button,
select 
{ /* 1 */
    text-transform: none;
    font-family: inherit;
    font-size: 100%;
    line-height: 1.15;
    margin: 0;
}

/**
 * Correct the inability to style clickable types in iOS and Safari.
 */

button,
[type="button"],
[type="reset"],
[type="submit"] {
    -webkit-appearance: button;
}

#titlebar
{
    height: 1.45em;
    display: inline;
    background-color: rgba(255,255,255, 0.90);
       box-shadow: 0 1px 5px;
    text-align: center;
    font-size: 1.2em;
    padding-top: 2px;
    padding-bottom: 0px;
    margin-bottom: 1px;
    position: relative;
}

.table
{
    display: flex;
    flex-flow: row wrap;
    width: 99vw;
    flex: 1 4 360px;
    margin: 2px 0;
    align-content: center;
    justify-content: center;
}

.colgroup
{
    flex: 0 0 280px;
    width: 280px;
    display: inline;
    height: 10.6em;
    padding: 5px 5px 7px 15px;
    background-color: rgba(255,255,255, 0.90);
    border-radius: 3px;
    border: 2px groove rgba(255,255,255, 0.60);
}

#controls
{
    padding: 6px 8px;
    flex: 0 0 40px;
    display: flex;
    flex-flow: column nowrap;
    justify-content: space-around;
    align-items: center;
    text-align: center;
}

.header span:first-child, .row span:first-child
{
    width: 160px;
    display: inline-block;
}

.header span:nth-child(2), .row span:nth-child(2)
{
    width: 50px;
    display: inline-block;
}

.ctrl
{
    height: 24px;
    margin: 0 3px;
    padding: 0 1px;
    border: none;
    width: 26px;
}

.control
{
    width: 24px;
    height: 26px;
}

#menubtn
{
    float: left;
}

#restart
{
    float: right;
}

.row, .header
{
    width: 260px;
    padding: 0;
    margin: 0;
    display: inline;
    border: 1px solid rgba(255,255,255,0);
    text-decoration: none;
    text-align: left;
    font-size: 0.9em;
    height: 1.3em;
    background-color: rgba(255,255,255,0);
    font-family: sans-serif;
}

.row:hover
{
    border: 1px solid rgba(66,125,198,0.8);
    background-color: rgba(66,125,198,0.3)
}

#cards
{
    /*IE11 card spacing fix*/
    flex: 2 1 35vmin;
    width: 100vw;
    display: flex;
    flex-direction: row;
    margin-left: -3px;
    justify-content: space-around;
    align-items: center;
    margin-bottom: 70px;
}


.dice
{
    width: 18vw;
    max-width: 20vmin;
    max-height: 20vmin;
    height: 18vw;
    border: 3px solid black;
    border-radius: 14px;
    padding:0;
    display:inline;
    vertical-align: middle;
    pointer-events: none; /*IE11 fix for no click passthrough*/
}

.dieholder
{
    width: 18vw;
    max-width: 20vmin;
    max-height: 24vmin;
    height: 24vw;
    padding: 0;
    display: block;
    vertical-align: middle;
    text-align: center;
}

input[type="checkbox"] + label::before
{
    margin-bottom: 1px;
    display: inline-block;
    border-radius: 3px;
    border: 2px groove white;
    padding: 0;
    height: 1.3em;
    background-color: rgba(255,255,255, 0.90);
    width: 100%;
    margin-left: 2px;
    content: "Hold";
}

input[type="checkbox"]:checked + label::before
{
    content: "Holding";
    border-radius: 3px;
    border: 2px inset white;
    background-color: lightgray;
}

.output
{
    padding: 0;
    margin: 0;
    height: 1em;
}

@media only screen and (max-width: 690px)
{
    .holdbutton
    {
        margin-left: 2px;
    }

    /*#controls
    {
        padding: 3px 5px 7px 15px;
        flex: 0 0 280px;
        height: 40px;
        flex-flow: row nowrap;
    }*/
    .upper-table .header span:first-child, 
    .upper-table .row span:first-child
    {
        margin-left: 4px;
        width: 65px;
    }

    .upper-table
    {
        flex: 0 0 200px;
    }
    .lower-table
    {
        flex: 0 0 260px;
    }
}

@media only screen and (max-width: 618px) and (max-height: 800px) and (min-width: 490px)
{

    .upper-table .header span:first-child, 
    .upper-table .row span:first-child
    {
        width: 130px;
        display: inline-block;
    }
    .header span:first-child, .row span:first-child
    {
        width: 130px;
        display: inline-block;
    }

    .scoreheader
    {
        margin-left: -40px;
    }

    .header span:nth-child(2), .row span:nth-child(2)
    {
        display: none;
    }

    .colgroup
    {
        flex: 0 0 195px;
    }
    
    .upper-table
    {
        flex: 0 0 175px;
    }

    #controls
    {
        height: 10.5em;
        padding: 6px 8px;
        flex: 0 0 40px;
        display: flex;
        flex-flow: column nowrap;
        justify-content: space-around;
    }
}

@media only screen and (max-width: 490px) and (max-height: 640px)
{
    #controls
    {
        padding: 3px 5px 7px 15px;
        flex: 0 0 280px;
        height: 40px;
        flex-flow: row nowrap;
    }
    .upper-table .header span:first-child, 
    .upper-table .row span:first-child
    {
        margin-left: 4px;
        width: 60px;
        display: inline-block;
    }

    .lower-table .header span:first-child, 
    .lower-table .row span:first-child
    {
        margin-left: 4px;
        width: 127px;
        display: inline-block;
    }

    .scoreheader
    {
        margin-left: -3px;
    }

    .diceroll
    {
        display: inline;
    }

    .header span:nth-child(2), 
    .row span:nth-child(2)
    {
        display: none;
    }

    .colgroup
    {
        padding: 3px 2px 3px 2px;
    }

    .upper-table
    {
        flex: 0 0 125px;
    }

    .lower-table
    {
        flex: 0 0 160px;
    }
}

.blockbutton
{
    opacity: 0.4;
}

input[type="radio"]:checked+label 
{
    border: 1px solid rgba(66,125,198,1);
    background-color: rgba(66,125,198,0.4);
}

input[type="radio"]:focus+label
{
    border: 1px solid rgba(66,125,198,0.6);
    background-color: rgba(66,125,198,0.3);
}

input[type="checkbox"]:focus+label img
{
    border: 3px solid rgba(66,125,198,0.6);
    background-color: rgba(66,125,198,0.8);
}

.invis
{
    position: absolute;
    display: inline;
    margin: 0;
    margin-left: -10px;
    margin-right: 6px;
    padding: 0;
    border: none;
    width: 0;
    height: 0;
    opacity: 0;
}

/*menu section*/

@keyframes menuopen
{
    from { top: -100vh;    }
    to { top: 0; }
}

@keyframes menuclose
{
    from { top: 0; }
    to { top: -100vh; }
}

#menu
{
    position: absolute;
    width: 100vw;
    height: 100vh;
    top: -100vh;
    left: 0;
    z-index: 1;
    background-color: black;
}

.openmenu
{
    display: inline;
    top: 0vh;
    animation-name: menuopen;
    animation-duration: 0.75s;
    animation-fill-mode: forwards;
}

.closemenu
{
    display: inline;
    top: -100vh;
    animation-name: menuclose;
    animation-duration: 0.75s;
    animation-fill-mode: forwards;
}

.menurow, .menuheader
{
    background-color: black;
    border-bottom: 1px white solid;
    width: 90vw;
    text-align: center;
    margin-left: 5vw;
    font-size: 5vh;
    color: white;
    padding-top: 1.75vh;
    padding-bottom: 1.75vh;
    border-width: 0 0 1px 0;
    border-radius: 0;
}

#menuclose
{
    background-color: black;
    width: 90vw;
    text-align: center;
    margin-left: 5vw;
    height: 7vh;
    font-size: 3vh;
    color: white;
    padding-top: 0.5vh;
    border: none;
    border-radius: 0;
}

#menuclose:disabled
{
    display: none;
}

.menurow:hover, #menuclose:hover
{
    background-color: #111111;
}

.menuheader
{
    margin-top: 1.5vh;
}

.highscore
{
    background-color: black;
    color: white;
    border: none;
}