/*
 * Copyright 2011-2022 TreeCardGames 
 * All rights reserved.
 * https://www.treecardgames.com
 *
*/

* { margin: 0; padding: 0; }

html, body, .ui-page.ui-page-active {
    overflow: hidden!important;
}

body { font-family: Arial; }

html, body {
    height: 100%;
    width: 100%;
    -moz-user-select: none; /* These user-select properties are inheritable, used to prevent text selection */
    -webkit-user-select: none;
    -ms-user-select: none; /* From IE10 only */
    user-select: none; /* Not valid CSS yet, as of July 2012 */

    -webkit-user-drag: none; /* Prevents dragging of images/divs etc */
    user-drag: none;
    overflow: hidden;
}

body {
	overflow-y: auto!important;
}

body:has(.fc-ccpa-root) [data-role=page] {
	position: relative!important;
}

body::-webkit-scrollbar {
    width: 8px
}

body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.4)
}

body::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.8);
    border-radius: 6px
}

body::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,0.7)
}

.clear { clear: both; }
small { font-size: 12px; }


html.desktop .mobile,
html.mobile .desktop {
    display: none;
}

/* Layout */
.ui-page { height: 100%; }
.ui-popup-screen { background-color: #000; height: 100% }
.ui-content { padding: 10px; }


@media ( min-width: 40em ) {
    /* Show the table header rows and set all cells to display: table-cell */
    .my-custom-breakpoint td,
    .my-custom-breakpoint th,
    .my-custom-breakpoint tbody th,
    .my-custom-breakpoint tbody td,
    .my-custom-breakpoint thead td,
    .my-custom-breakpoint thead th {
        display: table-cell;
        margin: 0;
    }
    /* Hide the LABELS in each cell */
    .my-custom-breakpoint td .ui-table-cell-label,
    .my-custom-breakpoint th .ui-table-cell-label {
        display: none;
    }
}

#adArea
{
    position: absolute;
    top: 5px;
    right: 5px;   
    width: 300px;
    background: #fff;
}
#adareaVideo
{
	position: fixed;
    width: 310px;
    height: 205px;
	right: 0px;
    z-index: 99999;    
}
#loading-box{
    padding: 20px;
    color: white;
    /*box-shadow: 0 0 20px black;*/
    font-weight: bold;
    font-size: 20pt;
    text-align: center;
    width: 500px;
    margin-left:-270px;
    left: 50%;
    position: absolute;
    height: 364px;
    top: 50%;
    margin-top: -265px;
    z-index: 1000;
    background-position: center;
    background-repeat: no-repeat;
}

#loading-box .preloader {
    margin-top: 340px;
}

#loading-box.second {
    background: rgba(255, 255, 255, 0.99);
    border-radius: 5px;
    width: 200px;
    height: 60px;
    margin-left: -120px;
    margin-top: -70px;
}

#loading-box.second:before {
    content: "Loading...";
    color: #333;
}

#loading-box.second .preloader {
    margin-top: 0;
}

#game-topLabel{
    position:absolute;
    top:0;
    left:0;
    width: 100%;
    display: flex;
    align-items: baseline;
    justify-content: flex-end;
    z-index: 1000;
    pointer-events: none;
    font-size: 22px;
}

.mobile #game-topLabel {
    font-size: 16px;
}

.text-shadow 
{
    /*display:none;*/
    text-shadow: 0 0 10px #000;
}

#game-topLabel .text-shadow {
    padding: 7px;
}

.mobile #game-topLabel .text-shadow {
    padding: 5px;
}

#game-name{
    position: relative;
    margin-left : 20px;
    color: white;
    font-size: 1.5em;
    margin-right: auto;
}

#map-name {
    font-size: 22px;
}

.mobile #game-name {
    margin-left: 0px;
}

#pairs {
    position: relative;
    text-align: center;
    color: white;
}

#game-time {
    position: relative;
    text-align: center;
    color: white;
}

#game-score {
    position: relative;
    padding-right: 20px;
    text-align: center;
    color: white;
}

.mobile #game-score {
    margin-right: 0px;
}

.desktop #game-buttons,
.mobile #game-buttons {
    position:absolute;
    /*margin-top: 50%;*/
    float: left; 
    width:100%;
    left:0px; 
    height: 75px;
    text-align: left;
    bottom:2px; 
    z-index: 1000;
    pointer-events: none;
    display: flex;
    align-items: center
}

