@font-face {
  font-family: 'Outfit';
  src: url('_shared/fonts/outfit-latin-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

* {
  margin: 0;
  padding: 0;
  font-family: 'Outfit', sans-serif;
}

html {
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
}

body {
  background: #f2e9eb;
  padding: 0 10vw;
  font-family: 'Outfit', sans-serif;
  display: flex;
  justify-content: center;
  background: #faf8f7;
  width: 100%;
  padding-top: 64px;
  position: relative;
}

h1,
h2,
h3,
h4 {
  color: #2a0d17;
  margin: 5px;
  text-align: center;
}

h4 {
  margin-top: 15px;
}

span {
  color: #7b6a70;
}

.font-size-12 {
  font-size: 12px;
}

.font-size-18 {
  font-size: 18px !important;
}

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

.row {
  display: flex;
  flex-direction: row;
}

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

.width-100 {
  width: 100%;
}

.container {
  border: 1px solid rgba(91, 28, 50, 0.08);
  border-radius: 20px;
  box-shadow: rgba(91, 28, 50, 0.1) 0 10px 18px;
  padding: 15px;
  background-color: #fff;
}

input {
  border: none;
  outline: none;
  font-size: 18px;
  flex: 1;
}

.margin-5 {
  margin: 5px;
}

.hide {
  display: none !important;
}

.bold {
  font-weight: bold;
}

.type-container {
  border-radius: 5px;
  padding: 3px 7px;
  color: black;
  margin: 5px;
  margin-top: 10px;
  font-weight: 600;
  font-size: 14px;
  opacity: 0.8;
}

.loading-ball {
  height: 60px;
  animation: pulseMark 1.6s ease-in-out infinite;
}

@keyframes pulseMark {
  0%,
  100% {
    transform: scale(0.92);
    opacity: 0.75;
  }
  50% {
    transform: scale(1.04);
    opacity: 1;
  }
}

/*List Container*/
#pokedex-list {
  margin-right: 350px;
  width: 100%;
}

/*Search*/
#search-bar-container {
  margin: 30px 10px;
}

#start-search-button {
  background-color: #8a1f3d;
  height: 40px;
  width: 40px;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: #8a1f3d55 5px 5px 15px;
  color: white;
  font-size: 18px;
}

#start-search-button:hover {
  opacity: 0.8;
  box-shadow: #8a1f3d77 3px 3px 13px;
}

/*Render search results*/
#pokedex-list-render-container {
  display: flex;
  flex-flow: wrap row;
  justify-content: center;
}

.pokemon-render-result-container {
  flex: 0.5;
  min-width: 20%;
  margin: 10px;
  margin-top: 60px;
  padding-top: 40px;
  position: relative;
  cursor: pointer;
  border: 2px solid white;
  transition-duration: 100ms;
}

.pokemon-render-result-container:hover {
  border: 2px solid #d9b7c2;
}

.pokemon-render-result-container:hover .search-pokemon-image {
  transform: scale(1.15);
}

.search-pokemon-image {
  position: absolute;
  top: -70px;
  height: 96px;
  width: 96px;
  object-fit: contain;
  object-position: center bottom;
  image-rendering: pixelated;
  transition-duration: 100ms;
}

#loading-div {
  height: 100vh;
  position: absolute;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99;
  background-color: #faf8f7;
}

.hideLoading {
  animation: hideLoading ease-in-out 0.5s;
  animation-fill-mode: forwards;
}

@keyframes hideLoading {
  0% {
    top: 0;
  }
  100% {
    top: -100vh;
  }
}

/*Current Pokemon*/
#current-pokemon-container {
  width: 320px;
  margin: 10px;
  height: calc(82vh - 40px);
  position: fixed;
  right: calc(10vw - 20px);
  padding: 0 15px;
  text-align: center;
  bottom: 0;
  margin-bottom: 0;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

#current-pokemon-info {
  margin-top: 6vh;
  height: 100%;
  display: flex;
  flex-direction: column;
  -ms-overflow-style: none; /* for Internet Explorer, Edge */
  scrollbar-width: none; /* for Firefox */
  overflow-y: scroll;
}

#current-pokemon-info::-webkit-scrollbar {
  display: none; /* for Chrome, Safari, and Opera */
}

