@import url("https://fonts.googleapis.com/css2?family=Share+Tech&display=swap");

:root {
  /* Colors */
  --background-body: #f8f8f8;
  --background-container: #fff;
  --background-insufficient: #b2dbad;
  --background-closed: #dbadad;
  --background-check: #deffda;
  --background-labels: #f1f1f1;

  /* Font size */
  --root-font-size: 16px;
  --font-weight: 550;
  font-size: var(--root-font-size);

  /* Font Family */
  font-family: "Share Tech", sans-serif;
  font-style: normal;
}

*,
*::after,
*::before {
  box-sizing: border-box;
}

body {
  background-color: var(--background-body);
  font-weight: var(--font-weight);
  padding: 2rem;
}

article {
  max-width: 30rem;
  margin: 0 auto;
  padding: 1rem 2rem;
  background-color: var(--background-container);
  border-radius: 0.5rem;
  box-shadow: 2px -1px 32px 13px rgba(0, 0, 0, 0.17);
  -webkit-box-shadow: 2px -1px 32px 13px rgba(0, 0, 0, 0.17);
  -moz-box-shadow: 2px -1px 32px 13px rgba(0, 0, 0, 0.17);
}

header {
  text-align: center;
  border-bottom: 2px solid #dbdbdb;
}

header div {
  display: flex;
  justify-content: center;
}

header figure {
  margin-left: -1rem;
  margin-top: 1.3rem;
}

#title-svg {
  stroke: green;
}

h1 {
  margin-left: -2.4rem;
  font-size: 1.5rem;
}

header p {
  color: #545454;
}

.title-container,
.due-container {
  text-align: center;
  font-size: 2rem;
}

.title-container {
  font-size: 1.5rem;
  margin-bottom: 2rem;
}

.due-container {
  margin-top: -1.6rem;
  color: green;
  font-weight: 900;
}

.label-cash figure {
  position: absolute;
  margin-left: 8px;
  margin-top: 1.1rem;
}

.label-cash p {
  text-align: left;
}

.label-cash input {
  margin-top: 0.7rem;
  width: 100%;
  height: 2.5rem;
  border: 1px solid #d8d8d8;
  border-radius: 0.5rem;
  padding-left: 2.4rem;
  font-size: 22px;
}

.purchase-btn {
  margin-top: 2rem;
  width: 100%;
  height: 3rem;
  border-radius: 0.5rem;
  background-color: black;
  color: white;
  font-size: 1rem;
  font-weight: bold;
  transition: 0.3s ease;
  border: 0;
}

.purchase-btn:hover {
  background-color: #424242;
  cursor: pointer;
}

.details-text {
  padding: 1rem;
  border: 1px solid #d8d8d8;
  border-radius: 0.5rem;
  text-align: center;
  color: #4d4d4d;
  background-color: #f5f5f5;
}

.change-due {
  margin-top: 2rem;
  border: 2px solid;
  border-radius: 0.5rem;
  display: none;
}

.change-due div {
  display: flex;
}

.change-due figure {
  margin-left: 1rem;
}

.change-due div p {
  margin-left: -2rem;
  font-size: 1.1rem;
}
#text-insufficient {
  margin-left: 1rem;
  color: red;
}
.change-breakdown {
  display: none;
  margin-left: 1rem;
}

.not-change {
  margin-left: 2rem;
  border: 0;
  padding: 0.4rem;
  width: 6rem;
  border-radius: 1rem;
  font-size: 0.7rem;
  font-weight: bold;
  background-color: #c1ccdf;
}
.change {
  display: flex;
  justify-content: flex-start; /* Alinea los elementos al inicio */
  gap: 0.5rem; /* Añade espacio entre los elementos */
  max-width: 30rem;
  padding: 1rem; /* Añade espacio interno para mejor organización */
  overflow-x: auto; /* Permite desplazamiento horizontal si los elementos no caben */
}
.changes {
  margin: 0; /* Elimina márgenes laterales para mejor ajuste */
  border: 0;
  padding: 0.4rem;
  width: auto; /* Ajusta el ancho automáticamente */
  border-radius: 1rem;
  font-size: 0.7rem;
  font-weight: bold;
  background-color: #c5dfc1;
  text-align: center; /* Centra el contenido */
  white-space: nowrap; /* Evita que los elementos se envuelvan */
}

#insufficient {
  display: none;
}

#check {
  display: none;
}

.new-transaction {
  display: none;
  margin: 5% auto;
  width: 36%;
  height: 2rem;
  border: 0;
  border-radius: 0.5rem;
  text-align: center;
  padding-left: 2rem;
  transition: 0.3s ease;
}

.divider-transaction {
  border-top: 2px solid #dbdbdb;
  margin-top: 10%;
  display: none;
}
.new-transaction:hover {
  background-color: #dbdbdb;
}

#recharge {
  width: 1.2rem;
  position: absolute;
  margin-top: -0.2rem;
  margin-left: -1.4rem;
  animation: recharge 2s linear infinite;
  transform-origin: center;
}

footer {
  max-width: 30rem;
  margin: 2% auto;
  text-align: center;
}

.globe-span {
  display: inline;
}

@keyframes rotacionX {
  0% {
    transform: rotateY(0deg);
  }
  100% {
    transform: rotateY(360deg);
  }
}

@keyframes heart {
  0% {
    transform: scale(0.7);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(0.7);
  }
}

@keyframes recharge {
  0% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(-180deg);
  }
  100% {
    transform: rotate(-360deg);
  }
}

#globe {
  width: 1.2rem;
  position: absolute;
  margin-top: -0.2rem;
  margin-left: 0.4rem;
  animation: rotacionX 4s linear infinite;
}

#hearts {
  animation: heart 3s linear infinite;
}

.footer-p2 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
}

.heart-svg {
  position: relative;
  margin: 0;
  padding: 0;
  display: inline-block;
  vertical-align: middle;
}
