/*----------------------------------
Global Styles
------------------------------------*/
/** {
	margin: 0;
	padding: 0;
}

!* border box fix *!
*,
*::before,
*::after {
	box-sizing: inherit;
}

html {
	box-sizing: border-box;
}

body {
	!* Background pattern from Subtle Patterns *!
	background: url('../img/ignasi_pattern_s.png');
	font-family: "Open Sans", sans-serif;
	!*one Em roughly ten pixels (16 x 62.5% = 10)*!
	font-size: 62.5%;
	letter-spacing: 1.5px;
	margin: 0;
	text-align: center;
}

.container {
	display: flex;
	justify-content: center;
	align-items: center;
	flex-direction: column;
	margin-top: 4em;
}

ul > li {
	list-style: none;
}*/

.tx-rm-games-memory {
    margin: 0 0 112px;
}

.card,
.reset-btn {
	cursor: pointer;
}

.btn {
    position: relative;
    padding: 20px 80px 20px 30px;
    color: #fff;
    border: none;
    background-color: rgb(var(--color-cp-lightblue));
    clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 100%, 0 100%);
    cursor: pointer;
}
.btn.reset-btn {
    background-color: rgb(var(--color-cp-lightblue));
}
.btn.reset-btn::before {
    content: '';
    position: absolute;
    top: 18px;
    right: 24px;
    width: 32px;
    height: 32px;
    background: url("../Images/bg-icon-reset-white.svg") no-repeat;
    background-size: contain;

    transition: all var(--transition-t2);
}
.btn.reset-btn:hover::before {
    transform: rotate(180deg);
}

/*----------------------------------
Section - Score Panel
------------------------------------*/

.score-panel {
    margin: -18px 0 0;
    text-align: center;
}

.tx-rm-games-memory .intro {
    margin: 0 0 2px;
    font-weight: 700;
}
.tx-rm-games-memory .headline-result {
    margin: 0 0 10px;
    font-size: 22px;
}

.star-rating,
.content .star-rating {
    display: flex;
    justify-content: center;
    margin: 0 0 24px;
}
.star-rating > li,
.content .star-rating > li {
    padding: 0;
    margin: 0;
}
.star-rating > li::before,
.content .star-rating > li::before {
    display: none;
}
.star-rating > li i.fa-star {
    display: inline-block;
    width: 22px;
    height: 22px;
    margin: 0 4px;
    background: url("../Images/bg-icon-rating-star.svg") no-repeat;
    background-size: contain;
}

.moves-wrapper {
    margin: 0 0 10px;
    font-size: 18px;
}

.reset-btn {
	/*background: #000;*/
}

.timer-container {
    position: relative;
    display: inline-block;
    margin: 0 0 40px;
    padding: 6px 20px 6px 50px;
    font-size: 18px;
    border-radius: 100px;
    background: #fff;
}
.timer-container::before {
    content: '';
    position: absolute;
    top: 7px;
    left: 10px;
    width: 24px;
    height: 24px;
    background: url("../Images/bg-icon-clock.svg") no-repeat;
    background-size: contain;
}

.timer {
	font-size: 1em;
}

/* Modal (background) */
.modal {
	/*Hidden by default */
    display: flex;
	display: none;
    justify-content: center;
    align-items: center;

	position: fixed;
	z-index: 99;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	/* Fallback color */
	background-color: rgb(46, 61, 73);
	/* With opacity */
	background-color: rgba(46, 61, 73, 0.6);
}

/* Modal Content/Box */
.modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    /* justify-content: center; */
    align-items: center;

    width: 60%;
    max-height: 90%;
    margin: 40px auto;
    padding: 30px;
    font-size: 22px;
    background-color: #fff;
    border: 20px solid rgb(var(--color-cp-lightblue));
    overflow-y: auto;
}

.modal-content h2 {
    position: relative;
    padding: 0 0 20px;
    font-size: 52px;
    color: rgb(var(--color-cp-lightblue));
}
.modal-content h2::before {
    content: '';
    position: absolute;
    left: calc(50% - 21px);
    bottom: 0;
    width: 42px;
    border-bottom: 2px solid rgb(var(--color-cp-blue));
}
.modal-content p{
    text-align: center;
}

/* The Close Button */
.modal-content .close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 25px;
    height: 25px;
    border: none;
    background: url("../Images/bg-memory-close.svg") no-repeat;
    background-size: contain;
    cursor: pointer;
}

/* Modal Image*/
.modal-img {
    width: 212px;
    height: auto;
    margin: 24px auto 24px;
}

