/* =========================================================
   PODSTAWY
   ========================================================= */

body {
    background-color: black;
    color: lightgray;
    font-size: 28px;
    font-family: 'Inconsolata', monospace;
    font-weight: 700;
}

main {
    width: 100%;
    text-align: center;
}

/* =========================================================
   GŁÓWNA PLANSZA SUDOKU
   ========================================================= */

#pojemnik {
    width: 504px;
    height: 504px;
    margin: 20px auto 0;
    position: relative;
}

.box {
    float: left;
}

.litera {
    width: 30px;
    height: 30px;
    padding: 5px;
    margin: 5px;
    text-align: center;
    border: 3px solid lightgreen;
    border-radius: 15px;
    float: left;
    position: relative;
    color: #8fd3ff;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: none;
    outline: none !important;
}

.litera:focus {
    box-shadow: none !important;
}

/* Aktywna komórka — stan sterowany przez JavaScript. */
.litera.hover-active {
    color: white;
    border: 3px solid white !important;
    background-color: grey !important;
	cursor: pointer;
}

.litera.hover-active span {
    color: white !important;
}

.litera[data-just-selected="1"] span {
    cursor: default !important;
}
/* =========================================================
   MINI-GRID WYBORU CYFRY
   ========================================================= */

.tablica {
    width: 93px;
    height: 93px;
    text-align: center;
    background-color: red;
    position: absolute;
    bottom: 50%;
    left: 50%;
    display: none;
    opacity: 0.85;
    color: yellow;
	cursor: default;
}

.tablica .menu-digit {
    width: 15px;
    height: 15px;
    padding: 3px;
    margin: 3px;
    text-align: center;
    border: 2px solid yellow;
    border-radius: 8px;
    float: left;
    font-size: 15px;
    color: yellow;
	cursor: pointer;
}

.tablica:hover .menu-digit:hover {
    border: 2px solid darkred;
    background: yellow;
    color: darkred;
}

/* =========================================================
   OPIS / SEKCJE / PRZYCISKI
   ========================================================= */

section {
    width: 490px;
    height: 50px;
    margin: 20px auto 0;
    position: relative;
}

.putter {
    width: 120px;
    height: 30px;
    padding: 8px;
    margin: 10px;
    text-align: center;
    border: 3px solid lightgreen;
    border-radius: 15px;
    float: left;
    position: relative;
    cursor: pointer;
    color: #8fd3ff;
    background-color: transparent;
    outline: none !important;

    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;

    touch-action: manipulation;

    -webkit-tap-highlight-color: transparent;
}

.menu-digit,
#down_soluter_R {
    outline: none !important;
    -webkit-tap-highlight-color: transparent;
}

.menu-digit:focus,
#down_soluter_L:focus,
#down_soluter_R:focus {
    box-shadow: none !important;
}

@media (hover: hover) and (pointer: fine) {
    .putter:hover {
        color: white;
        border: 3px solid white;
        background-color: grey;
    }
}

@media (hover: none) and (pointer: coarse) {
    .putter:hover {
        color: inherit !important;
        border-color: inherit !important;
        background-color: transparent;
    }

    .putter.is-tap-active {
        color: white !important;
        border-color: white !important;
        background-color: grey !important;
    }
}

header {
	opacity: 0.6;
    width: 470px;
    padding: 5px;
    margin: 20px auto 5px;
    text-align: center;
    border: 3px solid lightgreen;
    border-radius: 15px;
    color: #8fd3ff;
    font-size: 38px;
}

.inverted_putter {
    padding: 5px;
    margin: 5px;
    text-align: center;
    border: 3px solid yellow;
    border-radius: 15px;
    background-color: red;
    color: yellow;
    opacity: 0.85;
}

#up_soluter {
    font-size: 33px;
	opacity: 0.6;
}

/* =========================================================
   STANY APLIKACJI
   ========================================================= */

.conflict-blink {
    background-color: red !important;
    border-color: yellow !important;
    color: yellow !important;
}

.conflict-blink span {
    color: yellow !important;
}

#pojemnik.anti-putter {
    width: 504px;
    height: 504px;
    box-sizing: border-box;
    padding: 35px;
    border: 3px solid lightgreen !important;
    border-radius: 15px;
    background-color: rgba(173, 216, 230, 0.03);
	opacity: 0.6;
    display: block;
    overflow: hidden;
}

.how-to-title {
    font-size: 32px;
    color: #8fd3ff;
    margin-bottom: 20px;
    border-bottom: 2px dashed lightgreen;
    padding-bottom: 10px;
}

.how-to-description {
    font-size: 16px;
    text-align: left;
    line-height: 1.5;
    font-weight: 400;
    color: lightgray;
}

.how-to-subtitle {
    font-size: 18px;
    text-align: left;
    margin-top: 25px;
    margin-bottom: 10px;
    color: lightgreen;
}

