:root{
    --secon: #CCC;
    --terc: #AAA;
    --quad: #999;
}

@font-face {
    font-family: kanit;
    src: url(../assets/Kanit/Kanit-Light.ttf);
}

*{
    box-sizing: border-box;
    font-family: kanit;
    image-rendering: pixelated;
}

img{
    object-fit: contain;
}

h2{
    margin: 0px 0px 10px 0px;
    line-height: 28px;
    text-align: center;
    font-size: 35px;
    overflow: visible;
}

html{
    height: 100%;
}

body{
    background: url(../assets/misc/Pokemon151pattern.jpg);
    padding: 0;
    margin: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
}

main{
    padding-top: 20px;
    width: 100%;
    max-width: 1400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.9)
}

.upper, .lower{
    padding: 0px 20px 20px 20px;
    width: 100%;
    display: flex;
    justify-content: space-around;
    gap: 20px;
    flex-wrap: wrap;
}

.block{
    min-width: 0;
    border-radius: 20px;
    background-color: var(--secon);
    padding: 20px;
}

#PokeImage{
    transform: translateY(20%);
    image-rendering: pixelated;
}

.pokeJump{
    animation-name: pokeJump;
    animation-duration: .2s;
    animation-timing-function: ease-in-out;
}

@keyframes pokeJump{
    0%{ transform: translateY(20%)}
    50%{ transform: translateY(0%)}
    100%{ transform: translateY(20%)}
}

#pokeImageDiv{
    aspect-ratio: 1/1 !important;
    padding-bottom: 10px;
    height: clamp(275px, 80vw, 375px);
    flex: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-direction: column;
    background-image: url(../assets/habitats/pokeframe.png), url(../assets/habitats/peak.png);
    background-size: cover !important;
    background-position: center;
}

.buttons{
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.buttons img{
    cursor: pointer;
}

.playSound{
    animation-name: playSound;
    animation-duration: 1s;
    animation-timing-function: ease-in-out;
}

@keyframes playSound {
    10%{ transform: rotate(30deg); }
    30%{ transform: rotate(-30deg);}
    50%{ transform: rotate(30deg);}
    70%{ transform: rotate(-30deg); }
    90%{ transform: rotate(30deg);}
}

.disabled{
    cursor: default !important;
}

.disabled#rotatePokemon{
    content:url("../assets/icons/rotate_disabled.svg");
}

.disabled#makeShiny{
    content:url("../assets/icons/shiny_disabled.svg");
}

.disabled#changeGender{
    content:url("../assets/icons/gender_disabled.svg");
}

#pokeInfo{
    flex: 4 1 350px;
    background-color: transparent;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0;
}

.infoUpper{
    display: flex;  
}

.infoUpper img{
    aspect-ratio: 1/1;
    height: 32px;
    width: 32px;
}

.infoUpper h1{
    font-size: calc(32px + 2vw);
    list-style: none;
    margin: 0;
    line-height: 48px;
}

#pokeNumber{
    font-style: italic;
    font-weight: 700;
    letter-spacing: 4px;
}

#badges{
    margin-left: 10px;
    display: flex;
    align-items: end;
    justify-content: start;
    flex-wrap: nowrap;
    flex: 1;
    gap: 5px;
}

#pokeDesc{
    width: 100%;
    text-align: justify;
    line-height: 16px;
    padding-bottom: 20px;
    font-style: italic;
}

.infoLower{
    background-color: var(--secon);
    margin: auto 0 0 0;
    border-radius: 20px;
    padding: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.infoLower h2{
    width: 100%;
}

#abilities{
    display: flex;
    width: 100%;
    gap: 10px;
}

.ability{
    display: grid;
    place-items: center;
    padding: 0 10px;
    border-radius: 10px;
    flex: 1;
    background-color: var(--terc);
    overflow: hidden;
    height: 80px;
    cursor: pointer;
}

.abilityName, .abilityDesc{
    grid-area: 1/1;
    text-align: center;
}