p.stats {
    margin: 0;
}

p.stats:last-child {
	margin-bottom: 1em;
}

.tx-rm-games-memory .reset {
    text-align: center;
}

.play-again-btn {
    position: relative;
    margin-bottom: 36px;
    padding: 12px 48px 12px 60px;
    font-size: 26px;
    background: rgb(var(--color-cp-lightblue));
}
.play-again-btn::before {
    content: '';
    position: absolute;
    top: 21px;
    left: 16px;
    width: 28px;
    height: 14px;
    background: url("../Images/bg-arrow-white.svg") no-repeat;
    background-size: contain;
}

/*----------------------------------
Deck of Cards
------------------------------------*/
/*Mobile first responsivness*/
.deck {
	/*background: linear-gradient(to bottom, #5cf, #28e);
	border-radius: 1.5em;*/
	display: flex;
	flex-wrap: wrap;
	justify-content: space-around;
	align-items: center;
	/*height: 35em;
	margin-bottom: 6em;
	padding: 0.5em;
	width: 35em;*/

    /*border: 1px dashed;*/
}

.deck,
.card {
	/*box-shadow: 5px 2px 20px 0 rgba(46, 61, 73, 0.5);*/
}

.card {
	/*border-radius: 0.5em;
	height: 7em;
	width: 7em;*/
    /*border: 5px solid #fff;*/
	background: url("../Images/bg-card-bg.png") no-repeat;
    background-size: cover;
}
.card,
.content .card {
    /*width: calc(25% - 30px);
    margin: 0 15px 30px;*/
    width: calc(25% - 15px);
    margin: 0 7px 15px;
    padding: 0;
    box-shadow: 0 3px 6px #00000029;
    overflow: hidden;
    transform: rotateY(-180deg);
}
.card::before,
.content .card::before {
    display: none;
}

/*
To disable the color highlight if and img is clicked
https://stackoverflow.com/questions/21107439/disable-or-change-firefoxs-element-image-highlight-color
*/
/*img {
	user-select: none;
	width: 6em;
}*/

.deck img {
    user-select: none;
	visibility: hidden;
}

.deck .card.flip {
	background: #fff;
	cursor: default;
	transform: rotateY(-360deg);
	transition: transform 0.3s linear;
	pointer-events: none;
}

.flip img {
	background: #fff;
	visibility: visible;
}

.deck .card.match {
	visibility: visible;
	cursor: default;
	animation: pulse 1s;
}

@keyframes pulse {
	0% {
		transform: scale(1);
	}
	80% {
		transform: scale(1.1);
	}
	100% {
		transform: scale(1);
	}
}

.footer {
	color: #666;
	margin-bottom: 2em;
}

.footer > p {
	font-size: 1em;
	padding: 1em;
}

.footer a:link,
.footer a:visited {
	color: #28e;
	text-decoration: none;
}

@media screen and (min-width: 800px) {

    .deck,
    .content .deck {
        max-width: 760px;
        /*margin: 0 -15px 76px;*/
        margin: 0 auto 18px;
    }



	.deck img {
        width: calc(100% - 20px);
        margin: 10px;
	}

	.reset-btn {
		font-size: 0.8em;
	}

	.footer {
		font-size: 1.2em;
	}
}

@media screen and (max-height: 762px) {

    .modal-img {
        width: 152px;
    }
    .deck, .content .deck {
        max-width: 640px;
    }
}

@media screen and (max-width: 767px) {

    .childprotection .frame-type-list.frame-layout-150 {
        padding-bottom: 1px;
    }
    .tx-rm-games-memory {
        margin: 0 0 52px;
    }

    .card,
    .content .card {
        width: calc(25% - 10px);
        margin: 0 0 10px;
    }

    .btn.reset-btn {
        padding: 16px 60px 16px 30px;
        font-size: 18px;
    }
    .btn.reset-btn::before {
        width: 22px;
        height: 22px;
    }

    .modal-content {
        width: calc(100% - 30px);
    }
    .modal-content {
        padding: 15px;
        font-size: 20px;
    }
    .modal-content h2 {
        padding: 0 0 12px;
        font-size: 32px;
    }
    .modal-img {
        width: 112px;
    }
    .play-again-btn {
        font-size: 16px;
    }
    .play-again-btn::before {
        top: 15px;
    }
    .modal-content p {
        text-align: center;
    }
    p.stats {
        font-size: 16px;
        text-align: center;
    }
}