.bookmark-button {
    margin-left: auto;
    cursor: pointer;
    pointer-events: all;
    margin-top: -20px;
}

.mobile .bookmark-button {
    margin-top: 30px;
}

.desktop #btn-games{
    margin-left: 20px;
    background-image: url(../images/buttons/desktops/games.png);
}

.desktop #btn-restart{
    margin-left: 10px; 
    background-image: url(../images/buttons/desktops/new_game.png);
}
.desktop #btn-shuffle{ 
    margin-left: 10px; 
    background-image: url(../images/buttons/desktops/shuffle.png);
}
.desktop #btn-undo{
    margin-left: 10px;
    background-image: url(../images/buttons/desktops/undo.png);
}
.desktop #btn-hint{
    margin-left: 10px;
    background-image: url(../images/buttons/desktops/hint.png);
}

.desktop #btn-setting{
    margin-right: 20px;
    background-image: url(../images/buttons/desktops/more.png);
}

.desktop .button {
    margin-left: 10px;
    float: left;
}

.button {
    display: inline-block;
    width: 70px; 
    height: 75px;
    cursor: pointer;
    position: relative;
    background-repeat:no-repeat;
    background-position: center 3px;
    pointer-events: all;
}

.button span {
    position: absolute;
    bottom: 3px;
    display: block;
    width: 100%;
    text-align: center;
    font-size: 14px;
    color: #FFF;
    text-shadow: none;
    font-family: Segoe UI, Helvetica, Arial, sans-serif;
    font-weight: bold;
}

.tileimage, .backimage{
    width: 30%;
}

#helphtml{
    border: 0px solid #aaa;
    width: 100%;
    min-height: 300px;
    height: 100%;
}

/*-----------------------------------------*/
#mainarea {
    position: relative;
    text-align: center;
    height: 100%;
    background-repeat:no-repeat;
    background-size:100% 100%;
    overflow: hidden; 
}

.ui-overlay-a,.ui-page-theme-a,.ui-page-theme-a .ui-panel-wrapper {
    background-color: #2b1405;
}    

/*For Switch button*/
.cb-tiles, .cb-backs, .cb-tiles span, .cb-backs span { background: url(switch.gif) repeat-x; display: block; float: left; }
.cb-tiles span, .cb-backs span { line-height: 30px; display: block; background-repeat: no-repeat;}
.cb-tiles span { background-position: left -90px; padding: 0 10px; }
.cb-backs span { background-position: right -180px;padding: 0 10px; }
.cb-backs.selected { background-position: 0 -60px; }
.cb-backs.selected span { background-position: right -240px; color: #fff; }
.cb-tiles.selected { background-position: 0 -60px; }
.cb-tiles.selected span { background-position: left -150px; color: #fff; }
.switch label { cursor: pointer; }
.field { width: 100%; float: left; margin-left:20px; margin-bottom:20px; }

#toolbar {
    -moz-box-shadow: 0 0 3px black;
    -webkit-box-shadow: 0 0 3px black;
    -o-box-shadow: 0 0 3px black;
    box-shadow: 0 0 3px black;
    position: absolute;
    top: 0;
    right: 0;
    /*background: #333;*/
    background-image: url(../images/others/transpgreen.png);
    height: 100%;
    width: 200px;
    list-style: none;
    color: #aaa;
    padding-top: 20px;
    text-shadow: 0 1px 0 #fff;
    visibility: hidden;
}

/* Options */
#maps, #tiles, #backgrounds {
    margin: 0 auto 10px auto;
    text-align: center;
}

#maps li, #tiles li, #backgrounds li{
    display: inline;
    list-style: none;
    margin: 0 1px;
    cursor: pointer;
}

/* Gameover */
.shuffle { margin-left: 30px;}

#tile-style {
    width: 100px;
    padding: 3px;
}

/*.mapimage, .label-mapimage,*/ .div-mapimage{
        width: 24%;
        display:inline-block;
    }
    
.mapimage, .label-mapimage {
    width:90%;
    display:inline-block;
}

@media (max-width: 500px) {
   /*.mapimage, .label-mapimage, */.div-mapimage{
        width: 40%;
        display: inline-block;
    }
   
    #toolbar {
        width: 100%;
        height: 90px;
    }

    body, html { overflow: hidden; }
}

.ui-header {
    cursor: move;
}

#popup-highscore .ui-title,
#popup-username .ui-title {
    width: 100%;
    margin: 0;
}

