/*scramble specific styling*/
:root {
    --highlight: var(--scramble);
}

@media (prefers-color-scheme: light) {
    body {
        --highlight: var(--scramble);
    }
}

body {
    touch-action: manipulation;
    /*prevent text selection*/
    -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none; /* Safari, Chrome, Android */
    -khtml-user-select: none; /* Konqueror HTML */
    -moz-user-select: none; /* Firefox */
    -ms-user-select: none; /* Internet Explorer/Edge */
    user-select: none; /* Standard syntax */
    cursor: default; /* Optional: changes the cursor from a text-selection caret to a default arrow */
}

.game {
    display: flex;
    flex-direction: column;
    width: 18rem;
    height: 24rem;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.disabled {
    pointer-events: none;
}

button:disabled {
    opacity: 100%;
    background-color: var(--bg);
    color: var(--disabled);
    border-color: var(--disabled);
}

button {
    position: relative;
    background-color: var(--highlight);
}
@media (prefers-color-scheme: dark) {
    button {
        background-color: var(--bg);
        color: var(--highlight);
        border-color: var(--highlight);
    }
}

.button-progress {
    position: absolute;
    top: 0;
    left: 0;
    border-radius: calc(0.5rem - 2px);
    height: 100%;
    opacity: 50%;
    background-color: var(--highlight);
}

.buttons-div {
    display: flex;
}
.buttons-div > button {
    flex: 1;
}

.scramble-game {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    flex-grow: 1;
    justify-content: center;
}

.dispensers-div {
    display: flex;
    flex-shrink: 0;
    flex-grow: 1;
    justify-content:center;
    gap: 4px;
}

.dispenser {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items:center;
    align-self:stretch;
    /*padding: 0.5rem;*/
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.dispenser-button {
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: var(--highlight);
    border-radius: 50%;
    border-width: 2px;
    border-color: var(--text);
    border-style: solid;
    padding: 0;
}

.dispenser-stack {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    /*width: 1rem;*/
    /*border: 2px solid var(--text);*/
    /*border-radius: 0.5rem;*/
    /*padding: 0.25rem;*/
    align-items: center;
    justify-content: end;
    margin: auto;

}

.current-word {
    color: var(--text);
    font-size: 2rem;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;     /* Firefox */
    overflow-x: scroll;
}

.current-word::-webkit-scrollbar {
  display: none;
}

.letter {
    margin:-1px;
    font-size: 1.75rem;
    font-weight: 900;
    border-radius: 0.5rem;
    border-style: solid;
    border-width: 2px;
    border-color: var(--text);
    background-color: var(--bg);
    color: var(--text);
    text-align: center;
    width: 2.5rem;
    height: 2.5rem;
}

.row {
    display: flex;
}

.col {
    display: flex;
    flex-direction: column;
}

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

.highlight {
    background-color: var(--highlight);
    /*color: var(--bg);*/
}

@media (prefers-color-scheme: dark) {
    .highlight {
        color: var(--bg);
        border-color: var(--border);
    }
}

.score {
    margin-bottom: 0.5rem;
}

h1 {
    font-size: 2.5rem;
    padding-top: 0.5rem;
}

p {
    transition:
        color 100ms,
        font-weight 100ms;

}

p.highlight {
    color: var(--highlight);
    background-color: var(--bg);
    font-weight: 900;
}

dialog {
    border-radius: 1rem;
    border-width: 4px;
    border-color: var(--text);
    background-color: var(--highlight);
    transform: translate(0%, -100%);
    animation: fadeout 0.25s ease-in forwards;
}

dialog[open] {
    animation: fadein 0.25s ease-in forwards;
}

@keyframes fadein{
    0%{
        transform: scale(0);
        opacity: 0;

    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes fadeout{
    0%{
        opacity: 1;
    }
    100%{
        opacity: 0;
    }
}