/*====================================================================================================================
//
//      enigma.css: Main css file
//
//      Copyright Michael F.C. Crick 2014-2023 All Rights Reserved
//
//*====================================================================================================================*/

html,
body {
    width: 100%;
    background-color: white;
    margin: 0;
    padding: 0;
    touch-action: manipulation;

    /* Disable selection on the UI */
    -moz-user-select: none;
    -webkit-user-select: none;
    user-select: none;
}

* {
    box-sizing: border-box;
}

html {
    /* 1rem = 16px at 480px width */
    font-size: calc(100vw * 16 / 480);
}

@media (min-aspect-ratio: 9/16) {
    /* 1rem = 16px at 853.3333px height */
    html {
        font-size: calc(100vh * 16 / 853.3333);
    }
}

body {
    height: 100vh;
    padding-top: calc(50vh - 26.6666rem);
}

@supports (height: 100svh) {
    body {
        height: 100svh;
        padding-top: calc(50svh - 26.6666rem);
    }

    @media (min-aspect-ratio: 9/16) {
        /* 1rem = 16px at 853.3333px height */
        html {
            font-size: calc(100svh * 16 / 853.3333);
        }
    }
}

#content {
    background-color: white;
    color: black;
    font-family: 'Times New Roman', serif;
    width: 30rem;
    height: 53.3333rem;
    font-size: 1rem;
    margin: 0 auto;
    rotate: 0deg;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}


#menubar {
    height: 4rem;
    padding: 0 0.5rem;
    flex: 0 0 auto;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
}

#menubar .icon {
    width: 2rem;
    height: 2rem;
    object-fit: contain;
}

.overlay {
    display: block;
    background-color: white;
    /*position: absolute;*/
    top: 4rem;
    left: 0;
    right: 0;
    bottom: 14rem;
    z-index: 2;
}

.overlay img {
    max-width: 100%;
    height: auto;
}

div #msgRect {
    position: absolute;
    opacity: 1;
    visibility: hidden;
    padding: 1rem;
    top: -4rem;    /* use to adjust message position */
    left: -2rem;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

#msgText {
    border-radius: 0.5rem;
    background: black;
    text-align: center;
    color: white;
    font-size: 110%;
    padding: 1.5rem;
}

#chartName {
    font-size: 100%;
    font-weight: bold;
    padding-bottom: 0.4rem;
}

div #lines {
    font-family: Verdana, Geneva, sans-serif;
}

#lines .line {
    display: grid;
    grid-template-columns: repeat(12, 2fr);
}

#lines .line > div {
    padding: 0.125rem;
    height: 3.5rem;
}

#lines .line > div:first-child {
    grid-column-start: 0;
}

#lines .line > div p {
    margin: 0;
    height: 100%;
    border: 0.125rem solid black;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
}

p.cellTop {
    color: black;
    font-size: 1.3rem;
}

p.keyTop:hover {
    cursor: pointer;
}

.quoteArea {
    font-size: 210%;
    line-height: 1.16em;
    color: black;
    font-family: "Times New Roman", Times, serif;
    flex-grow: 1;
    white-space: nowrap;
    padding-top: 1.7rem;
    padding-bottom: 0rem;
    padding-left: 1rem;
    padding-right: 1rem;
    display: flex;
    align-items: center;
}

.quoteArea.locked {
    font-family: Geneva, sans-serif;
}

#pQuoteArea {
    margin: 0;
}

.italics {
    font-style: italic;
}

.open {
    background-color: GRAY;
}

#cmdArea {
    font-family: Geneva, sans-serif;
    font-size: 210%;
    display: flex;
    justify-content: center;
}

div #rows {
    font-family: Verdana, Geneva, sans-serif;
    display: flex;
    flex-direction: column-reverse;
    padding-top: 0rem;
    padding-bottom: 0rem;
    padding-left: 0.3rem;
    padding-right: 0.3rem;
}

#rows > div {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
}

#rows > div > div {
    flex-basis: 10%;
    padding: 0.125rem;
}

#rows > div > div.wide {
    flex-basis: 15%;
}

#rows > div > div p {
    background-size: cover;
    color: black;
    width: 100%;
    height: 4rem;
    border-radius: 0.25rem;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

p.keyTop {
    font-size: 1.5rem;
}

p.keySwap {
    background-color: wheat;
    font-size: 2.0rem;
    text-align: center;
}

#arrow {
    font-size: 1.6rem;
    text-align: center;
    font-weight: bold;
}

/* these are the same */

.title-group {
    margin-top: -1.2rem;
    margin-left: -2.2rem;
    display: flex;
    flex-direction: row;
    align-items: center;
}

#Quzzle {
    position: absolute;
    margin-left: 0.2rem;
    font-family: serif;
    font-weight: bold;
    font-size: 220%;
}

#tm {
    margin-left: -.4rem;
    font-size: 40%;
    vertical-align: super;
}

