/*
  ========================================
  Color Memory Game
  ========================================
*/

/* -------------- whole table with cards -------------- */
.it-overview-cont {
    display: flex;
    width: 100%;
    height: 80vh;
    min-height: 500px;
    background-image: none;
}
@media all and (min-width: 768px) { 
    .it-overview-cont {
        height: var(--height-page);
    }
    @media all and (orientation: portrait){
        .it-overview-cont {
            height: 80vh;
        }
    }
}
 
#game_start_cont {
    display: flex;
    width: 100%;
    height: 100%;
    position: relative;
}
#game_start_cont > * {
    z-index: 1;
}
#game_cont {
    display: none; 
    width: 100%;
    height: 100%;
    background-color: white;
}
@media all and (min-width: 768px) { 
    #game_cont {
        background-color: none;
    }
}
#game_end_cont { 
    display: none;   
    width: 100%;
    height: 100%;
    background-color: white;
    background-image: url('/images/quiz/cards_game.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: auto 100%;
}
@media all and (min-width: 768px) { 
    #game_end_cont {
        background-size: 100% 100%;
    }
}

/* ---------- feedback ------------ */
#crg_feedback {
    padding: 0.5em;
    background-color: white;
}

/* ------------ game ------------- */
#game_cont {
    position: relative;
    min-height: 500px;
}

.game {
    transform-style: preserve-3d;
    perspective: 500px;
    width: 100%;
    height: 100%;
}

/* default : 4x4 */
.card {
    width: 25%;
    height: 25%;
    float: left;
    padding: 5px;
    text-align: center;
    display: block;
    perspective: 500px;
    position: relative;
    cursor: pointer;
    z-index: 50; 
    -webkit-tap-highlight-color: rgba(0,0,0,0);
}
.card_hor_x3 {
    width: 33.33%;
}
.card_hor_x4 {
    width: 25%;
}
.card_hor_x5 {
    width: 20%;
}
.card_hor_x6 {
    width: 16.66%;
}
.card_hor_x7 {
    width: 14.28%;
}
.card_hor_x8 {
    width: 12.5%;
}
.card_ver_x3 {
    height: 33.33%;
}
.card_ver_x4 {
    height: 25%;
}
.card_ver_x5 {
    height: 20%;
}
.card_ver_x6 {
    height: 16.66%;
}
.card_ver_x7 {
    height: 14.28%;
}
.card_ver_x8 {
    height: 12.5%;
}

.inside {
    width: 100%;
    height: 100%;
    display: block;
    transform-style: preserve-3d;
    transition: .4s ease-in-out;
    background: white;
}
.inside.picked, .inside.matched {
    transform: rotateY(180deg);
}
.inside.matched {
    animation: 1s matchAnim ease-in-out;
    animation-delay: .4s;
}

.front, .back {
    backface-visibility: hidden;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 10px;
}
@media all and (min-width: 768px) { 
    .front, .back {
        padding: 1em;
    }
}
.front img, .back img {
    max-width: 100%;
    display: block;
    margin: 0 auto;
    max-height: 100%;
}

.front {
    transform: rotateY(-180deg);
}
.back{
    transform: rotateX(0);
}


@keyframes matchAnim {
    0% {
        background: #bcffcc;
    }
    100% {
        background: white;
    }
}

/*
@mixin width($max){
    @media (max-width: $max){
        @content;
    }
    }
*/