/* General Styling */
html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Sigmar';
}

.search-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

#search-input {
    padding: 8px;
    background-color: rgb(255, 206, 58);
    border: 2px solid rgb(42, 107, 178);
    box-shadow: 0 0 15px rgba(32, 50, 108, 0.5);
}

#top-btn {
    position: fixed;
    display: flex;
    justify-content: center;
    align-items: center;
    bottom: 28px;
    right: 28px;
    background-color: rgba(0, 0, 0, 0.1);
    padding: 8px;
    border-radius: 100%;
    cursor: pointer;
    z-index: 99;
}

.main-content {
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn {
    border-radius: 40px;
    margin-top: 4px;
    padding: 8px;
    border: 0;
    position: relative;
    z-index: 2;
}

.d-none {
    display: none !important;
}

.no-scroll {
    overflow: hidden;
}

.no-pointer {
    pointer-events: none;
}

.layer1 {
    z-index: 1 !important;
}

.o-none {
    opacity: 0;
}


/* Header */
header {
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
    transition: .4s;
    gap: 8px;
}

header img:first-child {
    cursor: pointer;
}

/* Footer */
footer {
    margin-top: 64px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-bottom: 16px;
}

footer div:last-child {
    display: flex;
    flex-direction: column;
    text-align: center;
}

footer a {
    text-decoration: none;
    font-size: 0.8rem;
    color: rgba(0, 0, 0, 0.3);
}


/* Pokedex Card */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    display: flex;
    justify-content: center;
    align-items: center;
    transform: rotate(-90deg);
    transform-origin: 0 0;
    transition: .6s ease-in-out;
    opacity: 0;
}

#pokedex {
    display: flex;
    flex-direction: column;
    position: relative;
    min-height: 80vh;
    width: 380px;
    color: white;
    text-align: center;
    border-radius: 24px;
    box-shadow: 0 0 20px 1px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

#pokedex::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    background-color: white;
    z-index: -1;
    border-radius: 24px;
}

#card-bg {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 250px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
    transition: 0.5s ease;
    /* transition-delay: 525ms; */
    z-index: 1;
}

.pokemon-cards::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 250px;
    border-radius: 8px;
    transition: 0.5s ease;
    /* transition-delay: 525ms; */
    background-color: white;
    z-index: 1;

}

#nextPokemon {
    height: 100px;
    filter: brightness(0.7);
    cursor: pointer;
    transition: .3s ease;
    border-radius: 16px;
    opacity: 0.5;
}

.nextPokemon-container {
    height: 100px;
    /* Needed for lazy loading img to not disrupt layout */
    width: 100px;
    /* Needed for lazy loading img to not disrupt layout */
    cursor: pointer;
    margin-left: 8px;
    position: relative;
}

.nextPokemon-container::before {
    content: url(../img/loading-btn.png);
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: -2;
    border-radius: 50%;
    overflow: hidden;
    filter: brightness(0.4);
    opacity: 0.5;
    transition: .3s ease;
}

.nextPokemon-container:hover::before,
.nextPokemon-container:hover #nextPokemon {
    filter: brightness(1);
    opacity: 1;
}

#prevPokemon {
    width: 100px;
    filter: brightness(0.7);
    cursor: pointer;
    transition: .3s ease;
    opacity: 0.5;
}

.prevPokemon-container {
    height: 100px;
    /* Needed for lazy loading img to not disrupt layout */
    width: 100px;
    /* Needed for lazy loading img to not disrupt layout */
    margin-right: 8px;
    position: relative;
}

.prevPokemon-container::before {
    content: url(../img/loading-btn.png);
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: -2;
    filter: brightness(0.4);
    opacity: 0.5;
    transition: .3s ease;
}

.prevPokemon-container:hover::before,
.prevPokemon-container:hover #prevPokemon {
    filter: brightness(1);
    opacity: 1;
}

.prevPokemon-container-placeholder {
    margin-right: 8px;
    height: 100px;
    width: 100px;
}


/* Upper Part of the Card */
#pokedexSprite {
    align-self: center;
    max-width: 80%;
    filter: drop-shadow(0 0 15px rgba(0, 0, 0, 0.5));
    z-index: 1;
}

#pokeball-bg {
    width: 480px;
    opacity: 0.2;
    position: absolute;
    right: 0;
    bottom: 0;
    left: 60px;
    top: 120px;
    z-index: -1;
}

#pokedexOverview {
    display: flex;
    flex-direction: column;
    position: relative;
    height: 55%;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    overflow: hidden;
}

#cardHeading {
    margin: auto 8px;
    display: flex;
    justify-content: space-between;
}

#pokedexTypes {
    display: flex;
    gap: 8px;
    margin-left: 8px;
}

.type {
    min-width: 60px;
    text-align: center;
    padding: 8px;
    margin-bottom: 8px;
    border-radius: 40px 40px;
    border: 1px solid rgba(0, 0, 0, 0.5);
    text-shadow: 1px 0 0 #000, 0 -1px 0 #000, 0 1px 0 #000, -1px 0 0 #000;
}

