/* MEMORAMA GAME STYLE SHEET */

@import url(https://fonts.googleapis.com/icon?family=Material+Icons);
@import url(https://fonts.googleapis.com/icon?family=Material+Icons+Outlined);

@import url(https://fonts.googleapis.com/css2?family=Poppins&display=swap);

:root {
    --card-width: 90px;
    --card-height: 90px;

    --image-width: 90px;
    --image-height: 90px;

    --transition-delay: 125ms;

    --default-color: black;
    --default-bg-color: white;

    --almost-bg-color: #eee;

    --card-shadow-color: #ccc;
    --card-shadow-radius: 2px;

    --highlight-color: #369;
}

.dark-theme {
    --default-color: white;
    --default-bg-color: black;

    --almost-bg-color: #111;

    --card-shadow-color: black;
    --card-shadow-radius: 1px;
}

html * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-width: 390px;
    max-width: 768px;
    width: 100vw;
    height: 100vh;
    margin: 0 auto;
    /* overflow: hidden; */
    color: var(--default-color);
    background-color: var(--default-bg-color);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;

}

/* HEADER AND MENUS STYLES */

header {
    width: 100%;
    height: 36px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    border-bottom: 1px solid gray;
    font-family: 'Poppins', sans-serif;
}

header button {
    border: none;
    color: var(--default-color);
    background-color: var(--default-bg-color);
    cursor: pointer;
    padding: 3px;
}

main {
    flex: content;
    display: flex;
    justify-content: center;
    align-items: center;
}
/* FOOTER STYLES */

footer {
    font-size: small;
    max-width: 768px;
    min-width: 390px;
    width: 100%;
    margin: 0 auto;
    color: gray;
    height: fit-content;
    padding: 8px 0;
    text-align: center;
    border-top: 1px solid gray;
    font-family: 'Arial Condensed', Helvetica, sans-serif;
}

@media (orientation: landscape) and (max-height: 468px) {
    body { min-height: 380px; }
    header { display: none; }
    footer { display: none; }
}

@media (orientation: portrait) and (max-height: 840px) {
    footer { display: none; }
}

/* GAME STYLES AND TRANSITIONS */

#board-container {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.card-holder {
    width: var(--card-width);
    height: var(--card-height);
    display: inline-block;
    align-items: center;
    justify-content: center;
    margin: 2px;
    background-color: var(--almost-bg-color);
}

.card {
    width: var(--card-width);
    height: var(--card-height);
    border-radius: 2px;
    border: none;
    background-image: url(./img/sets/montecarlo/back.png);
    transition: transform var(--transition-delay);
}
.card.flip {
    transform: rotateX(-90deg) scale(1.2);
}
.card.open {
    border: none;
    background: url(./img/sets/montecarlo/figures.png);
}
.card.taken {
    transform: rotateX(-90deg) scale(1.5);
}
.card.hidden {
    display: none;
}

/* MODAL DIALOGS */

/* Adjust some general styling */
.fade {
    font-family: "Poppins", sans-serif;
}
.modal-dialog {
    color: var(--default-color) !important;
    background-color: var(--default-bg-color) !important;
    border: 1px solid var(--default-color) !important;
    width: 400px;
}
.modal-dialog h5 {
    margin-bottom: 1em;
}
.modal-header, .modal-body, .modal-footer {
    color: inherit !important;
    background-color: inherit !important;
}
.modal-body * {
    font-family: "Helvetica Neue", Helvetica, sans-serif;
}
.modal-body h5 {
    text-transform: uppercase;
    text-align: center;
    font-size: large;
    font-weight: bold;
}
.modal-body p:not(:last-child) {
    margin-bottom: 1em;
}
.modal-body li {
    list-style: none;
}
.modal-body a {
    text-decoration: none;
    color: var(--default-color);
}
.modal-body a:hover {
    color: var(--highlight-color);
}

/* Styling for about dialog */
i { display: inline-block; width: 16px; height: 16px; background-size: cover; margin-right: 8px; }
i.switcher { background-image: url(./img/switcher.png); }
i.tileslider { background-image: url(./img/tileslider.png); }
i.wordle { background-image: url(./img/wordle.png); }
i.pokedex { background-image: url(./img/pokedex.png); }

/* Styling for statistics dialog */
#stats-table {
    width: fit-content;
    margin: 0 auto 1em auto;
}
#stats-table td {
    width: 1em;
    text-align: center;
    vertical-align: top;
    padding: 0 8px;
}
#stats-table td.number {
    font-size: 2.5em;
    font-weight: 300;
}
#stats-table td.label {
    font-size: 12px;
    font-weight: 300;
}
#stats-graph {
    width: 100%;
}
#stats-graph .bar-outer {
    width: 100%;
    line-height: 24px;
    display: flex;
    flex-direction: row;
    margin-bottom: 4px;
}
#stats-graph .bar-outer span {
    min-width: 1em;
    text-align: end;
    margin-right: 4px;
}
#stats-graph .bar-inner {
    min-width: 1em;
    line-height: 24px;
    color: white;
    background-color: #555;
    text-align: right;
    padding: 0px 4px;
}
#stats-graph .highlight {
    color: white;
    background-color: #369;
}

/* Styling for settings dialog */
.setting {
    border-bottom: 1px solid #555;
    padding: 16px 0;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}
.setting.vertical {
    flex-direction: column;
}
.setting .title {
    color: var(--default-color);
    display: block;
    font-size: 18px;
}
.setting .description {
    float: left;
    color: var(--default-color);
    filter: brightness(0.5);
    display: block;
    font-size: 12px;
}
.setting .switch {
    float: right;
    background-color: #555;
    height: 20px;
    width: 32px;
    padding: 2px;
    border-radius: 10px;
    position: relative;
    cursor: pointer;
}
.setting .switch[checked] {
    background-color: var(--highlight-color);
}
.setting .switch .knob {
    display: block;
    height: 16px;
    width: 16px;
    position: absolute;
    left: 2px;
    right: auto;
    border-radius: 8px;
    background-color: white;
    transition: all 250ms;
    pointer-events: none;
}
.setting .switch[checked] .knob {
    right: 2px;
    left: auto;
}
.image-select {
    display: block;
    margin-top: 10px;
}
.image-select .image-option {
    max-width: 90px;
    max-height: 90px;
    padding: 8px;
    border-radius: 8px;
    display: inline-block;
}
.image-select .image-option[selected] {
    background-color: var(--highlight-color);
    /* border: 1px solid white; */
}

/* SETS OF IMAGES */

/* montecarlo */
.card-holder[data-set="montecarlo"] {
    border-radius: 2px;
}
.card[data-set="montecarlo"] {
    background-image: url(./img/sets/montecarlo/back.png);
    border-radius: 2px;
}
.card.open[data-set="montecarlo"] {
    background-image: url(./img/sets/montecarlo/figures.png);
}

/* minecraft */
.card-holder[data-set="minecraft"] {
    border-radius: 12px;
}
.card[data-set="minecraft"] {
    background-image: url(./img/sets/minecraft/back.png);
    border-radius: 12px;
}
.card.open[data-set="minecraft"] {
    background-image: url(./img/sets/minecraft/figures.png);
}

/* pokemon */
.card-holder[data-set="pokemon"] {
    border-radius: 24px;
}
.card[data-set="pokemon"] {
    background-image: url(./img/sets/pokemon/back.png);
    border-radius: 24px;
}
.card.open[data-set="pokemon"] {
    background-image: url(./img/sets/pokemon/figures.png);
}

/* End of code. */