/* Main */

:root {
  --header-overlay: rgba(0, 0, 0, 0.6);
  --content-overlay: rgba(0, 0, 0, 0.35);
  --content-overlay-selected: rgba(48, 42, 9, 0.35);
  --default-border-radius: 6px;
  --pill-border-radius: 9999px;
  --disabled-color: #729b99;
  --disabled-color-alt: rgba(214, 214, 214, 0.5);
  --disabled-color-rgba: rgba(114, 155, 153, 0.5);
  --selected-color: #eed02a;
  --hover-color: #fcf6d4;
  --bold-font-weight: 600;
  --dark-text-color: #132544;
  --damage-banner-text-color: rgb(34, 34, 34);
  --summary-primary-color: #6c2fc8;
  --animation-distance: 900px;
}

body {
  font-family: "Roboto", sans-serif;
  font-weight: 400;
  font-size: 24px;
  color: white;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

canvas {
  margin: 0;
  padding: 0;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.flex,
.flex-center {
  display: flex;
  gap: 8px;
}

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

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

.fade {
  opacity: 1;
  transition: opacity 0.5s ease;
}

.fade.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Animations */

.button-box,
.button-box input,
.button-box .icon,
.party-pokemon,
.summary-party-pokemon,
.summary-icon {
  transition: all 0.3s ease-in-out;
}

/* Header */

.top-bar {
  padding: 0.5em 1em 0 1em;
  display: flex;
  width: 550px;
  background: var(--header-overlay);
  clip-path: polygon(0 0, 100% 0, 91% 100%, 0 100%);
}

.icon-box {
  position: relative;
}

.icon-box.divided {
  padding-right: 16px;
  margin-right: 16px;
  padding-top: 2px;
}

.icon-box .icon {
  fill: white;
  width: 24px;
  height: 24px;
}

.icon-box.divided::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 1.5px;
  /* thickness of the line */
  height: 29px;
  background-color: rgba(255, 255, 255, 0.4);
}

.top-bar .icon-box::after {
  background-color: var(--disabled-color-rgba);
}

.top-bar-item {
  margin-right: 2em;
  color: var(--disabled-color);
  position: relative;
  padding-bottom: 0.5em;
  cursor: pointer;
}

.top-bar-item.selected {
  color: white;
  font-weight: var(--bold-font-weight);
}

.top-bar-item.selected::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 6px;
  /* thickness of the line */
  background-color: var(--selected-color);
  border-radius: 2px;
}

#next-top-bar-item {
  cursor: pointer;
}

/* Context Menu */

.context-menu {
  position: absolute;
  border-top: none;
  background: rgba(255, 255, 255, 0.7);
  color: var(--dark-text-color);
  width: 220px;
  transform: translate(320px, -660px);
  border-radius: var(--default-border-radius);
  z-index: 1000;
  padding: 8px;
}

.context-menu-item {
  padding: 8px;
  border-radius: var(--default-border-radius);
  cursor: pointer;
}

.context-menu-item:hover {
  background: rgba(255, 204, 0, 0.2)
}

/* Button Box */

.button-box {
  padding: 0.5em 1em;
  background: var(--content-overlay);
  border: none;
  border-radius: var(--default-border-radius);
  display: flex;
  height: auto;
  align-items: center;
  justify-content: center;
  width: 300px;
  color: white;
  font-family: "Roboto", sans-serif;
  font-size: 24px;
}

.button-box {
  height: 30px;
}

.button-box.large {
  width: 500px;
}

.button-box.large input {
  text-align: start;
}

.button-box.small {
  width: 222px;
}

.button-box.small .icon {
  width: 30px;
}

.button-box.small .button-text {
  width: 200px;
  text-align: center;
}

.button-box.type {
  text-transform: uppercase;
  font-weight: var(--bold-font-weight);
  border-radius: var(--pill-border-radius);
  width: auto;
}

.button-box.type .icon-box {
  padding-right: 0px;
  margin-right: 0px;
  padding-top: 2px;
}

.button-box.type .icon-box::after {
  width: 0px;
}

.button-box.pokemon {
  width: auto;
  height: 100px;
}

.button-box.pokemon .icon-box::after {
  height: 52px;
}

.button-box,
.button-box input,
.button-box .icon,
.party-pokemon {
  transition: all 0.3s ease-in-out;
}

.button-box.clickable:hover {
  background: var(--content-overlay-selected);
  cursor: pointer;
}

