/* (c) 2024 Kenny Young
 * This code is licensed under the MIT License.
 * https://github.com/tabascq/PuzzleJS
 */
.puzzle-entry {
    display: grid;
    gap: 10px;
    line-height: normal;

    /* Make background colors print faithfully. */
   -webkit-print-color-adjust: exact;
   -moz-print-color-adjust: exact;
   -ms-print-color-adjust: exact;
   print-color-adjust: exact;
}

.puzzle-entry:not(.loaded) {
    display: none !important;
}

.puzzle-entry-content {
    display: flex;
    gap: 20px;
    flex-flow: row wrap;
    margin: 0px auto;
}

.puzzle-entry .no-input * {
    cursor: default !important;
}

.puzzle-entry table {
    border-collapse: collapse;
    break-inside: avoid;
    display: inline-block;
    position: relative;
    user-select: none;
}

:root {
    --puzzle-cell-size: 40px;
}

.puzzle-entry .puzzle-grid > tr {
    display: block;
    height: var(--puzzle-cell-size);
}

.puzzle-entry td {
    box-sizing: border-box;
    width: var(--puzzle-cell-size);
    height: var(--puzzle-cell-size);
    padding: 0px;
    position: relative;
    background: transparent;
    text-align: center;
    font-size: calc(var(--puzzle-cell-size) * 0.8);
    font-weight: bold;
    font-family: monospace;
    border: none;
    color: black;
    user-select: none;
    cursor: pointer;
    text-transform: uppercase;
    caret-color: transparent;
    touch-action: pinch-zoom;
}

.puzzle-entry table.copy-only,
.puzzle-entry .copy-only td {
    user-select: all !important;
}

