/* stilmall.css */
/* En enkel CSS-animation */
.shake {
    animation:
        flash_red 0.5s,
        shake 0.5s;

    animation-iteration-count: 1;
}

@keyframes shake {
    0% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    50% {
        transform: translateX(5px);
    }
    75% {
        transform: translateX(-5px);
    }
    100% {
        transform: translateX(0);
    }
}

/* En enkel CSS-animation */
.gold {
    animation: gold 1s;
    animation-iteration-count: 1;
}

@keyframes gold {
    from {
        color: black;
    }
    to {
        color: gold;
    }
}

@keyframes flash_red {
    from {
        color: black;
    }
    to {
        color: red;
    }
}

* {
    box-sizing: border-box;
    /* ipac */
    /* color: white; */
}

body {
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(90deg, #004d1a 10%, #009933 90%);

    /*  font-family: 'IBM Plex Mono', 'Courier New', monospace; */
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, Ubuntu, sans-serif;
    font-weight: 400;
    font-size: 14px;
}

.big-container {
    display: flex;
    flex-direction: row;

    padding: 4px;
    background-color: white;
    /* ipac */
    /*  background-color: black; */
    min-width: 660px;
    height: fit-content;
    margin-left: auto;
    margin-right: auto;
    margin-top: 10px;
    border-radius: 5px;
}

.container {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    width: fit-content;
}
.antal {
    position: relative;
    height: 16px;
    margin-top: 5px;
    width: fit-content;
    /* text-wrap: nowrap; */
    white-space: nowrap;
}

.response {
    font-family: 'IBM Plex Mono', 'Courier New', monospace;
    font-weight: 600;
    font-size: 28px;
    height: 56px;
    letter-spacing: 2px;
    color: black;
    /* text-wrap: nowrap; */
    white-space: nowrap;
    margin-top: 26px;
    display: inline-flex;
    justify-content: center;
    width: fit-content;
}

a {
    text-decoration: none;
    color: blue;
}

a:visited {
    color: blue;
}
a:hover {
    color: red;
    cursor: pointer;
}
/* Gemensamma stilar för alla spelknappar */
.letter,
.vid {
    font-family: 'IBM Plex Mono', 'Courier New', monospace;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    background-color: DarkGreen;

    border-radius: 4px;
    border-color: gray;
    border-style: solid;
    border-width: 2px;

    color: white;
    cursor: pointer;
    font-weight: 500;
}
.letter:disabled,
.letter:disabled:hover {
    color: gray;
    background-color: #000000;
    border-color: #000000;
    filter: brightness(0.8);
}

.letter:hover,
.vid:hover {
    background-color: firebrick;
    border-color: firebrick;
}

.letter:active,
.vid:active {
    border-color: darkgrey;
    filter: brightness(0.8);
}

.letter {
    width: 32px;
    height: 32px;
    font-size: 20px;
    text-rendering: optimizeLegibility;
    -moz-osx-font-smoothing: grayscale;
}

.vid {
    width: 120px;
    height: 32px;
    font-size: 18px;
    margin-bottom: 10px;
    margin-left: 2px;
    padding-bottom: 4px;
}

h1,
h2 {
    margin-bottom: 10px;
    color: DarkGreen;
}
h4,
p {
    margin: 0;
}
.rectangle {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    width: 260px;
}

p.error {
    color: red;
}
p.success {
    color: DarkGreen;
}

table.statistik {
    border-collapse: collapse;

    margin-right: 10px;
}

table.statistik tr:nth-child(even) {
    /* ipac */
    background-color: rgb(246, 242, 205);
    /* background-color: darkblue; */
}

table.statistik th {
    font-weight: 600;
    width: 40px;
}

table.statistik th.antaltecken {
    font-weight: 600;
    width: 40px;
}

table.statistik td,
th {
    border-style: solid;
    border-width: 1px;
    font-size: 12px;
    font-weight: 600;
    padding-right: 2px;
    border-color: DarkGreen;
}
th {
    line-height: 12px;
    height: 50px;
}

th.antaltecken {
    color: blue;
}

th.antaltecken:hover {
    color: red;
    cursor: pointer;
}

th.bokstav {
    color: blue;
}

th.bokstav:hover {
    color: red;
    cursor: pointer;
}

table.statistik td {
    font-variant-numeric: tabular-nums; /* Garanterar att siffror står rakt under varandra */

    text-align: right;
}

footer {
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-top: 10px;
    border-radius: 4px;
    font-size: 14px;
    background-color: white;
    padding: 10px;
    min-width: 660px;
}

fieldset {
    margin-top: 6px;
    width: fit-content;
    height: 230px;
    padding-left: 6px;
    border-style: solid;
    border-width: 1px;
    border-color: DarkGreen;
}

.labeltext {
    margin-left: 10px;
}

.hela {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    width: max-content;
    padding: 8px;
}

.hela_statistik {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    height: fit-content;
    padding-right: 14px;
}

.table {
    margin: 0;
}

.radioselect {
    cursor: pointer;
}

.ordlista {
    padding: 0;
}

.ordlista_sammlat {
    display: flex;
    flex-direction: row;
}
.save {
    min-width: 200px;
    height: 231px;
}
#lyckade {
    color: DarkGreen;
    margin-bottom: 10px;
}

