body {
    display: flex;
    align-items: flex-end;
}

.tabs ul, .tabs li {
    list-style: none;
    font-weight: bold;
}

.bottom-buttons {
    flex-grow: 1;
    display: flex;
    justify-content: space-between;
    padding: 20px;
}

#game-list {
    display: flex;
    flex-wrap: wrap;
}

#group-games {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

#group-games .game {
    /*margin: 15px 8px;*/
    margin: 15px auto;
    width: 250px;
}

.game-list,
.appearance-modal .modal-card {
    width: 900px;
    max-width: 100%;
    border: 1px solid white;
}

.appearance-modal .tabs {
    min-height: 42px;
}

.appearance-modal .modal-card-body {
    padding-left: 0;
    padding-right: 0;
}

.tabs li:first-child {
    margin-left: 20px;
}

.modal-card-body {
    overflow-x: hidden;
}

.single-list {
    width: auto;
}

.single-list .spacer {
    visibility: hidden;
}

.single-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.single-list > div {
    width: 250px;
    background: #f6f6f6;
    padding: 3px;
    border-radius: 3px;
    text-align: center;
    font-weight: bold;
    margin: 5px;
}

#cardbacks-list > div {
    width: 150px;
}

.modal-menu .modal-card {
    width: 350px;
}

.button-group {
    margin-bottom: 20px;
}

.button-group .button {
    text-align: left;
}

.modal .button:focus {
    box-shadow: none;
    border: 1px solid rgba(221, 221, 221);
}

.button-group .button:not(:first-child, :last-child) {
    border-radius: 0;
}

.button-group .button:not(:last-child) {
    border-bottom: none;
}

.button-group .button:first-child {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.button-group .button:last-child {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

/* OPTIONS MODAL */
.control input[type=checkbox],
.control input[type=radio] {
    display: none;
}

.control {
    flex-grow: 1;
}

.control label {
    font-weight: bold;
    width: 100%;
}

input[type=checkbox].toggle {
    display: none;
}

input[type=checkbox]:checked ~ label,
input[type=radio]:checked ~ label {
    background: #8b3e38;
    color: #fff;
}

    input[type=checkbox]:checked ~ label:hover,
    input[type=radio]:checked ~ label:hover {
        /*background: #06a257;*/
        background: #4e221f;
    }

input[type='checkbox'].toggle ~ label {
    display: inline-block;
    appearance: none;
    min-width: 60px;
    height: 25px;
    background: #DCE5F2;
    box-shadow: inset 0px -2px 0px rgba(0, 0, 0, 0.12);
    position: relative;
    border-radius: 30px;
    transition: all 0.2s ease-in-out;
    outline: none;
    cursor: pointer;
    margin: 0;
}

input[type='checkbox'].toggle ~ label:after {
    content: '';
    display: inline-block;
    position: absolute;
    width: 16px;
    height: 16px;
    background:#B3C0D1;
    top: 4px;
    left: 5px;
    border-radius: 50%;
    transition: all 0.2s ease-in-out;
}

input[type='checkbox']:checked.toggle ~ label {
    background: #8b3e38;
}

input[type='checkbox']:checked.toggle ~ label:after {
    left: 37px;
    background: #FFFFFF;
}

.modal-card-head {
    cursor: move;
}

.field.is-horizontal .field-label {
    flex-grow: 6;
    text-align: left;
}

.field > label, .field-label > label {
    font-weight: normal;
}

.field.is-horizontal .field-body .field {
    display: flex;
    text-align: center;
    align-items: center;
    justify-content: flex-end;
}

.game-options-modal .modal-card {
    width: 100%;
    max-width: 490px;
}

.game-options-modal .modal-card-body {
    padding-top: 0;
}

.game-options-modal .modal-card-body > .field {
    padding: 15px 0;
    margin: 0;
    border-bottom: 1px solid #ddd;
}

.game-options-modal .modal-card-body > .field:last-child {
    border-bottom: none;
}

/* Button icons  */
.button.icon:before {
    content: "";
    width: 30px;
    height: 30px;
    display: inline-block;
    position: absolute;
    top: 50%;
    left: 12px;
    margin-top: -15px;
    background-repeat: no-repeat;
    background-position: center;
}

.button, .button:hover, .button:active {
    border: 1px solid #ddd;
}

.button.icon {
    text-align: left;
    text-indent: 32px;
    display: inline-block;
}

/* jQuery.mobile Theme */
hr {
    margin: 8px 0;
}
table p, .modal-card-body > p {
    margin: 16px 0;
}

#rules-dialog ul {
    padding-left: 40px;
    margin: 16px 0;
    list-style: square;
}

h3 {
    font-size: 1.17em;
    font-weight: bold;
}
table a, p a, h4 a, #info-content a {
    color: #38c;
    font-weight: 700;
    text-decoration: underline;
}

