@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@300;900&display=swap');

@viewport {
    zoom: 1.0;
    width: device-width;
}

:root {

    --header-color: #fff;
    --header-bg-color: #333;

    --main--color: #369;
    --main-bg-color: #ccc;

    --hover-color: #c33;

    --card-color: #000;
    --card-bg-color: #fff;

    --dialog-color: #000;
    --dialog-bg-color: #fff;

    --button-color: #000;
    --button-bg-color: #ccc;

    --button-hover-color: #fff;
    --button-hover-bg-color: var(--hover-color);

}

* {
    border: 0;
    margin: 0;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}

body {
    height: 100vh;
    min-width: 320px;
    color: var(--main--color);
    background-color: var(--main-bg-color);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

header {
    color: var(--header-color);
    background-color: var(--header-bg-color);
    box-shadow: 0px 0px 8px #000;
    z-index: 2;
}

header *,
h1 {
    font-family: 'Merriweather', serif;
}

header h1 {
    white-space: nowrap;
    font-weight: 900;
    font-size: 24px;
}

i.pokedex-logo {
    display: inline-block;
    width: 32px;
    height: 32px;
    margin-right: 8px;
    background: url('./img/pokeball.png') no-repeat;
    background-size: 100% 100%;
    vertical-align:bottom;
}

/* RESPONSIVE MENU FOR NAV BAR */

/* Basic styling */
nav {
    width: 100%;
}
nav ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}
nav ul li {
    height: fit-content;
}
.menu .logo a {
    text-decoration: none;
    color: var(--header-color);
}
.menu .item a {
    display: block;
    width: 100%;
    color: var(--header-color);
    font-size: 16px;
    font-weight: bold;
    padding: 20px;
    white-space: nowrap;
    text-decoration: none;
}
.menu .item a:hover {
    color: var(--hover-color);
    background-color: var(--header-color);
}
.menu .item.search {
    height: 60px;
    align-items: center;
}
.menu .item.search input {
    color: var(--header-color);
    background-color: var(--header-bg-color);
    font-size: 16px;
    padding: 4px;
    border: #444 1px solid;
    vertical-align: bottom;
    outline: none;
    border-radius: 8px 0 0 8px;
}
.menu .item.search input:focus {
    border-color: #666;
    background-color: #000;
}
.menu .item.search input:disabled {
    color: #666;
    background-color: var(--header-bg-color);
}
.menu .item.search button {
    outline: none;
    color: var(--header-color);
    background-color: #444;
    padding: 1px 16px;
    font-size: 16px;
    border-radius: 0 8px 8px 0;
}
.menu .item.search button:focus {
    color: var(--hover-color);
    background-color: var(--header-color);
}
.menu .item.search button:disabled {
    color: #666;
}

/* Mobile menu */
.menu {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}
.logo {
    padding: 14px;
}
.toggle {
    order: 1;
    padding: 20px;
}
.item {
    order: 3;
    width: 100%;
    text-align: center;
    display: none;
    border-top: #444 1px solid;
    border-bottom: #222 1px solid;
}
.search {
    order: 2;
    padding: 12px;
    border: none;
}

.menu.active .item {
    display: block;
}

/* Tablet menu */
@media all and (min-width: 620px) {
    .menu { justify-content: center; }
    /* .logo { flex: 1; } */
    .search { flex: 1; order: 1; display: block; }
    .toggle { order: 2; text-align: right; }
}

/* Desktop menu */
@media all and (min-width: 800px) {
    /* .logo { flex: 1; } */
    .search { order: 1; }
    .item { order: 2; display: block; width: auto; border: none; }
    .toggle { display: none; }
}

/* FOOTER */

footer {
    height: 64px;
    color: var(--header-color);
    background-color: var(--header-bg-color);
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    box-shadow: 0px 0px 8px #000;
    z-index: 2;
}

footer * {
    font-family: 'Merriweather', serif;
}

/* MAIN CONTAINER */

main {
    height: 100%;
    overflow-y: scroll;
}