#current-pokemon-image {
  position: absolute;
  right: 0;
  left: 0;
  bottom: calc(100% - 10px);
  margin-right: auto;
  margin-left: auto;
  object-fit: contain;
  image-rendering: pixelated;
  max-width: 350px;
  max-height: 24vh;
}

#current-pokemon-loading {
  opacity: 0.08;
  position: fixed;
  right: calc(10vw - 10px);
  object-fit: contain;
  width: 350px;
  top: 175px;
  bottom: 0;
  margin-top: auto;
  margin-bottom: auto;
  z-index: -1;
}

.pokemon-info-variable-container {
  width: 100%;
  background-color: #f2e9eb;
  padding: 8px 0;
  border-radius: 30px;
  margin: 5px;
}

.current-pokemon-stats-container {
  background: #f2e9eb;
  display: flex;
  padding: 5px;
  border-radius: 30px;
  margin: 5px;
}

.current-pokemon-stats-container h5 {
  margin: 6px 0;
}

.current-pokemon-stats-name {
  border-radius: 50%;
  height: 25px;
  width: 25px;
  color: white;
  font-weight: bold;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 10px;
}

.current-pokemon-evolution-image {
  height: 74px;
  width: 74px;
  cursor: pointer;
  border-radius: 30%;
}

.current-pokemon-evolution-image:hover {
  background-color: rgba(0, 0, 0, 0.03);
}

.current-pokemon-evolution-level-container {
  width: 50px;
  background-color: #f2e9eb;
  padding: 8px 0;
  border-radius: 30px;
  margin: 5px;
}

/*Animations*/

.slide-out {
  animation: slideOut ease-in-out 0.35s;
  animation-fill-mode: forwards;
}

@keyframes slideOut {
  0% {
    bottom: 0;
  }
  100% {
    bottom: -100vh;
  }
}

.slide-in {
  animation: slideIn ease-in-out 0.35s;
  animation-fill-mode: forwards;
}

@keyframes slideIn {
  0% {
    bottom: -100vh;
  }
  100% {
    bottom: 0;
  }
}

/*Back to top*/
#back-to-top-button {
  background-color: #faf8f7;
  box-shadow: rgba(91, 28, 50, 0.1) 0 10px 18px;
  position: fixed;
  bottom: 20px;
  right: 20px;
  cursor: pointer;
  height: 50px;
  width: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  z-index: 1;
}

#back-to-top-button:hover {
  opacity: 0.5;
}

#back-to-top-button img {
  height: 16px;
}

/*Responsive*/

#current-pokemon-responsive-background {
  height: 100%;
  position: fixed;
  width: 100%;
  z-index: 1;
  display: none;
  transition: 0.35s;
}

#current-pokemon-responsive-close {
  position: fixed;
  top: 10px;
  right: 10px;
  background-color: #f2e9eb;
  cursor: pointer;
  z-index: 2;
  padding: 10px;
  border-radius: 10px;
  display: none;
  height: 22px;
  transition: 0.35s;
}

#current-pokemon-responsive-close:hover {
  opacity: 0.5;
}

@media (max-width: 1100px) {
  #pokedex-list {
    margin: 0;
  }

  .pokemon-render-result-container {
    min-width: 25%;
    margin-right: 8px;
    margin-left: 8px;
  }

  body {
    padding: 0 5vw;
  }

  #current-pokemon-container {
    z-index: 2;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    width: calc(100% - 30px);
    display: none;
  }

  #current-pokemon-responsive-close {
    display: unset;
  }

  #current-pokemon-responsive-background {
    display: unset;
  }

  #current-pokemon-loading {
    display: none;
  }
}

@media (min-width: 1100px) {
  #current-pokemon-container {
    display: flex !important;
  }
}

@media (max-width: 380px) {
  .pokemon-render-result-container {
    flex: unset;
    width: 100%;
  }

  body {
    width: 90%;
  }

  #search-bar-container {
    margin: 40px 0;
  }
}