.tip-icon {
    background-image: url(icon_buttons/hint.svg);
    display: inline-block;
    width: 20px;
    height: 20px;
    background-color: gray;
    background-size: 80%;
    border-radius: 3px;
    background-repeat: no-repeat;
    background-position: center;
    margin-right: 5px;
}

.show-english-rules {
    display: flex;
}

.modal {
    z-index: 100000;
}
.modal * {
    font-size: 16px;
    font-family: sans-serif;
}

.modal-background {
    opacity: 0;
}

.modal-card {
    box-shadow: 0 0 12px rgb(0 0 0 / 60%);
}

.modal-card .modal-card-body,
.modal-card .modal-card-head {
    border-radius: 0;
}

.modal-card {
    border-radius: 5px;
}

.modal-card-head {
    padding: 14px;
}

.modal button,
.modal a.button {
    background: #f6f6f6;
    padding: 12px 16px;
    line-height: 20px;
    height: auto;
    text-shadow: 0 1px 0 #f3f3f3;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid #ddd;
    box-shadow: none;
}

.modal-card-head .button {
    /*background-color: #05BD65;*/
    background-color: #8b3e38;
    border: none;
    text-shadow: none;
    padding: 6px 16px;
    position: absolute;
    color: #fff;
}

.button.green-button {
    background: #8b3e38;
    min-width: 150px;
    color: #fff;
    border: 1px solid #8b3e38;
    text-shadow: none;
}

    .modal-card-head .button:hover,
    .button.green-button:hover {
        background: #4e221f !important;
    }

.button-group button {
    padding: 12px 16px;
}

.modal-card-head .close-button {
    position: absolute;
    border-color: transparent;
    border-radius: 0;
    box-shadow: none;
    text-indent: -10000px;
    background: url(../images/others/close.svg);
    background-repeat: no-repeat;
    background-position: 0px;
    background-size: 88px 30px;
    width: 44px;
    height: 30px;
    right: 5px;
    top: 50%;
    margin-top: -15px;
    box-sizing: border-box;
    cursor: pointer;
}

.modal-card-body .button:hover {
    background: #ededed;
}

.modal-card-head .close-button:hover {
    background-position: -44px;
}

.modal-card-title {
    text-align: center;
    font-weight: bold;
    font-size: 18px;
}

.button.icon--right-arrow {
    text-align: left;
    display: inline-block;
}

.icon--right-arrow:after {
    content: '';
    position: absolute;
    display: block;
    width: 22px;
    height: 22px;
    right: 10px;
    top: 50%;
    margin-top: -11px;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22iso-8859-1%22%3F%3E%3C!DOCTYPE%20svg%20PUBLIC%20%22-%2F%2FW3C%2F%2FDTD%20SVG%201.1%2F%2FEN%22%20%22http%3A%2F%2Fwww.w3.org%2FGraphics%2FSVG%2F1.1%2FDTD%2Fsvg11.dtd%22%3E%3Csvg%20version%3D%221.1%22%20id%3D%22Layer_1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20x%3D%220px%22%20y%3D%220px%22%20%20width%3D%228px%22%20height%3D%2212px%22%20viewBox%3D%220%200%208%2012%22%20style%3D%22enable-background%3Anew%200%200%208%2012%3B%22%20xml%3Aspace%3D%22preserve%22%3E%3Cpolygon%20fill%3D%22%23FFF%22%20points%3D%222%2C0%200%2C2%204%2C6%200%2C10%202%2C12%208%2C6%20%22%2F%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3Cg%3E%3C%2Fg%3E%3C%2Fsvg%3E');
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    background-position: center;
    background-repeat: no-repeat;
}