.button-box .icon.type {
  width: 38px;
  height: 38px;
}

/* Content */

.content {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 2em;
  padding-top: 1.5em;
  padding-bottom: calc(54px + 1.5em);
  flex: 1
}

.column {
  display: flex;
  flex-direction: column;
  gap: 1em;
  align-items: center;
}


/* Content: Current Party */

.pill-container {
  padding: 0.5em 1em;
  background: var(--content-overlay);
  border-radius: var(--pill-border-radius);
  display: flex;
  white-space: nowrap;
}

#current-party {
  width: 200px !important;
  text-align: center;
}

.party-pokemons {
  margin-top: 1em;
  gap: 0.5em;
  display: flex;
  flex-direction: column;
}

.party-pokemon {
  width: 304px;
  height: 100px;
  background: var(--content-overlay);
  border-radius: var(--default-border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1em;
  cursor: pointer;
}

.party-pokemon:hover {
  background: var(--content-overlay-selected);
}

.party-pokemon.selected {
  background: var(--selected-color);
  color: var(--dark-text-color);
}

.party-pokemon.selected .icon {
  fill: var(--dark-text-color);
}

.party-pokemon.selected img {
  opacity: 0.5;
}

.party-pokemon .party-text {
  width: 150px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.party-pokemon .party-text .party-pill {
  font-size: 18px;
  background: rgba(22, 58, 78, 0.8);
  width: 120px;
  text-align: center;
  padding: 2px;
  border-radius: var(--pill-border-radius);
}

.party-pokemon .party-text .party-name {
  font-weight: var(--bold-font-weight);
}

.party-pokemon .party-text .very-strong {
  background: rgba(22, 78, 25, 0.8);
}

.party-pokemon .party-text .strong {
  background: rgba(20, 66, 51, 0.8);
}

.party-pokemon .party-text .weak {
  background: rgba(87, 39, 71, 0.8);
}

.party-pokemon .party-text .very-weak {
  background: rgba(121, 32, 32, 0.8);
}

/* Content: Search Containers */

.search-pokemon-container {
  display: flex;
  flex-direction: column;
  text-align: center;
}

.multi-button-box {
  display: flex;
  gap: 1em;
}

.multi-button-box .button-box {
  width: 300px;
}

.button-box .icon-box {
  margin-right: none;
}

.button-box .icon-box .search-text {
  width: 200px;
  text-align: start;
}

input {
  font-size: 24px;
  width: auto;
  text-align: center;
}

input:focus {
  outline: none;
  box-shadow: none;
}

input::placeholder {
  color: #96cdc0;
}

.button-box input {
  width: 250px;
}

.button-box.large input {
  width: 300px;
}

.clear-input {
  background: none;
  border: none;
  color: white;
}


/* Search Suggestions */

.search-suggestions {
  position: absolute;
  border-top: none;
  background: var(--content-overlay);
  width: 348px;
  transform: translateY(75px);
  border-radius: var(--default-border-radius);
  display: none;
  z-index: 1000;
  max-height: 280px;
  overflow-y: auto;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.search-suggestions.type-2 {
  transform: translate(372px, 75px);
}

.search-suggestions.large {
  transform: translate(228px, 10px);
  width: 320px;
}

.search-suggestions.open {
  max-height: 500px;
  opacity: 1;
}

.search-suggestion-item {
  display: flex;
  align-items: center;
  padding: 8px;
  cursor: pointer;
  transition: background 0.2s;
  height: 76px;
}

.search-suggestion-item:hover {
  background: rgba(238, 209, 43, 0.1)
}

.search-suggestion-item.type {
  height: 50px;
}

.img-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
}

.search-suggestion-item.pokemon img,
.icon-box img {
  max-height: 50px;
}

.search-suggestion-item .icon {
  fill: white;
  height: 35px;
  width: 35px;
  margin-left: 8px;
  margin-right: 16px;
  border-radius: 8px;
}

.pokemon-variant {
  font-size: 18px;
  color: rgb(214, 214, 214)
}

/* Search Results */

.grid-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  /* 2 columns */
  border-radius: var(--default-border-radius);
  gap: 1em;
}

.grid-item {
  width: 420px;
  padding: 1em;
  border-radius: var(--default-border-radius);
}

.grid-item.full {
  grid-column: span 2;
  width: auto;
}

.grid-item.full.title .icon {
  height: 38px;
}

.grid-item {
  background: var(--content-overlay);
}

.grid-item.highlight {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--content-overlay);
  color: white;
  height: auto;
  gap: 8px;
  padding: 0.5em 1em;
}

