/* (c) 2023 Kenny Young
 * This code is licensed under the MIT License.
 * https://github.com/tabascq/PuzzleJS
 */
.puzzle-entry {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;

    /* 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.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 tr {
    display: block;
    height: var(--puzzle-cell-size);
}

.puzzle-entry td {
    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;
    text-shadow: -2px -2px 0 #fff, 0 -2px 0 #fff, 2px -2px 0 #fff, 2px 0 0 #fff, 2px 2px 0 #fff, 0 2px 0 #fff, -2px 2px 0 #fff, -2px 0 0 #fff;
    user-select: none;
    cursor: pointer;
    text-transform: uppercase;
    caret-color: transparent;
    touch-action: pinch-zoom;
}
.puzzle-entry td.outer-cell {
    font-size: calc(var(--puzzle-cell-size) * 0.6);
    }

.puzzle-entry .commands td {
    cursor: default; /* The puzzle commands row itself is not interactable. */
}

.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;
}

.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 {
    padding-top: 15px;
    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;
    }
}