#instructionsList {
    font-size: 15px;
    text-align: left;
    line-height: 1.6;
    font-weight: 400;
    list-style-type: square;
    margin-left: 20px;
    padding: 25px;
    color: lightgray;
}

.how-to-warning {
    font-size: 14px;
    font-style: italic;
    margin-top: 30px;
    color: #ffaa55;
}

/* =========================================================
   EKRAN STARTOWY
   ========================================================= */

#entranceScreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: black;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#entranceScreen > header {
    position: absolute !important;
    top: 20px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    margin: 0 !important;
    z-index: 100000;
}

#entranceButton {
    width: 100%;
    box-sizing: border-box;
    font-size: 38px;
    color: #8fd3ff;
    text-align: center;
    padding: 5px;
	margin-top: 150px;
	user-select: none;
    -webkit-user-select: none;
}


#entrancePanel:not(.input-disabled):hover {
    border-color: white;
    background-color: grey;
    box-shadow: none;
}

#entrancePanel:not(.input-disabled):hover #entranceButton {
    color: white;
}

#entrancePanel.input-disabled:hover #entranceButton {
    color: #8fd3ff;

}

#entrancePanel.input-disabled {
    border-color: rgba(144, 238, 144, 0.6);
    box-shadow: none;
	cursor: default;
}

#entrancePanel.input-disabled #entranceButton {
    opacity: 0.6;
}

#entranceButton.input-disabled {
    opacity: 0.6 !important;
    pointer-events: none;
}

#entrancePanel {
    width: 504px;
    height: 504px;
    box-sizing: border-box;
    padding:  35px;
    border: 3px solid lightgreen;
    border-radius: 15px;
    background-color: rgba(173, 216, 230, 0.03);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
	cursor: pointer;
	touch-action: none;
	user-select: none;
	-webkit-user-select: none;
	-webkit-tap-highlight-color: transparent;
}

#entrancePanel:not(.input-disabled):active {
    border-color: white;
    background-color: grey;
    box-shadow: none;
}

#entranceChoices {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 0;
    width: 490px;
    margin-top: 245px;
	cursor: default;
	pointer-events: none;
}

#entranceChoices .putter {
    float: left;
}

#touchChoice,
#mouseChoice {
    width: 140px;
    height: 50px;
    margin: 10px;
    padding: 8px;
    box-sizing: border-box;

    border: 3px solid lightgreen;
    border-radius: 15px;

    background: transparent;
    color: #8fd3ff;

    font-family: inherit;
    font-size: 28px;
    font-weight: 700;

    cursor: default;
    opacity: 0.6;

    outline: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-appearance: none;
    appearance: none;

    pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
    #touchChoice:hover,
    #mouseChoice:hover {
        color: white;
        border-color: white;
        background-color: grey;
    }
}

#touchChoice.input-active,
#mouseChoice.input-active {
    opacity: 1;
    pointer-events: auto;
    cursor: pointer;
}

#touchChoice.is-tap-active,
#mouseChoice.is-tap-active {
    color: white !important;
    border-color: white !important;
    background-color: grey !important;
}

@media (hover: hover) and (pointer: fine) {
    #touchChoice.input-active:hover,
    #mouseChoice.input-active:hover {
        color: white;
        border-color: white;
        background-color: grey;
    }
}

/* =========================================================
   PRZYCISK CLEAR / DOWN_SOLUTER_L
   ========================================================= */

@media (hover: hover) and (pointer: fine) {
    .putter:hover {
        color: white;
        border: 3px solid white;
        background-color: grey;
    }
}


/* =========================================================
   DOTYKOWE PODŚWIETLENIE PRZYCISKÓW
   ========================================================= */

@media (hover: none) and (pointer: coarse) {
    .putter:not(.is-tap-active):hover {
        color: #8fd3ff !important;
        border-color: lightgreen !important;
        background-color: transparent !important;
    }
}

/* =========================================================
   KOMUNIKAT PODCZAS POSZUKIWANIA ROZWIĄZANIA
   ========================================================= */

.solving-message {
    white-space: nowrap;
}

.solving-dots {
    display: inline-block;
    width: 3ch;
    text-align: left;
}

.solving-dots::after {
    content: "";
    animation: solvingDots 2.4s steps(1, end) infinite;
}

@keyframes solvingDots {
    0%   { content: ""; }
    25%  { content: "."; }
    50%  { content: ".."; }
    75%  { content: "..."; }
    100% { content: ""; }
}

/* =========================
 STAN PRZYCISKU START NA TOUCH
   ========================= */


@media (hover: none) and (pointer: coarse) {
    #entrancePanel:not(.input-disabled):hover {
        border-color: white;
        background-color: grey;
        box-shadow: none;
    }
}