.grid-item.result {
  background: var(--content-overlay);
  height: auto;
}

.result-title {
  font-weight: var(--bold-font-weight);
  text-align: center;
}

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

.grid-item.flex .negative,
.grid-item.flex .positive {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--bold-font-weight);
  border-radius: 100%;
  height: 75px;
  width: 75px;
  text-align: center;
  font-size: 24px;
}

.grid-item.flex .fraction {
  font-size: 32px;
}

.grid-item .types {
  width: 350px;
}

.grid-item.flex .negative,
.damage-banner.negative {
  background: #fcb4b4;
  color: var(--damage-banner-text-color);
}

.grid-item.flex .positive,
.damage-banner.positive {
  background: #a2ffcc;
  color: var(--damage-banner-text-color);
}

.result-types {
  display: flex;
  gap: 8px;
  margin-top: 0.5em;
  text-transform: uppercase;
  flex-wrap: wrap;
  font-weight: var(--bold-font-weight);
  align-items: center;
  justify-content: center;
}

.grid-item.highlight .result-types {
  margin-top: 0px;
}

.grid-item.highlight .result-title {
  white-space: nowrap;
}

/* Type/Damage Banner */

.type-banner,
.damage-banner {
  border-radius: 9999px;
  text-align: center;
  font-size: 20px;
  padding: 2px 20px;
  font-weight: var(--bold-font-weight);
}

.type-banner {
  text-transform: uppercase;
  background: black;
  color: white;
}

.type-banner.mini {
  width: 30px;
  height: 30px;
  padding: 0px 0px;
  border-radius: var(--default-border-radius);
}

.damage-banner {
  background: rgb(194, 194, 194);
  color: var(--damage-banner-text-color);
}

.clear-input.title {
  width: 150px;
  text-transform: uppercase;
  font-weight: var(--bold-font-weight);
}

.type-banner.title {
  display: flex;
  font-size: 32px;
  min-width: 280px;
  padding: 8px;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.bug {
  background: #91A11A;
}

.dark {
  background: #50413E;
}

.dragon {
  background: #5160E1;
}

.electric {
  background: #FABF00;
}

.fairy {
  background: #EE70EE;
}

.fighting {
  background: #FF7F00;
}

.fire {
  background: #E62828;
}

.flying {
  background: #81B8EE;
}

.ghost {
  background: #704070;
}

.grass {
  background: #3FA12A;
}

.ground {
  background: #915121;
}

.ice {
  background: #3FD9FF;
}

.normal {
  background: #9FA19E;
}

.poison {
  background: #9241CC;
}

.psychic {
  background: #EE4179;
}

.rock {
  background: #AEA981;
}

.steel {
  background: #60A1B7;
}

.water {
  background: #2981EF;
}

/* Footer */
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  background: var(--header-overlay);
  height: 50px;
  width: 100%;
  border-bottom: 4px solid var(--selected-color);
  display: flex;
  gap: 1em;
  justify-content: flex-end;
}

.controler-box {
  height: 100%;
  display: flex;
  gap: 8px;
  align-items: center;
  margin-right: 1em;
  cursor: pointer;
}

.controler-box:hover {
  color: var(--hover-color);
}

.controler-box .icon {
  margin-top: 6px;
}

.controler-box .icon:hover {
  fill: var(--hover-color);
}


/* Summary Page */

#summary-page {
  display: flex;
  flex-direction: column;
  width: auto;
  height: 100vh;
  align-items: stretch;
}

.footer.summary {
  background: rgba(108, 47, 200, 0.8);
}

.summary-header {
  background: var(--summary-primary-color);
  text-transform: uppercase;
  font-weight: var(--bold-font-weight);
  display: flex;
  align-items: center;
  gap: 1em;
  border-top: 4px solid var(--selected-color);
  padding: 15px 1em;
}

.summary-header .icon {
  fill: white;
  height: 29px;
  width: 29px;
}

.summary-top-menu {
  background: #162947;
  padding: 0.5em 1em;
  position: relative;
}

.summary-top-menu .title {
  width: 120px;
  text-align: center;
  border-left: 5px solid var(--selected-color);
}

.summary-top-menu .icons {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  gap: 1em;
  align-items: center;
}

.summary-content {
  display: flex;
  gap: 2em;
  align-items: center;
  justify-content: center;
  height: calc(100vh - 64px - 54px - 54px);
  overflow-y: auto;
}

