/* Global styles */
@font-face {
    font-family: 'pokemon-font';
    font-style: normal;
    font-weight: normal;
    src: local('pokemon-font'), url('pokemon-font.ttf') format('truetype');
}
body, input {
    font-size: 16px;
    line-height: 22px;
    font-smooth: never;
    -webkit-font-smoothing: none;
    font-family: 'pokemon-font', monospace;
}
body {
    overflow: hidden;
    cursor: default;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
img {
    /* https://stackoverflow.com/a/8888964 */
    image-rendering:optimizeSpeed;             /* Legal fallback */
    image-rendering:-moz-crisp-edges;          /* Firefox        */
    image-rendering:-o-crisp-edges;            /* Opera          */
    image-rendering:-webkit-optimize-contrast; /* Safari         */
    image-rendering:optimize-contrast;         /* CSS3 Proposed  */
    image-rendering:crisp-edges;               /* CSS4 Proposed  */
    image-rendering:pixelated;                 /* CSS4 Proposed  */
    -ms-interpolation-mode:nearest-neighbor;   /* IE8+           */
}

/* Page footer */
#website-link {
    position: fixed;
    display: block;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 24px;
    line-height: 24px;
    font-size: 8px;
    cursor: pointer;
    background-color: #fff;
    color: #999;
    text-align: center;
    text-decoration: none;
    z-index: 200;
}

/* Re-used classes */
.box, .full-width-box {
    border-style: double;
    border-width: 8px;
    border-color: #000;
    border-radius: 8px;
    padding-top: 4px;
    padding-bottom: 4px;
    padding-left: 4px;
    padding-right: 4px;
}
.full-width-box {
    width: 288px;
}
.button-icon, .button-icon-tall {
    cursor: pointer;
    background-color: #fff;
    width: 16px;
}
.button-icon {
    height: 16px;
}
.button-icon-tall {
    height: 24px;
}

/* Search pages */
#search-page {
    position: relative;
    width: 312px;
    height: 100%;
    z-index: 100;
    margin: 0 auto;
    overflow: hidden;
}
.search-page-content {
    position: absolute;
    left: 0;
    right: -20px;
    top: 48px;
    bottom: 0;
    padding-bottom: 24px;
    overflow-y: scroll;
}
#search-input {
    position: absolute;
    top: 0;
    width: 100%;
    border-width: 2px;
    border-color: #000;
    border-radius: 4px;
    height: 40px;
    line-height: 40px;
    padding: 8px;
    text-transform: uppercase;
}
.search-result-row {
    width: 100%;
    width: 312px;
    line-height: 32px;
}

/* Pokemon search page */
.search-pkmn-number {
    display: inline-block;
}
.search-pkmn-name {
    display: inline-block;
    float: right;
}
.search-pkmn-thumb {
    display: inline-block;
    float: right;
    width: 28px;
    height: 28px;
    margin-left: 8px;
    margin-top: 3px;
    margin-bottom: -10px;
}

/* Pokedex entry page */
#page-container-container {
    position: absolute;
    display: table;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
}
#page-container {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    width: 312px;
    height: 470px;
    margin: auto;
}
.page {
    position: relative;
    width: 100%;
    height: 100%;
}
.pkmn-page-header {
    cursor: pointer;
}
.pkmn-name {
    display: inline;
}
.pkmn-number {
    float: right;
}
.under-header-data {
    position: relative;
    width: 100%;
    margin: 16px 0;
}
.pkmn-thumb {
    position: absolute;
    top: 8px;
    right: 16px;
    width: 56px;
    height: 56px;
}
/* Prev/next page buttons */
.page-footer {
    position: absolute;
    bottom: 0;
    width: 100%;
}
.page-prev {
    display: inline-block;
    float: left;
    margin-left: 16px;
}
.page-next {
    display: inline-block;
    float: right;
    text-align: right;
    margin-right: 16px;
}
.page-prev, .page-next {
    display: table-cell;
    padding-bottom: 2px;
    cursor: pointer;
    width: 96px;
}