/* ---------- Ingenio con Aguilar: barra superior, créditos, modo incrustado ---------- */
.dtop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(14px, 4vw, 32px);
  background: linear-gradient(100deg, #2a0d17, #5b1c32);
  color: #faf8f7;
  box-shadow: 0 6px 24px rgba(42, 13, 23, 0.25);
}
.dtop a {
  color: #faf8f7;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}
.dtop__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.dtop__brand span {
  color: #faf8f7;
  font-size: 15px;
}
.dtop nav {
  display: flex;
  gap: 8px;
  align-items: center;
}
.dtop nav a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(250, 248, 247, 0.28);
}
.dtop nav a:hover {
  background: rgba(250, 248, 247, 0.12);
}
.credits {
  box-sizing: border-box;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  padding: 32px 12px 48px;
  font-size: 12px;
  line-height: 1.6;
}
.credits span,
.credits a {
  color: #7b6a70;
}
.credits a {
  text-decoration: underline;
  text-underline-offset: 2px;
}
html.embed .dtop {
  display: none;
}
html.embed body {
  padding-top: 12px;
}
html.embed #current-pokemon-container {
  height: calc(82vh + 10px);
}
@media (max-width: 520px) {
  .dtop__brand span {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Mejoras: filtros, favoritos, barras y debilidades ---------- */
.tools {
  box-sizing: border-box;
  width: 100%;
  max-width: 760px;
  margin: -8px auto 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
}
.tools__row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  align-items: flex-end;
}
.sel {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #7b6a70;
}
.sel span {
  color: #7b6a70;
}
.sel select {
  min-height: 42px;
  padding: 0 34px 0 14px;
  border-radius: 999px;
  border: 2px solid #fff;
  background: #fff
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%232a0d17' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E")
    no-repeat right 14px center;
  color: #2a0d17;
  font: inherit;
  font-size: 14px;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
.sel select:hover,
.pill:hover {
  border-color: #d9b7c2;
}
.sel select:focus-visible,
.pill:focus-visible,
.tchip:focus-visible,
.fav-btn:focus-visible,
.card-open:focus-visible {
  outline: 3px solid #5b1c32;
  outline-offset: 2px;
}
.pill {
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  border: 2px solid #fff;
  background: #fff;
  color: #2a0d17;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s,
    border-color 0.15s;
}
.pill[aria-pressed='true'] {
  background: #5b1c32;
  border-color: #5b1c32;
  color: #faf8f7;
}
.pill--ghost {
  background: transparent;
  border-color: #d9b7c2;
}
.types {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.tchip {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 2px solid var(--c);
  background: #fff;
  color: #2a0d17;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s;
}
.tchip[aria-pressed='true'] {
  background: var(--c);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}
.tchip--static {
  min-height: 0;
  padding: 4px 12px;
  cursor: default;
  font-size: 12px;
  background: var(--c);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}
.tchip--static b {
  margin-left: 4px;
}
.count {
  margin: 0;
  font-size: 13px;
  color: #7b6a70;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  padding: 6px 4px 2px;
}
.pokemon-render-result-container {
  overflow: visible;
}
.card-open {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
  z-index: 1;
  padding: 0;
}
.card-open:focus-visible {
  outline-offset: -4px;
}
.fav-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  background: rgba(250, 248, 247, 0.9);
  color: #c9b4bb;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition:
    transform 0.15s,
    color 0.15s;
}
.fav-btn:hover {
  transform: scale(1.12);
}
.fav-btn[aria-pressed='true'] {
  color: #df2140;
}
.fav-btn--inline {
  position: static;
  margin-left: 10px;
  background: #fff;
}
.idrow {
  display: flex;
  align-items: center;
  justify-content: center;
}
.bars {
  display: flex;
  flex-direction: column;
  gap: 7px;
  width: 100%;
  padding: 4px 6px 6px;
  box-sizing: border-box;
}
.bar {
  display: grid;
  grid-template-columns: 38px 34px 1fr;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
}
.bar__n {
  color: #7b6a70;
}
.bar__v {
  color: #2a0d17;
  text-align: right;
}
.bar__t {
  height: 8px;
  border-radius: 999px;
  background: #efe6e9;
  overflow: hidden;
}
.bar__f {
  display: block;
  height: 100%;
  border-radius: 999px;
  width: 0;
  transition: width 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.bar--tot {
  grid-template-columns: 38px 34px;
  padding-top: 4px;
  border-top: 1px dashed #d9b7c2;
}
.search-pokemon-image {
  pointer-events: none;
}
#pokedex-list-render-container {
  position: relative;
  z-index: 0;
}

/* Barra superior fija: en pantallas chicas el media query de arriba reseteaba el padding y tapaba el buscador */
body[data-slug] {
  padding-top: 64px;
}