.summary-party-pokemons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.summary-party-pokemon {
  background: rgb(17, 49, 88, 0.9);
  height: 85px;
  width: 85px;
  border-radius: var(--default-border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
}

.summary-party-pokemon img {
  height: 60px;
  width: auto;
}

.summary-party-pokemon:hover {
  background: rgba(30, 62, 83, 0.9)
}

.summary-party-pokemon.selected {
  background: var(--selected-color);
}

.summary-content-box {
  display: flex;
  gap: 2em;
}

.summary-pokemon-preview {
  width: 500px;
  background: rgb(17, 49, 88, 0.6);
  border-radius: var(--default-border-radius);
}

.summary-pokemon-preview-top-bar {
  height: 50px;
  background: rgba(14, 41, 73, 0.8);
  border-top-left-radius: var(--default-border-radius);
  border-top-right-radius: var(--default-border-radius);
}

.summary-pokemon-preview-title {
  height: 50px;
  background: rgba(14, 41, 73, 0.8);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0px 8px;
  gap: 8px;
  font-weight: var(--bold-font-weight);
}

.summary-pokemon-preview-title img{
  height: 32px;
}

.summary-pokemon-preview-pokemon {
  position: relative;
  height: 450px;
  display: flex;
  align-items: end;
  justify-content: center;
}

.summary-pokemon-preview-pokemon::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url('/assets/img/pokeballs/pokeball.svg') no-repeat center/contain;
  background-size: 200px auto;
  opacity: 0.2;
  z-index: 0;
}

.summary-pokemon-preview-pokemon img {
  position: relative;
  z-index: 1;
  height: 400px;
}

.summary-pokemon-preview-type {
  height: 40px;
  background: rgba(14, 41, 73, 0.5);
  border-bottom-left-radius: var(--default-border-radius);
  border-bottom-right-radius: var(--default-border-radius);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0px 8px;
}

.summary-info {
  display: flex;
  flex-direction: column;
  gap: 0.8em;
  width: 500px;
}

.summary-info-row {
  display: flex;
  gap: 1em;
}

.summary-info-row-title {
  width: 150px;
  color: var(--selected-color);
  border-right: 2px solid #19518c;
}

.summary-info-row-description {
  display: flex;
  gap: 8px;
}

.summary-info-row-description .type-banner {
  display: flex;
  gap: 4px;
  align-items: center;
}

.summary-moves {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2em;
  width: 500px;
}

.summary-moves-radar-box {
  width: 400px;
  height: 400px;
  position: relative;
}

.summary-moves-radar-box canvas {
  position: absolute; 
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 500px;
  max-height: 500px;
}

.summary-moves-overview,
.summary-info-overview {
  border-top: 2px solid #4372a9;
  padding-top: 1em;
}

.summary-moves-overview .highlight,
.summary-info-overview .highlight {
  color: var(--selected-color);
}

.summary-type-icon {
  fill: white;
  height: 29px;
  width: 29px;
}

/* Patterns */

@keyframes moveUp {
  from {
    background-position: 0 var(--animation-distance);
  }

  to {
    background-position: 0 0;
  }
}

@keyframes moveDiagonal {
  from {
    background-position: var(--animation-distance) 0;
  }

  to {
    background-position: 0 var(--animation-distance);
  }
}

.summary-pattern {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  will-change: background-position;
  background-repeat: repeat;
  background-position: 0 0;
  background-size: auto;
  filter: saturate(0.95) contrast(0.95);
}

.summary-pattern.header {
  background-image: url('/assets/img/patterns/header-pattern.png');
  animation: moveUp linear infinite;
  animation-duration: 36s;
  height: 64px;
  opacity: 0.05;
}

.summary-pattern.content {
  background-image: url('/assets/img/patterns/content-pattern.svg');
  animation: moveDiagonal linear infinite;
  animation-duration: 60s;
  opacity: 0.03;
  top: 117px
}

.summary-icon {
  fill: white;
  height: 30px;
  width: 30px;
  cursor: pointer;
}

.summary-icon:hover {
  fill: var(--hover-color);
}

.summary-icon.selectable {
  fill: #516075;
}

.summary-icon.selected {
  fill: var(--selected-color);
}

.summary-icon.arrow.right {
  transform: rotate(90deg);
}

.summary-icon.arrow.down {
  transform: rotate(180deg);
}

.summary-icon.arrow.left {
  transform: rotate(270deg);
}