.abilityName{
    font-weight: 700;
    opacity: 1;
}

.abilityDesc{
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 16px;
    opacity: 0;
    overflow: hidden;
}

.invisible{
    display: none;
}

.opacity{
    opacity: 0;
}

.clicked .abilityName{
    opacity: 0;
}

.clicked .abilityDesc{
    opacity: 1;
}

.evoTree{
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.evolution{
    height: clamp(24px, 5vw, 64px);
}
.arrow{
    height: clamp(24px, 5vw, 64px);
}

#stats{
    flex: 3 1 200px;
}

#infoStats{
    height: 88%;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    font-size: 14px;
}

#infoStats div{
    display: flex;
    justify-content: space-between;
    font-weight: bold;
}

#infoStats progress{
    margin: 5px;
    height: 8px;
    border: none;
    border-radius: 20px;
    width: 100%;
}

progress::-webkit-progress-bar {
  background-color: var(--terc);
  border-radius: 20px;
}

progress::-webkit-progress-value {
    background-color: var(--color);
    border-radius: 20px;
    transition: width 0.2s ease, background-color 0.2s ease;
}

progress::-moz-progress-bar{
    background-color: var(--color);
    transition: width 0.2s ease, background-color 0.2s ease;
}

#miscDiv{
    flex: 2 1 300px;
    display: flex;
    flex-direction: column;
    padding-bottom: 0 !important;
}

h3{
    margin: 0;
    line-height: 30px;
    text-align: center;
}

#weaknesses{
    flex: 2 1 350px;
    min-height: 300px;
}

#weaknesses table{
    border-radius: 20px;
    width: clamp(200px, 100%, 100%);
    height: 85%;
    border-spacing: 0;
}

.weaknessCell{
    background-color: #EEE;
}

table tr:not(:first-child):not(.weakness) th{
    border-top: 3px solid white;
}

th{
    padding: clamp(5px, 1vw, 10px);
}