.puzzle-entry .text {
    z-index: 2;
    position: absolute;
    top: 0px;
    left: 0px;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.puzzle-entry .cell:focus {
    outline: none;
}

.puzzle-entry .cell:focus .text {
    box-shadow: 0px 0px 3px 3px Highlight;
    box-shadow: 0px 0px 3px 3px -webkit-focus-ring-color;
}

.puzzle-entry .corner-focus {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 4px;
    pointer-events: none;
    background: none;
    border: 0px solid black;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.puzzle-entry .corner-focus.x-mode::after {
    content: "\2573";
    position: absolute;
    user-select: none;
    pointer-events: none;
    color: white;
    top: 50%;
    left: 50%;
    font-size: 8px;
    font-weight: bold;
    transform: translate(-50%, -50%);
}

.puzzle-entry .corner-focus:focus {
    box-shadow: 0px 0px 3px 3px Highlight;
    box-shadow: 0px 0px 3px 3px -webkit-focus-ring-color;
}

.puzzle-entry .interesting::after {
    content: "";
    position: absolute;
    z-index: 5;
    top: 50%;
    left: 50%;
    width: 80%;
    height: 80%;
    transform: translate(-50%, -50%);
    border-radius: 100px;
    border: 2px solid red;
}

.puzzle-entry .nopointer {
    pointer-events: none;
}

.puzzle-entry .cell > svg {
    z-index: 1;
}

.puzzle-entry td.unselectable {
    cursor: default;
    border: none;
    pointer-events: none;
}

.puzzle-entry td.top-clue, .puzzle-entry td.bottom-clue, .puzzle-entry td.left-clue, .puzzle-entry td.right-clue {
    border: none;
}

.puzzle-entry .clue {
    position: absolute;
    top: 1px;
    left: 2px;
    z-index: 3;
    text-align: left;
    font-size: calc(var(--puzzle-cell-size) * 0.3);
    text-shadow: none;
    color: black;
    font-weight: normal;
    font-family: sans-serif;
}

.puzzle-entry .extract-code {
    position: absolute;
    bottom: 1px;
    right: 2px;
    z-index: 3;
    text-align: right;
    font-size: calc(var(--puzzle-cell-size) * 0.3);
    text-shadow: none;
    color: black;
    font-weight: normal;
    font-family: sans-serif;
    text-transform: none;
}

.puzzle-entry .small-text {
    font-size: calc(var(--puzzle-cell-size) * 0.3);
}

.puzzle-entry td.extract {
    background-color: yellow;
}

.puzzle-entry td.marked {
    background-color: lightblue;
}

.puzzle-entry td.hovered {
    background-color: lightblue;
}

.puzzle-entry td.strikethrough {
    text-decoration: line-through;
}

.puzzle-entry td.black-cell {
    background-color: black;
    box-shadow: inset 50px 50px black; /* Make black box print when background graphics are off. */
}

.crossword-clues {
    display: inline-block;
    vertical-align: top;
    margin-block-start: 0;
    margin-block-end: 0;
}
.crossword-clues li.strikethrough {
    text-decoration: line-through;
}
.crossword-clues li:hover, .crossword-clues li.marked, .crossword-clues li:hover::before, .crossword-clues li.marked::before {
    background-color: lightblue;
}

.puzzle-entry svg {
    position: absolute;
    left: -25%;
    top: -25%;
    width: 150%;
    height: 150%;
}

.puzzle-entry use {
    fill: black;
    stroke: black;
}

.puzzle-entry .reticle-back {
    stroke-width: 2px;
    stroke: blue;
}

.puzzle-entry .reticle-front {
    stroke-width: 1px;
    stroke: lightblue;
}

.commands {
    margin: 0px auto;
}

.puzzle-commands {
    display: flex;
    justify-content: center;
}

.puzzle-about-back {
    position: fixed;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1000;
    background: #00000080;
}

.puzzle-about {
    position: fixed;
    max-width: 75vw;
    max-height: 75vh;
    left: 50%;
    top: 50%;
    z-index: 1001;
    padding: 20px;
    background: white;
    border: 2px solid black;
    font-family: Arial, Helvetica, sans-serif;
    transform: translate(-50%, -50%);
}

.puzzle-about-close {
    position: absolute;
    right: 20px;
    bottom: 15px;
}

.puzzle-about-credits {
    margin: 0px auto;
    margin-top: 20px;
    text-align: center;
}

.puzzle-about-savedstate {
    margin: 0px auto;
    text-align: center;
}

.puzzle-about-scroller {
    overflow-y: auto;
    max-height: calc(75vh - 30px);
}

.puzzle-entry .puzzle-about td {
    font-size: 16px;
    padding: 10px;
    width: unset;
    height: unset;
    text-transform: none;
    font-weight: normal;
    font-family: Arial, Helvetica, sans-serif;
    border: 1px solid gray;
}

.puzzle-entry .puzzle-about th {
    font-size: 16px;
    padding: 10px;
    width: unset;
    height: unset;
    text-transform: none;
    font-weight: bold;
    font-family: Arial, Helvetica, sans-serif;
}

@media print {
    .puzzle-commands {
        display: none;
    }
}

 /* basic fills */
 .cell.white { background-color: white; }
 .cell.lightgray { background-color: lightgray; }
 .cell.darkgray { background-color: darkgray; }
 .cell.gray { background-color: gray; }
 .cell.black { background-color: black; }
 .cell.red { background-color: red; }
 .cell.orange { background-color: orange; }
 .cell.yellow { background-color: yellow; }
 .cell.green { background-color: green; }
 .cell.blue { background-color: blue; }
 .cell.indigo { background-color: indigo; }
 .cell.violet { background-color: violet; }

 /* fills for laser-colored paths */
 .cell.black .edge-base { stroke: silver; }

 .cell.white-laser { background-color: #7f7f7f; }
 .cell.white-laser .edge-base { stroke: silver; }
 .cell.white-laser .path { stroke: white; }

 .cell.red-laser { background-color: #7f0000; }
 .cell.red-laser .edge-base { stroke: silver; }
 .cell.red-laser .path { stroke: red; }

 .cell.orange-laser { background-color: #7f5300; }
 .cell.orange-laser .edge-base { stroke: silver; }
 .cell.orange-laser .path { stroke: orange; }

 .cell.yellow-laser { background-color: #7f7f00; }
 .cell.yellow-laser .edge-base { stroke: silver; }
 .cell.yellow-laser .path { stroke: yellow; }

 .cell.green-laser { background-color: #00007f; }
 .cell.green-laser .edge-base { stroke: silver; }
 .cell.green-laser .path { stroke: green; }
 
 .cell.blue-laser { background-color: #007f00; }
 .cell.blue-laser .edge-base { stroke: silver; }
 .cell.blue-laser .path { stroke: blue; }
 
 .cell.indigo-laser { background-color: #250041; }
 .cell.indigo-laser .edge-base { stroke: silver; }
 .cell.indigo-laser .path { stroke: indigo; }
 
 .cell.violet-laser { background-color: #7f007f; }
 .cell.violet-laser .edge-base { stroke: silver; }
 .cell.violet-laser .path { stroke: violet; }

 .cell.wordle-gray { background-color: rgb(120, 124, 126); }
 .cell.wordle-yellow { background-color: rgb(201, 180, 88); }
 .cell.wordle-green { background-color: rgb(106, 170, 100); }