#pokedex-container {
    width: fit-content;
    margin: 0px auto;
    padding: 4px 4px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

#pokedex-container .card-mini {
    color: var(--card-color);
    background: var(--card-bg-color);
    background-size: 92px 92px;
    border-radius: 8px;
    padding: 8px;
    width: 110px;
    height: 150px;
    font-size: 12px;
    margin: 4px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    filter: brightness(90%);
}

#pokedex-container .card-mini:hover {
    cursor: pointer;
    filter: brightness(100%);
}

#pokedex-container .card-mini .head {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: start;
}

#pokedex-container .card-mini .head .type-icon {
    width: 16px;
    height: 16px;
}

#pokedex-container .card-mini img {
    width: 96px;
    height: 96px;
}

#pokedex-container .card-mini label {
    text-align: center;
}

/* STYLES FOR MODAL DIALOGS */

.modal-screen {
    width: 100%;
    height: 100%;
    background-color: black;
    background-color: rgba(0, 0, 0, 0.5);
    position: fixed;
    z-index: 0;
    left: 0;
    top: 0;
    overflow: auto;
}

.modal-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.modal-dialog {
    color: var(--dialog-color);
    background-color: var(--dialog-bg-color);
    padding: 0;
    border: none;
    border-radius: 8px;
    box-shadow: 4px 4px 16px black;
}

.modal-container {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.modal-header {
    color: var(--header-color);
    background-color: var(--header-bg-color);
    border-radius: 8px 8px 0 0;
    padding: 8px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.modal-header h4 {
    font-size: 1.5em;
    margin: 0 8px;
}

.modal-header .modal-close {
    color: var(--header-color);
    background-color: var(--header-bg-color);
    border-radius: 1em;
    border: none;
    width: 24px;
    height: 24px;
}

.modal-header .modal-close:hover {
    cursor: pointer;
    color: var(--hover-color);
    background-color: var(--header-color);
}

.modal-body {
    flex-grow: 1;
    padding: 20px;
}

.modal-body p {
    /* margin-bottom: 2em; */
    text-align: justify;
}

.modal-body label {
    display: block;
    margin-bottom: 1em;
}

.modal-footer {
    width: 100%;
    padding: 16px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: right;
}

.modal-footer button {
    color: var(--button-color);
    background-color: var(--button-bg-color);
    padding: 8px;
    margin-left: 4px;
    text-transform: uppercase;
    border-radius: 0.5em;
    border: none;
}

.modal-footer button:hover {
    color: var(--button-hover-color);
    background-color: var(--button-hover-bg-color);
}

.modal-header, .modal-body, .modal-footer {
    flex-shrink: 0;
}

.fade {
    transition: opacity 500ms;
    opacity: 0;
}

.fade.show {
    opacity: 1;
}

/* CARD BOX */

#cardbox {
    min-width: 320px;
    min-height: 200px;
}

/* SPRITES */
#cardbox #section-sprites {
    display: flex;
    flex-direction: column;
}
#cardbox #section-sprites div {
    display: flex;
    flex-direction: row;
    justify-content:space-around;
}
#cardbox #section-sprites div label {
    display: inline-block;
    margin-bottom: 0;
}
#cardbox #section-sprites input[type="checkbox"] {
    margin-bottom: 0;
}
#cardbox #section-sprites img.sprite {
    display: block;
    min-height: 192px;
    min-width: 192px;
    margin: 20px auto;
    filter: drop-shadow(0px 0px 4px #000);
}

/* SIZE */
#cardbox #section-size {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    margin-bottom: 1em;
}
#cardbox #section-size > * {
    margin: 0;
    text-align: center;
}