#version {
    margin-top: 2.8rem;
    padding-left: 2.0rem;
    text-align: center;
    font-style: italic;
    font-size: 95%;
    color: brown;
    opacity: 0;
}

#numBack {
    position: absolute;
    height: 6%;
    margin-top: -1.6rem;
    margin-left: -1em;
    opacity: 1%;
}

#puzNum {
    position: absolute;
    margin-top: -1.4rem;
    margin-left: 14rem;
    visibility: visible;
    font-family: serif;
    font-weight: bold;
    font-size: 140%;
}

#newPuz {
    position: absolute;
    margin-top: 0.8rem;
    margin-left: 13.5em;
    font-size: 100%;
    font-weight: bold;
    vertical-align: sub;
    color: black;
    opacity: 0;
}

.icon-group {
    display: flex;
    flex-direction: row;
    align-items: center;
}

.icon-wrapper {
    text-align: center;
    width: 3rem;
    overflow: visible;
}

.icon-wrapper .tip {
    margin: 0 -100%;
    line-height: 0.7;
    overflow: visible;
    font-weight: bold;
    opacity: 0;
}

.icon-wrapper.left-aligned {
    text-align: left;
    width: 4rem;
}

.icon-wrapper.left-aligned .tip {
    margin: 0 -100% 0 0;
}

.icon:hover + .tip {
    opacity: 1;
}

#moreGames {
    display: block;
    width: 100%;
    visibility: hidden;
}

#howtoplay {
    visibility: visible;
}

#settings {
    visibility: hidden;
    display: block;
}

#premName {
    margin-top: .5%;
    font-weight: bold;
    text-align: left;
}

.slider {
    width: 11%;
    margin-left: 85%;
    margin-top: -9%;
    display: block;
}

#okEasier {
    width: 11%;
    margin-left: 85%;
    margin-top: -5.4%;
    display: block;
}

#okHarder {
    width: 11%;
    margin-left: 56%;
    margin-top: -7.4%;
    display: block;
}

#quzzleTips {
    visibility: hidden;
    width: 100%;
}

.topHalf {
    border: 0.2rem solid gray;
    border-radius: 1rem;
    margin: 0.5rem;
    padding: 1rem;
    display: block;
    font-family: Verdana, Geneva, sans-serif;
    font-size: 90%;
}

#setName {
    margin-top: 0;
    font-size: 115%;
    font-weight: bold;
    text-align: center;
}

#statName {
    margin-top: 0;
    font-size: 115%;
    font-weight: bold;
    text-align: center;
}

#statPlayed {
    font-size: 175%;
    line-height: 10%;
}

#stats {
    text-align: center;
    font-weight: normal;
}

#stats table {
    width: 100%;
}

#stats table+table {
    margin-top: 0.1rem;
}

#stats table td {
    width: 20%;
    text-align: center;
}

#stats .label {
    font-weight: 500;
    text-align: left;
    width: 30%;
}

#statSolved {
    color: green;
}

#statLabels21 {
    font-size: 90%;
    line-height: 95%;
}

#statLabels22 {
    font-size: 70%;
    line-height: 95%;
}

#statLabels23 {
    font-size: 70%;
    line-height: 95%;
}

/*top top numbers*/
#statWinsScore {
    font-size: 175%;
    text-align: right;
}

#statWinsPC {
    font-size: 125%;
}

#statCurrent {
    font-size: 175%;
}

#statMax {
    font-size: 175%;
}

/*bottom row numbers*/
#statVictory {
    color: darkred;
}

#statVictoryScore {
    font-size: 175%;
}

#statVictoryPC {
    font-size: 125%;
}

#statCurrent2 {
    font-size: 175%;
}

#statMax2 {
    font-size: 175%;
}

#statGD {    /*score distribution + chart*/
    grid-column-start: 2;
    display: block;
    font-size: 100%;
    font-weight: bold;
    text-align: left;
    line-height: 125%;
}

#score1 {    /*no longer used but currently required*/
    margin-top: .15rem;
    font-size: 1%;
    font-weight: bold;
    text-align: left;
    line-height: 159%;
}

#chart-wrapper {
    display: grid;
    grid-template-columns: 2rem 1fr;
    width: 100%;
    overflow: hidden;
}

#chart {
    margin-top: 0.5rem;
    margin-left: -2rem;
    height: 94%;
    font-size: 18%;
    font-weight: 350;
    text-anchor: end;
}

#StatButtons {    /*Tips and Hints + Share*/
    margin-top: -1.3rem;
    display: grid;
    align-items: center;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

#StatButtons img {
    margin-left: 0.8rem;
    display: block;
    width: 90%;
    height: auto;
}

#statNext {    /*NEXT QUZZLE IN*/
    margin-top: 1.2rem;
    display: block;
    font-size: 95%;
    line-height: 0%;
    font-weight: bold;
    text-align: center;
}

#statTime {
    margin-bottom: -0.4rem;
    display: block;
    font-size: 65%;
    text-align: center;
}