/* Pokemon description page */
#pkmn-type {
    text-align: right;
}
.image-container {
    width: 100%;
    height: 128;
    margin: 32px 0;
    text-align: center;
}
#pkmn-image {
    width: 112px;
    height: 112px;
    margin-top: 8px;
}
#description-data {
    position: absolute;
    height: 154px;
    bottom: 32px;
    padding-right: 0;
}
#description-gold, #description-silver, #description-crystal {
    width: 296px;
}
.description-next {
    position: absolute;
    bottom: 56px;
    right: -13px;
    text-align: center;
}
.description-prev {
    position: absolute;
    bottom: 56px;
    left: -13px;
    text-align: center;
}

/* Pokemon stats page */
#pkmn-category {
    margin-left: 16px;
}
#pkmn-height {
    margin-left: 16px;
}
#pkmn-weight {
    margin-left: 16px;
}
#base-stats-data {
    position: absolute;
    bottom: 32px;
    height: 264px;
}
.stat-row {
    display: inline-block;
    /*width: 136px;*/
    width: 100%;
}
.stat-amount {
    width: 100%;
    text-align: right;
}

/* Pokemon evolution page */
#evolution-data {
    position: relative;
    width: 100%;
    margin-top: 16px;
}
.evolution-row {
    position: relative;
    margin: 0 16px;
    height: 64px;
}
.evolution-target {
    margin-left: 80px;
}
.evolution-method {
    margin-left: 80px;
}
.evolution-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 56px;
    height: 56px;
}
.evolves-from-header {
    margin: 0 16px;
    margin-bottom: 16px;
}
.evolves-to-header {
    margin: 0 16px;
    margin-bottom: 16px;
}
.evolves-nope {
    margin: 0 16px;
}

/* Pokemon moves page */
#pkmn-moves-data-container {
    position: absolute;
    width: 100%;
    top: 88px;
    height: 320px;
    overflow: hidden;
}
#pkmn-moves-data {
    position: absolute;
    right: -30px;
    left: 0;
    height: 320px;
    overflow-y: scroll;
}
.moves-row {
    position: relative;
    width: 280px;
    margin-left: 16px;
    height: 32px;
}
.move-name {
    display: inline-block;
}
.move-method {
    display: inline-block;
    float: right;
}
#moves-up, #moves-down {
    width: 100%;
    text-align: center;
    height: 16px;
}
#moves-up {
    margin-top: 12px;
    color: #ccc;
}
#moves-down {
    position: absolute;
    bottom: 48px;
}
/* Move detail popup */
#move-detail-view {
    position: absolute;
    bottom: 32px;
    cursor: pointer;
}
.move-detail-info {
    /*height: 208px;*/
    height: 192px;
}
.move-detail-name {
    display: inline;
}
.move-detail-machine {
    float: right;
}
.move-detail-type {
    text-align: right;
}
.move-detail-data {
    width: 100%;
    margin-top: 16px;
}
.move-detail-power {
    margin-left: 16px;
}
.move-detail-accuracy {
    margin-left: 16px;
}
.move-detail-pp {
    margin-left: 16px;
}
.move-detail-description {
    margin-top: 16px;
}

/* Pokemon location page */
#pkmn-gender {
    margin-left: 16px;
}
#pkmn-catch-rate {
    margin-left: 16px;
}
#location-data {
    position: absolute;
    bottom: 32px;
    height: 288px;
    overflow: hidden;
}
#location-data-content-container {
    position: absolute;
    top: 0;
    height: 300px;
    left: 0;
    right: -20px;
    overflow-y: scroll;
}
#location-data-content {
    display: inline-block;
    position: absolute;
    left: 4px;
    right: 6px;
    padding-bottom: 4px;
    background-color: #fff;
}
#location-data-bg {
    position: absolute;
    left: 12px;
    bottom: 44px;
    width: 288px;
    opacity: 0.325;
    z-index: -1;
}

/* Pokemon breeding page */
#egg-group-header {
    margin-left: 16px;
}
#egg-group-name-1, #egg-group-name-2 {
    margin-left: 16px;
    width: 212px;
}
#egg-group-thumbs {
    position: absolute;
    height: 264px;
    bottom: 32px;
    overflow: hidden;
}
#egg-group-content-container {
    position: absolute;
    top: 0;
    height: 276px;
    left: 0;
    right: -20px;
    overflow-y: scroll;
}
#egg-group-content {
    display: inline-block;
    position: absolute;
    left: 4px;
    right: 6px;
    padding-bottom: 4px;
    background-color: #fff;
}
.egg-group-thumb {
    display: inline-block;
    width: 56px;
    height: 56px;
    margin: 8px;
}