/* STATS */
#cardbox #section-stats {
    width: 100%;
}
#cardbox #section-stats #stats-container {
    width: 100%;
}
#cardbox #section-stats .table-stats {
    border: none;
    width: auto;
    border-collapse: collapse;
    border-spacing: 0;
    font-size: 0.75em;
    margin: 0 auto 16px;
}
#cardbox #section-stats td:first-child {
    padding-right: 16px;
}
#cardbox #section-stats td:last-child {
    text-align: right;
    padding-left: 16px;
}
#cardbox #section-stats .stat-bar {
    width: 125px;
    height: 8px;
    position: relative;
    border-radius: 5px;
    background-color: #eee;
}
#cardbox #section-stats .stat-bar-inner {
    height: 100%;
    border-radius: 5px;
}
#cardbox #section-stats .stat-bar-inner.hp {
    background-color: #4299e1;
}
#cardbox #section-stats .stat-bar-inner.attack {
    background-color: #f56565;
}
#cardbox #section-stats .stat-bar-inner.defense {
    background-color: #48bb78;
}

/* TYPES */
#cardbox #section-types {
    text-align: center;
}
#cardbox .type-slot {
    display: flex;
    flex-direction: row;
    color: white;
    min-width: 7em;
    padding: 4px;
    margin:  0 0.5em 0 0.5em;
    margin-bottom: 3px;
    border-radius: 1em;
    border: none;
    cursor: pointer;
}
#cardbox .type-slot .type-title {
    margin-top: 4px;
    margin-right: 16px;
    width: 100%;
    vertical-align: middle;
    text-align: center;
}
#cardbox .type-slot .type-icon {
    padding: 0;
    width: 24px;
    height: 24px;
    filter: drop-shadow(1px 1px 0px #fff)
        drop-shadow(-1px -1px 0px #fff)
        drop-shadow(-1px 1px 0px #fff)
        drop-shadow(1px -1px 0px #fff);
}
#cardbox .type-slot.current {
    border-radius: 1em 0.5em 0 0;
    margin-bottom: 0;
}
#cardbox .type-slot:hover {
    filter: brightness(120%);
}
#cardbox .tabify-tab {
    border: 3px solid;
    border-radius: 0.5em;
    padding: 16px;
}

#cardbox .table-damage {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #ccc;
    font-size: 0.75em;
}
#cardbox .table-damage th {
    background-color: #ccc;
    /* font-weight: normal; */
}
#cardbox .table-damage td {
    border: 1px solid #ccc;
}
#cardbox .table-damage td img {
    width: 16px;
}

/* TABIFY TABS */

.tabify-tabs-container {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.tabify-tabs-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0;
}

.tabify-tabs-header > li {
    cursor: pointer;
}

.tabify-tabs {
    margin: 0;
    padding: 0;
}

.tabify-tab {
    display: none;
}

.tabify-tab {
    display: flex;
}

/* SOME GENERAL FORMATTER CLASSES */

.left {
    text-align: left;
}

.right {
    text-align: right;
}

.center {
    text-align: center;
}

.expanded {
    width: 100%;
}

.hide {
    display: none !important;
}

.invisibe {
    visibility: hidden !important;
}

.disabled {
    filter:opacity(50%);
}

/* Movil splash */

.splash-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.splash {
    font-size: 1.5em;
    width: 100%;
    height: 100%;
    color: var(--header-color);
    background-color: var(--header-bg-color);
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.splash p {
    font-size: 0.75em;
}
.splash p.small {
    width: 320px;
    font-size: 0.5em;
    color: #666;
    text-align: center;
}
.splash a {
    color: var(--header-bg-color);
    background-color: var(--header-color);
    border-radius: 8px;
    text-transform: uppercase;
    text-decoration: none;
    padding: 8px;
    margin: 16px;
}

/* Tablet splash */
@media all and (min-width: 620px) {
    .splash {
        font-size: 2em;
        width: fit-content;
        height: fit-content;
        border-radius: 8px;
        box-shadow: 0 0 8px #000;
    }
    .splash img {
        height: 194px;
        width: 192px;
    }
    #help-container {
        font-size: 1.2em;
    }
}

#help-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 600px;
    margin: 0 auto;
    padding: 32px;
    overflow: auto;
}

#help-container p {
    margin-bottom: 1em;
}

/* End of Code */