/* --------------------------------------------------------------------------
   Only One Each  -  www.transum.org
   Styles for the puzzle only.  The page furniture (tabs, trophy button,
   containers) is styled by Quiz_2026.css.

   Each level gets a class on the wrapper - ooe-level-1 ... ooe-level-4 - so
   that the four themes can be given their own look later on without
   touching the puzzle code.
   -------------------------------------------------------------------------- */

#OOEWrap {
    font-family: Arial, Helvetica, sans-serif;
    margin: 0 auto 10px;
    padding: 0 12px 12px;
    max-width: 100%;
    box-sizing: border-box;
}

/* ---------- the row of buttons above the puzzle ---------- */

#OOEControls {
    text-align: center;
    margin: 10px auto 14px;
    line-height: 2.2;
}

#OOEControls button,
#OOEControls select {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
    padding: 5px 12px;
    margin: 2px 3px;
    border: 1px solid #999;
    border-radius: 6px;
    background: linear-gradient(to bottom, #ffffff, #e4e4e4);
    color: #222;
    cursor: pointer;
    vertical-align: middle;
}

#OOEControls button:hover:enabled,
#OOEControls select:hover {
    background: linear-gradient(to bottom, #ffffff, #d0e8ff);
    border-color: #4682b4;
}

#OOEControls button:active:enabled {
    transform: translateY(1px);
}

#OOEControls button:disabled {
    color: #aaa;
    background: #f2f2f2;
    cursor: default;
}

#OOEControls #Checkbutton {
    font-weight: bold;
    background: linear-gradient(to bottom, #ffffff, #cfe9cf);
    border-color: #4a7d4a;
}

#OOEControls label {
    font-size: 15px;
    margin-left: 10px;
}

/* ---------- the grid ---------- */

#OOEBoard {
    width: 100%;
    text-align: center;
    overflow-x: auto;
}

#OOEGrid {
    margin: 0 auto;
    border-collapse: collapse;
    border-spacing: 0;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

#OOEGrid td {
    padding: 0;
    margin: 0;
    text-align: center;
    vertical-align: middle;
    box-sizing: border-box;
}

#OOEGrid td.ooe-cell {
    border: 1px solid #9a9a9a;
    background-color: #fdfdf6;
    cursor: pointer;
    touch-action: pan-y;         /* drag to fill sideways, still scroll the page */
    transition: background-color 0.15s ease;
}

#OOEGrid td.ooe-cell:hover {
    background-color: #eef6ff;
}

#OOEGrid td.ooe-tree {
    background-color: #eef4e6;
    cursor: default;
}

#OOEGrid td.ooe-tree:hover {
    background-color: #eef4e6;
}

#OOEGrid td.ooe-item {
    background-color: #fff8e1;
}

#OOEGrid td.ooe-no {
    background-color: #f2f2f2;
}

#OOEGrid td.ooe-error {
    background-color: #ffd0d0;
}

#OOEGrid .ooe-glyph {
    display: block;
    line-height: 1;
    pointer-events: none;        /* clicks belong to the square */
}

/* the "I know nothing goes here" mark is deliberately faint so that the
   pictures stand out */
#OOEGrid td.ooe-no .ooe-glyph {
    color: #b8b8b8;
    transform: scale(0.5);
    opacity: 0.8;
}

/* the numbers down the right hand side and along the bottom */

#OOEGrid td.ooe-num {
    border: 0;
    font-weight: bold;
    color: #333;
    background: transparent;
}

#OOEGrid td.ooe-num.ooe-error {
    color: #cc0000;
    background: transparent;
}

#OOEGrid td.ooe-corner {
    border: 0;
    background: transparent;
}

/* a quiet celebration when the puzzle is finished */

#OOEGrid.ooe-won td.ooe-item {
    background-color: #d8f5d8;
    animation: ooe-pop 0.6s ease;
}

@keyframes ooe-pop {
    0%   { transform: scale(1); }
    45%  { transform: scale(1.18); }
    100% { transform: scale(1); }
}

/* ---------- the message under the puzzle ---------- */

#OOEMessage {
    min-height: 1.6em;
    margin: 14px auto 4px;
    text-align: center;
    font-size: 17px;
    color: #333;
    max-width: 620px;
}

#OOEMessage .ooe-red {
    color: #cc0000;
    font-weight: bold;
}

/* ---------- the short reminder above the puzzle ---------- */

p.OOEReminder {
    text-align: center;
    font-size: 16px;
    margin: 6px auto 0;
    color: #444;
    max-width: 640px;
}

p.OOEReminder .ooe-key {
    display: inline-block;
    border: 1px solid #bbb;
    border-radius: 4px;
    padding: 0 5px;
    background: #fafafa;
}

/* ---------- how to play, below the puzzle ---------- */

.OOEInstructions {
    max-width: 700px;
    margin: 20px auto;
    text-align: left;
    font-size: 16px;
    line-height: 1.5;
}

.OOEInstructions h3 {
    font-size: 19px;
    margin-bottom: 6px;
}

.OOEInstructions ul {
    margin: 8px 0 8px 20px;
}

.OOEInstructions li {
    margin-bottom: 6px;
}

/* ---------- the solution area in the footer ---------- */

#OOESolve {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    padding: 6px 16px;
    border: 1px solid #4a7d4a;
    border-radius: 6px;
    background: linear-gradient(to bottom, #ffffff, #cfe9cf);
    cursor: pointer;
}

/* ---------- smaller screens ---------- */

@media screen and (max-width: 700px) {
    #OOEControls button,
    #OOEControls select {
        font-size: 14px;
        padding: 4px 9px;
    }
    #OOEMessage { font-size: 16px; }
    .OOEInstructions { padding: 0 10px; }
}

@media print {
    #OOEControls,
    #OOEMessage { display: none; }
}