#pokedexName {
    font-size: 3rem;
    font-family: 'Sigmar';
    text-shadow: 1px 0 0 #000, 0 -1px 0 #000, 0 1px 0 #000, -1px 0 0 #000;
}

#pokedexId {
    font-size: 1.5rem;
    text-shadow: 1px 0 0 #000, 0 -1px 0 #000, 0 1px 0 #000, -1px 0 0 #000;
}


/* Lower Part of the Card */
#pokedexStats {
    border-radius: 24px;
    background-color: white;
    flex: 1;
    font-family: sans-serif;
}

#pokedexStats nav button:hover {
    cursor: pointer;
}

#about-display {
    width: 100%;
    padding: 36px;
    text-align: left;
    font-family: sans-serif;
    font-size: 16px;
    color: #000;
}

#about-display td {
    padding: 4px;
}

#about-display tr td:first-child {
    color: rgba(0, 0, 0, 0.5);
}

#about-display tr td:last-child {
    font-weight: bold;
}

#pokedex-lower-line {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    bottom: 0;
    opacity: 0.6;
}

#pokedex-lower-line::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 40px;
    transform: translateY(-50%);
    height: 2px;
    width: 120px;
    background-color: rgba(0, 0, 0, 0.3);
}

#pokedex-lower-line::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 40px;
    transform: translateY(-50%);
    height: 2px;
    width: 120px;
    background-color: rgba(0, 0, 0, 0.3);
}

.modal-footer-container {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
}

#myChart {
    padding: 8px;
}

.evo-container div {
    margin-top: 36px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.arrow {
    height: 36px;
}

/* List of all Pokemon */
.pokemon-cards {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    width: 250px;
    height: 250px;
    border-radius: 8px;

    transition: 0.5s ease;
    cursor: pointer;
    margin: 50px 30px;
}

#listOfPokemon {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    padding-top: 100px;
    transition: .4s;
}

.pokeball-bg {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    position: relative;
    top: -21%;
    text-align: center;
    gap: 8px;
    z-index: 1;
    transition: 225ms;
}

.pokeball-bg::before {
    content: '';
    display: block;
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    margin: auto;
    width: 80%;
    height: 80%;
    opacity: 0.5;
    background-image: url('../img/pokeball-bg.png');
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}


/* Content of Cards */
.card-header {
    display: flex;
    flex-direction: column;
    text-shadow: 1px 0 0 #000, 0 -1px 0 #000, 0 1px 0 #000, -1px 0 0 #000;
    color: white;
    z-index: 1;
}

.card-header :first-child {
    font-size: 1.5rem;
}

.pokemon-types {
    display: flex;
    justify-content: center;
    gap: 8px;
    opacity: 0;
    visibility: hidden;
    transition: 225ms ease;
    text-shadow: 1px 0 0 #000, 0 -1px 0 #000, 0 1px 0 #000, -1px 0 0 #000;
    color: white;
    position: relative;
    bottom: 20%;
    z-index: 1;
}

.card-line {
    height: 1px;
    width: 80%;
    border-radius: 20%;
    background-color: rgba(0, 0, 0, 0.3);
    visibility: hidden;
    transition: 425ms ease-out;
    transform: scale(0, 1);
    z-index: 1;
}

.pokemon-sprite {
    width: 90%;
    height: 90%;
    z-index: 1;
    filter: drop-shadow(0 0 15px rgba(0, 0, 0, 0.5));
}

.pokemon-flavor {
    opacity: 0;
    visibility: hidden;
    text-shadow: 1px 0 0 #000, 0 -1px 0 #000, 0 1px 0 #000, -1px 0 0 #000;
    color: white;
    transition: 425ms ease;
    position: relative;
    top: -20%;
    text-align: center;
    font-size: 0.8rem;
    padding: 8px;
    /* transform: scale(1, 0); */
    font-family: cursive;
    font-size: 1rem;
    z-index: 1;
}


/* First Load */

#first-load {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: white;
    z-index: 99;
    transition: .5s ease-in-out;
}

#first-load div {
    width: 250px;
    cursor: default;
}


@media(max-width: 600px) {

    #next-pokemon-btn {
        display: none;
    }

    #prev-pokemon-btn {
        display: none;
    }

    #pokedex {
        height: 100svh !important;
        border-radius: 0;
        width: 100%;
    }

    #pokedexStats {
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
    }

    .modal-footer-container {
        position: unset;
        transform: translateX(0);
        margin-bottom: 8px;
    }

    #pokedexSprite {
        max-width: 60%;
    }

    header {
        display: flex;
        flex-direction: column;
    }

    #pokedex-lower-line img {
        content: url(../img/up-arrow.png);
    }

    .search-container img {
        display: none;
    }

    #search-input {
        opacity: 100%;
    }

    #listOfPokemon {
        padding-top: 36px;
    }
}