.bottomBar {
    box-sizing: initial;
}

#playArea > .card {
    background-color: transparent;
    box-shadow: none;
    border-radius: 10px;
}

#advanced-options-dialog .modal-card {
    width: 545px;
}

#advanced-options-dialog .field-label {
    margin-right: 0;
}

#advanced-options-dialog .field-body {
    flex-grow: 0;
}

#more-games-dialog .modal-card {
    width: 382px;
}

#about-dialog .modal-card {
    width: 505px;
}

.modal-card {
    width: auto;
}

#achievements-dialog .modal-card {
    width: 100%;
    max-width: 600px;
}

#game-number-dialog .modal-card {
    width: 350px;
}

#game-calendar-dialog .modal-card,
#achievement-unlocked-dialog .modal-card {
    width: 100%;
    max-width: 600px;
}

#rules-dialog:not(.onphone) .modal-card {
    width: 100%;
    max-width: 500px;
    border: 1px solid #696969;
    border-right: none;
    margin: 0;
    text-shadow: none!important;
    color: black;
    height: 100%;
    border-top: none;
    border-bottom: none;
    max-height: unset;
    align-self: flex-end;
    border-radius: 0;
}

#stats-dialog .modal-card {
    max-width: 100%;
}

#rules-dialog:not(.phone) .modal-card-body {
    background: rgba(245,255,250,.9);
}

#rules-dialog hr {
    margin-left: auto;
    margin-right: auto;
    height: 1px;
    background: #333;
}

#new-game-dialog .modal-card,
#win-dialog .modal-card,
#animations-dialog .modal-card {
    overflow: visible;
}

#new-game-dialog .button,
#win-dialog .button {
    padding: 16px;
}

#new-game-dialog .modal-card-head,
#win-dialog .modal-card-head,
#animations-dialog .modal-card-head {
    border-radius: 5px 5px 0 0;
}

#new-game-dialog .modal-card-body,
#win-dialog .modal-card-body,
#animations-dialog .modal-card-body {
    border-radius: 0 0 5px 5px;
}

.freecell-newgame-options.is-active .freecell-buttons,
.collapsible.is-active > div {
    display: block;
}

.freecell-newgame-options.is-active > button,
.collapsible.is-active > button {
    border-radius: 4px 4px 0 0;
}

.freecell-buttons,
.collapsible > div {
    padding: 16px;
    position: absolute;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    width: 310px;
    border-radius: 0 0 5px 5px;
    display: none;
}

#win-dialog .collapsible > div {
    width: 380px;
}

#all-games .modal-card-body {
    width: 900px;
    max-width: 100%;
}

#all-games .table td {
    border: none;
}

.all-games-preview {
    display: inline-block;
    width: 500px;
    height: 281px;
    vertical-align: middle;
    /*background: radial-gradient(#21953d, #135223);*/
    background: radial-gradient(#4e221f, #135223);
    box-shadow: 3px 3px 3px rgba(0,0,0,0.6);
}


.filtered-game.filtered-game--mobile label {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: none!important;
    color: #333!important;
}

.filtered-game.filtered-game--mobile span {
    margin-top: 5px;
    font-weight: bold;
}

.filtered-game.filtered-game--mobile img {
    box-shadow: 3px 3px 3px rgb(0 0 0 / 60%);
}

@media screen and (max-width:  700px) {
    #all-games .modal-card {
        height: 100%;
    }

    #all-games .columns {
        height: 100%;
    }

    #all-games .column {
        padding: 0;
        height: 103%;
    }

    #all-games .game-info {
        display: none;
    }
}

#filtered-games {
    position: absolute;
    width: 100%;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow-y: scroll;
    border: 1px solid #dbdbdb;
    border-radius: 4px;
}

.filtered-game input {
    display: none;
}

.filtered-game label {
    display: inline-block;
    padding: 0.5em 1em;
    width: 100%;
    cursor: pointer;
}

.filtered-game label:hover {
    background: #eee;
}