#felaktiga {
    color: red;
    margin-bottom: 10px;
}

#gissningar {
    margin-bottom: 10px;
}

.row {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
}

#reset {
    margin-top: 14px;
}

#p_lyckade,
#p_felaktiga {
    margin-left: 4px;
}

.lyckade {
    color: DarkGreen;
}

.felaktiga {
    color: red;
}

#bokstavar_ord {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

#gissningar,
.gissningar {
    margin-right: 10px;
}

fieldset.ordlista {
    height: 180px;
}

fieldset.statistics {
    height: 112px;
    width: inherit;
}

fieldset#previous_word {
    height: 45px;
    width: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
}

div#ordlista_senaste {
    display: flex;
    flex-direction: column;
}

#tabell {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
}

.cookies {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    background-color: white;
    border-radius: 4px;
    font-size: 16px;
    margin: 10px;
    height: 400px;
    background-color: transparent;
}
.cookies2,
.cookies3 {
    width: 26vw;
    padding: 12px;
    height: inherit;
    background-color: white;
}
.cookies2 {
    border-right-color: darkgreen;
    border-right-style: solid;
    border-right-width: 3px;
    border-radius: 4px;
}
.cookies3 {
    border-left-color: darkgreen;
    border-left-style: solid;
    border-left-width: 3px;
    border-radius: 4px;
}

#close {
    margin-top: 10px;
}

/*
th[data-sort-dir='asc']::after {
    content: ' ↑';
}
th[data-sort-dir='desc']::after {
    content: ' ↓';
}
*/
@media only screen and (max-width: 1290px) {
    .cookies2,
    .cookies3 {
        width: 38vw;
    }
}
@media only screen and (max-width: 960px) {
    .cookies2,
    .cookies3 {
        width: 48vw;
    }
}
@media only screen and (max-width: 720px) {
    .cookies {
        flex-direction: column;
        align-items: center;
        height: fit-content;
    }

    .cookies2,
    .cookies3 {
        border: none;
        border-radius: 0;
        width: 96vw;
    }

    body {
        background: white;
        font-weight: 600;
    }
    table.statistik {
        margin-top: 10px;
        margin-left: 0;
        padding: 0;
    }

    .container {
        margin: 0;
        padding: 0;
        align-items: center;
    }
    .big-container {
        flex-direction: column-reverse;
        align-items: center;
        border: none;
        border-radius: 0;
        padding: 0;
        min-width: 0;
        width: 96vw;
    }

    .ordlista_sammlat {
        flex-direction: column;
        align-items: center;
        margin: auto;
        padding: 0;
    }

    fieldset {
        height: 240px;
    }

    .ordlista_sammlat,
    .save {
        width: inherit;
    }

    .letter {
        width: 34px;
        height: 34px;
    }

    #tabell {
        margin-top: 0;
    }

    footer {
        min-width: 96vw;
    }
}

@media only screen and (max-width: 500px) {
    /* Gör knapparna lite större för fingrar, men behåll raderna om de får plats */

    #div_explanation {
        font-size: 15px;
    }

    .response {
        font-size: 22px;
    }

    .letter {
        width: 38px;
        height: 38px;
    }

    /* Om du absolut vill att de ska radbrytas snyggt vid behov */
    table#keys tr {
        display: flex;
        justify-content: center;
    }
}

@media only screen and (max-width: 414px) {
    /* Gör om tabellen till en flex-box så knapparna kan flyta fritt */

    .response {
        font-size: 18px;
    }

    table#keys,
    table#keys tbody,
    table#keys tr {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        max-width: 100%;
    }

    table#keys td {
        display: block;
    }

    .letter {
        width: 40px; /* Lite större knappar på mobil är lättare för tummar! */
        height: 40px;
    }
}