.weakness_2{   background-color: #0FD232; }
.weakness_4{   background-color: #017d18; }
.weakness_05{  background-color: #BB0000; }
.weakness_025{ background-color: #660000; }
.weakness_0{ background-color: #000000; color: white; }

.weakness{
    background-color: var(--main);
}

#moveset{
    flex: 3 1 375px;
    max-height: 350px;
    overflow: hidden;
}

#moves{
    height: 280px;
    overflow-y: auto;
    overflow-x: hidden;
    text-align: center;
    padding-right: 10px;
}

.move{
    background-color: var(--terc);
    width: 100%;
    padding: 10px 20px;
    margin-top: 10px;
    border-radius: 20px;
}

.move summary {
    width: 100%;
    list-style: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

details{
    transition: all .5 ease;
}

details summary::-webkit-details-marker {
    display: none;
}

.move summary::after{
    content: "▾";
    font-size: 30px;
    line-height: 16px;
}

.move[open] summary::aftefr{
    transform: rotate(180deg);
}

.moveContent{
    display: flex;
    gap: 0 clamp(5px, 1vw,10px);
}

.moveContent hr{
    border-color: var(--terc);
}

.moveArchetype{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.moveStats{
    display: flex;
    flex-direction: column;
    flex: 2;
    justify-content: center;
    gap: 5px;
}

.moveStat{
    font-family: monospace;
    font-size: clamp(10px, 16px, 20px);
    text-wrap: nowrap;
}

.moveMisc{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex: 2;
}

.learnMethod{
    text-align: center;
    line-height: 16px;
}

.moveType{
    height: 40px;
}

.moveMisc div{
    display: flex;
    align-items: center;
    gap: 5px;
}

.moveArchetype img{
    height: clamp(30px, 5vw, 60px);
}

.moveDesc{
    padding: 10px 0;
    text-align: justify;
    line-height: 16px;
}

#misc{
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    height: 100%;
}

#misc hr{
    width: 100%;
    height: 5px;
    background-color: var(--terc);
    border-radius: 5px;
    border: none;
}

.miscUpper, .miscLower{
    width: 100%;
    display: flex;
    justify-content: space-around;
}

.miscUpper{ height: 80px; }
.miscLower{ height: 160px; }

.miscUpper div{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.miscLower{
    flex-direction: column;
    text-align: center;
}

#forms{
    height: 140px;
    width: 100%;
    display: flex;
    flex-direction: row;
    text-align: center;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
}

.centered{
    display: flex;
    align-items: center;
    justify-content: center !important;
}

::-webkit-scrollbar {
    height: 8px;
    width: 8px;
}

 
::-webkit-scrollbar-thumb {
    background: #888; 
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555; 
}

.form{
    height: 120px;
    min-width: 100px;
    display: flex;
    flex-direction: column;
    line-height: 14px;
}

.form img{
    height: 80px;
    text-wrap: wrap;
}

.Easy {font-weight: 700; color: rgb(33, 225, 33);}
.Medium {font-weight: 700; color: rgb(255, 187, 0);}
.Hard {font-weight: 700; color: rgb(209, 12, 52);}
.Almost {font-weight: 700; color: rgb(125, 4, 125);} /* Almost Impossible */
 
#searchBar{
    position: fixed;
    bottom: 0;
    width: 900px;
    max-width: 100%;
    background-color: var(--quad);
    border-radius: 20px 20px 0 0;
    padding: 10px;
    display: flex;
    justify-content: space-evenly;
    gap: 5px;
    flex-wrap: nowrap;
    transition: transform .5s ease;
}

#barHandle{
    cursor: pointer;
    user-select: none;
    background-color: var(--quad);
    padding: 10px 50px;
    border-radius: 10px 10px 0 0;
    position: absolute;
    bottom: 65px;
    left: 10px;
    transition: transform .5s ease;
}

#barHandleContent{ transition: transform .5s ease;}

#searchBar.hidden{transform: translateY(70px);}
#barHandleContent.hidden{transform: rotate(180deg);}   

#searchBar button{
    cursor: pointer;
    border: none;
    padding: clamp(5px, 10px, 20px);
    font-weight: 700;
    line-height: 16px;
    background-color: white;
    height: 48px;
}

#input{
    font-size: clamp(12px, 16px, 20px);
    padding-left: 10px;
    height: 48px;
    flex: 6;
    font-style: italic;
    font-weight: 700;
    width: 100%;
    position: relative;
    border-radius: 15px 0 0 15px;
    border: none;
    text-wrap: nowrap;
}

.loading{
    background-image: url(../assets/icons/loading.gif); 
    background-size: 40px;
    background-position: left;
    background-repeat: no-repeat;
}

.noPokemonFound::placeholder{ color: red; }

.bar{
    display: flex;
    width: 50%;
}

.bar button{
    padding: 12px 15px 15px 0 !important;
    border-radius: 0 15px 15px 0;
}

.nextPrev{
    display: flex;
    gap: 3px;
    flex-wrap: nowrap;
    flex: 1 1;
}

.nextPrev button:nth-of-type(1){
    border-radius: 10px 0 0 10px;
}

.nextPrev button:nth-of-type(2){
    border-radius: 0 10px 10px 0;
}

#fullList, .RandomPokemon{
    width: 15%;
    flex: 1 1;
}

#fullList button, .RandomPokemon button{
    padding: 0 !important;
    font-size: clamp(10px, 1.5vw, 16px);
    text-wrap: wrap;
    border-radius: 10px;
    width: 100%;
}

#tooltip{
    position: fixed;
    border-radius: 20px;
    padding: 10px;
    background-color: var(--secon);
    transition: opacity .2s ease;
    pointer-events: none;
}

/* An empty content generates a triangle somehow... */
#tooltip::after{
    content:"";
    position:absolute;
    bottom:100%;
    left:50%;
    transform:translateX(-50%);

    border:10px solid transparent;
    border-bottom-color:var(--secon);
}