#popup-game .ui-content {
    text-align: right;
}

#highscore-table {
    display: table;
    width: 100%;
    text-align: center;
}
#highscore-table thead, #highscore-table tbody {
    float: left;
    width: 100%;
}
#highscore-table tbody {
    overflow: auto;
    height: 150px;
}
#highscore-table tr {
    width: 100%;
    display: table;
    text-align: center;
}
#highscore-table th, #highscore-table td {
    width: 33%;
}

/*#highscore-table*/ #tbody-highscore{
  overflow: scroll;
  /*display: list-item;*/
  max-height: 200px;
  
  /*min-height: 2.5em;*/
}

.highscore-td {
    padding:5px;
}

#loading-box {
    /*display: none;*/
}

@media only screen
and (min-width : 321px)
and (max-width : 320px) {
    body, html { overflow: hidden; }
    
    .mapimage, .label-mapimage{
        width:40%;
        display:inline-block;
    }

    #toolbar {
        width: 100px;
    }
    #game-name {
        font-size: 20px;
    }
    #helphtml{
        height: 200px;
    }
    .button { font-size: 9px; }
    /*
    #game-time { padding-left: 10px; }
    */
}

#svg-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.ui-mobile-rendering>*{visibility:visible!important}
.ui-mobile [data-role=page] {
    display: block;
    height: 100%;
}

.ui-mobile [data-role=popup] {
    display: none;
}
.ui-mobile .ui-page [data-role=popup] {
    display: block;
}

/* STYLE SPECIFIC FOR PHONES */
html.mobile.vertical #device-orientation-message {
    display: block;
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    left: 0;
    z-index: 1000;
    background: #fff;
}

html.mobile.vertical #device-orientation-message h3 {
    text-align: center;
    height: 1em;
    position: absolute;
    top: 50%;
    margin-top: -.5em;
    width: 100%;
}

html.mobile .ui-popup-container {
    top: 0!important;
    left: 0!important;
    right: 0!important;
    bottom: 0!important;
    max-width: 100%!important;
    width: 100%!important;
}

html.mobile .ui-popup {
    height: 100%!important;
    border-radius: 0;
    width: 100%!important;
    max-width: 100%!important;
}

html.mobile #mainarea {
    margin-left: 0;
}

html.mobile .ui-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    top: 44px;
}

html.mobile .ui-page {
    overflow: hidden;
}

html.mobile .ui-content > ul {
    height: 100%!important;
}

html.mobile .desktop {
    display: none;
}

html.mobile, html.mobile body {
    overflow: hidden;
}

html.mobile .button {
    width: 46px;
    height: 50px;
    margin-top: 30px;
}

html.mobile .button span {
    font-size: 9px;
}

/*.mobile #game-buttons {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%    ;
    width: 46px;
}*/

.ui-btn.icon:before,
.icon > .ui-btn: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;
}

.ui-btn.icon, .icon > .ui-btn {
    text-align: left;
    text-indent: 32px;
}

#continue-playing .ui-content .ui-btn {
    padding: 16px;
}

.icon--new-game:before {
	background-image: url(../images/buttons/btn_new_game.svg);
}

.icon--select-game:before {
	background-image: url(../images/buttons/select_game.png);
}


.mobile #btn-games{
    background-image: url(../images/buttons/phones/games.png);
}

.mobile #btn-restart{
    background-image: url(../images/buttons/phones/new_game.png);
}

.mobile #btn-shuffle{ 
    background-image: url(../images/buttons/phones/shuffle.png);
}

.mobile #btn-undo{
    background-image: url(../images/buttons/phones/undo.png);
}

.mobile #btn-hint{
    background-image: url(../images/buttons/phones/hint.png);
}

.mobile #btn-setting{
    bottom: 0;
    /*margin-bottom: 20px;*/
    /*float: right;*/
    background-image: url(../images/buttons/phones/more.png);
}

@media (max-width: 321px) {
    .mobile #game-topLabel {
        font-size: 14px;
    }
}

/* Settings */
.options-dialog .switch-setting {
    display: -webkit-box;
    display: -webkit-flex;
    display: -moz-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
       -moz-box-align: center;
        -ms-flex-align: center;
            align-items: center;
}

.switch-setting label,
.radio-setting legend {
    margin: 0!important;
    -webkit-box-flex: 1;
    -webkit-flex-grow: 1;
       -moz-box-flex: 1;
        -ms-flex-positive: 1;
            flex-grow: 1;
    text-align: left;
    min-width: 50%;
}

.options-dialog .radio-setting .ui-radio,
.options-dialog .checkbox-setting .ui-checkbox {
    -webkit-box-flex: 1;
    -webkit-flex-grow: 1;
       -moz-box-flex: 1;
        -ms-flex-positive: 1;
            flex-grow: 1;
}

.radio-setting .ui-radio label,
.checkbox-setting .ui-checkbox label {
    text-align: center;
}

.options-dialog .ui-content {
    padding: 0;
}

.options-dialog .setting > label {
    text-align: left;
}
.options-dialog .ui-content .setting {
    padding: 15px 20px;
    border-bottom: 1px solid #e9e9e9;
}
.options-dialog .ui-field-contain {
    margin: 0!important;
}

.options-dialog .setting:last-child {
    border-bottom: none;
}

/* PRELOADER */
.preloader span,
.preloader span:after {
    width: 8px;
    height: 8px;
}

.preloader span {
    display: inline-block;
    background: #eee;
    margin: 4px;
    border: 1px solid #ddd;
    position: relative;
}

.preloader span:after {
    content: "";
    position: absolute;
    display: inline-block;
    opacity: 0;
    left: 0;
    background: black;
    -webkit-animation: movement 1200ms ease-out 100ms infinite;
       -moz-animation: movement 1200ms ease-out 100ms infinite;
         -o-animation: movement 1200ms ease-out 100ms infinite;
            animation: movement 1200ms ease-out 100ms infinite;
}

.preloader span:nth-child(2):after {
    -webkit-animation-delay: 200ms;
       -moz-animation-delay: 200ms;
         -o-animation-delay: 200ms;
            animation-delay: 200ms;
}

.preloader span:nth-child(3):after {
    -webkit-animation-delay: 300ms;
       -moz-animation-delay: 300ms;
         -o-animation-delay: 300ms;
            animation-delay: 300ms;
}

.preloader span:nth-child(4):after {
    -webkit-animation-delay: 400ms;
       -moz-animation-delay: 400ms;
         -o-animation-delay: 400ms;
            animation-delay: 400ms;
}

.preloader span:nth-child(5):after {
    -webkit-animation-delay: 500ms;
       -moz-animation-delay: 500ms;
         -o-animation-delay: 500ms;
            animation-delay: 500ms;
}

.preloader span:nth-child(6):after {
    -webkit-animation-delay: 600ms;
       -moz-animation-delay: 600ms;
         -o-animation-delay: 600ms;
            animation-delay: 600ms;
}

.preloader {
    display: inline-block;
    width: 150px;
    text-align: center;
}

@-webkit-keyframes movement {
    0% {
        -webkit-transform: scale(1.0);
                transform: scale(1.0);
        opacity: 0;
    }
    15% {
        -webkit-transform: scale(2.5);
                transform: scale(2.5);
        opacity: .3;
    }
    100% {
        -webkit-transform: scale(1.0);
                transform: scale(1.0);
        opacity: 0;
    }
}

@-moz-keyframes movement {
    0% {
        -moz-transform: scale(1.0);
             transform: scale(1.0);
        opacity: 0;
    }
    15% {
        -moz-transform: scale(2.5);
             transform: scale(2.5);
        opacity: .3;
    }
    100% {
        -moz-transform: scale(1.0);
             transform: scale(1.0);
        opacity: 0;
    }
}

@-o-keyframes movement {
    0% {
        -o-transform: scale(1.0);
           transform: scale(1.0);
        opacity: 0;
    }
    15% {
        -o-transform: scale(2.5);
           transform: scale(2.5);
        opacity: .3;
    }
    100% {
        -o-transform: scale(1.0);
           transform: scale(1.0);
        opacity: 0;
    }
}

@keyframes movement {
    0% {
        -webkit-transform: scale(1.0);
           -moz-transform: scale(1.0);
             -o-transform: scale(1.0);
                transform: scale(1.0);
        opacity: 0;
    }
    15% {
        -webkit-transform: scale(2.5);
           -moz-transform: scale(2.5);
             -o-transform: scale(2.5);
                transform: scale(2.5);
        opacity: .3;
    }
    100% {
        -webkit-transform: scale(1.0);
           -moz-transform: scale(1.0);
             -o-transform: scale(1.0);
                transform: scale(1.0);
        opacity: 0;
    }
}

