/* ========================= VARIABLES ========================= */
:root {
  --blue-primary: #0788ca;
  --gradient-main: linear-gradient(
    90deg,
    #0868af,
    #94589e,
    #ca573e,
    #f2a624,
    #a5c61f,
    #079885,
    #1c589b
  );
  --gray-main: #4d4d4d;
  --border-color: #4d4d4d;
  --text-primary: #1a1a1a;
  --text-secondary: #4d4d4d;
  --bg-main: #ffffff;
  --radius-main: 20px;
}

/* ========================= FONTS ========================= */
@font-face {
  font-family: "Poppins";
  src: url("../assets/fonts/Poppins-Light.ttf") format("truetype");
  font-weight: 300;
}
@font-face {
  font-family: "Poppins";
  src: url("../assets/fonts/Poppins-Medium.ttf") format("truetype");
  font-weight: 500;
}
@font-face {
  font-family: "Poppins";
  src: url("../assets/fonts/Poppins-SemiBold.ttf") format("truetype");
  font-weight: 600;
}
@font-face {
  font-family: "Poppins";
  src: url("../assets/fonts/Poppins-Bold.ttf") format("truetype");
  font-weight: 700;
}
@font-face {
  font-family: "MonacoCustom";
  src: url("../assets/fonts/monaco.ttf") format("truetype");
}

/* ========================= RESET ========================= */

* {
  box-sizing: border-box;
}

/* ========================= BASE ========================= */
body {
  margin: 0;
  font-family: "Poppins", sans-serif;
  color: var(--text-primary);
  background: var(--bg-main);
  position: relative;
  overflow-x: hidden;
}

/* ========================= FONDOS DECORATIVOS ========================= */
body::before {
  content: "";
  position: absolute;
  bottom: -40px;
  width: 210px;
  height: 232px;
  background: url("../assets/images/imagenfondo.svg") no-repeat;
  background-size: cover;
  background-position: bottom left;
  pointer-events: none;
  z-index: 0;
}
body::after {
  content: "";
  position: absolute;
  top: -20px;
  right: 0;
  width: 700px;
  height: 700px;
  background: url("../assets/images/elementoarriba.svg") no-repeat;
  background-size: contain;
  pointer-events: none;
  z-index: 0;
}

/* ========================= APP ========================= */
.app {
  max-width: 1100px;
  margin: auto;
  padding: 40px 20px;
  position: relative;
  z-index: 2;
}

/* ========================= HEADER ========================= */
.app__header {
  text-align: center;
  margin-bottom: 35px;
}
.app__tag {
  font-size: 20px;
  letter-spacing: 2px;
  font-weight: 300;
  color: var(--text-primary);
  margin: 0;
  text-align: left;
  align-self: flex-start;
  margin-bottom: -10px;
}
.app__title {
  font-size: 77px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -1px;
  margin-bottom: -8px;
}
.app__divider {
  width: 100%;
  height: 6px;
  background: var(--gradient-main);
}
.app__subtitle {
  font-size: 32px;
  letter-spacing: 4px;
  color: var(--text-primary);
  margin: 0;
  margin-top: 10px;
  font-weight: 300;
}

/* ========================= SECCIONES ========================= */
section {
  margin-top: 35px;
}
.section__title {
  display: inline-block;
  background: var(--blue-primary);
  color: white;
  padding: 1px 18px;
  border-radius: 999px;
  font-size: 18px;
  font-weight: 600;
}

/* ========================= CONFIG ========================= */
.config__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 56px;
  margin-top: 5px;
  margin-left: 12px;
}
.config-block {
  display: flex;
  flex-direction: column;
  gap: 15px;
  height: 100%;
}
.config-block label {
  font-weight: 600;
}

/* botones */
.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 11px;
}
.btn-group button {
  padding: 3px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: white;
  cursor: pointer;
  font-family: "MonacoCustom", monospace;
  font-size: 24px;
  font-weight: 400;
  color: var(--text-primary);
  transition: all 0.15s ease;
}
.btn-group button:hover {
  border-color: var(--blue-primary);
  color: var(--blue-primary);
}
.btn-group button.active {
  background: var(--blue-primary);
  color: white;
  border: none;
}
.btn-group button:active {
  transform: scale(0.95);
}

/* inputs */
.input-row {
  display: flex;
  align-items: center;
  border: 1px solid var(--text-primary);
  border-radius: 999px;
  padding-top: 0;
  margin-left: 20;
  margin-top: auto;
  height: 36px;
}
.input-row input {
  flex: 1;
  border: none;
  padding: 5px 16px;
  outline: none;
  font-family: "MonacoCustom", monospace;
  font-size: 22px;
  border-radius: 20px;
}

/* quitar flechas */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* placeholder */
.input-row input::placeholder {
  font-family: "MonacoCustom", monospace;
  opacity: 0.6;
}

.unit {
  padding: 0 14px;
  font-family: "MonacoCustom", monospace;
  font-size: 23px;
  color: var(--text-primary);
}

/* ========================= RESULTADOS ========================= */
.results__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
  margin-top: 20px;
}
.result-card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-main);
  padding: 0px 20px;
}
.result-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-main);
  letter-spacing: 1px;
  margin-bottom: 0px;
  font-family: "Poppins";
}
.value-number {
  font-size: 62px;
  color: var(--gray-main);
  font-family: "MonacoCustom", monospace;
}
.result-unit {
  font-size: 13px;
  color: var(--gray-main);
  margin-top: 0px;
  font-family: "Poppins";
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 10px;
}

#currentUnits {
  color: var(--blue-primary);
  font-weight: 600;
}

/* ========================= VISUAL HEADER ========================= */
.visual__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.syringe__info {
  font-family: "MonacoCustom", monospace;
  font-weight: 400;
  font-size: 30px;
  color: var(--gray-main);
}

/* ========================= JERINGA ========================= */
.syringe {
  position: relative;
  max-width: 700px;
  margin: 30px auto;
  margin-bottom: 10px;
}
.syringe-img {
  width: 100%;
  display: block;
  position: relative;
  z-index: 2;
}
.syringe__fill {
  position: absolute;
  top: 50%;
  left: 150px;
  width: 0%;
  height: 63px;
  transform: translateY(-50%);
  background: var(--blue-primary);
  border-radius: 16px;
  transition: width 0.3s ease;
  z-index: 1;
}

/* ========================= ESCALA ALINEADA ========================= */
.syringe__scale {
  max-width: 626px;
  margin-left: 10px;
  margin: 8px auto 0;
  margin-left: 226px;
  display: flex;
  font-size: 12px;
  color: var(--gray-main);
  padding-left: 12%;
  padding-right: 8%;
  flex-direction: row;
  align-items: center;
  justify-content: space-around;
}

.visual {
  margin-top: 40px;
  text-align: center;
}

.syringe__alert {
  font-family: "Poppins";
  font-size: 14px;
  color: #d93025;
  margin-top: 5px;
  display: none;
}

.visual__header {
  position: relative;
}

.syringe__alert {
  position: absolute;
  right: 0;
  top: 63%;
}
.syringe__note {
  margin-top: 25px;
}

/* ========================= ESCALA DE LA WEB ========================= */
@media (max-width: 1100px) {
  .app__header {
    justify-self: center;
    margin-bottom: 25px;
  }

  .app__title {
    font-size: 375%;
  }

  .app__subtitle {
    font-size: 24px;
  }

  .config {
    margin-top: 25px;
    width: 827px;
    justify-self: center;
  }

  .config__grid {
    gap: 25px;
    margin-left: 6px;
  }

  .results {
    width: 827px;
    justify-self: center;
  }

  .results__grid {
    gap: 14px;
    margin-top: 5px;
  }

  .result-card {
    padding: 0px 12px;
  }
  .result-label {
    font-size: 81%;
  }

  .btn-group button {
    font-size: 20px;
  }

  .section {
    margin-top: 25px;
  }

  .visual {
    width: 827px;
    justify-self: center;
    margin-top: 25px;
  }
  .syringe__scale {
    width: 544px;
    margin-left: 156px;
    justify-content: space-between;
  }

  body::before {
    bottom: -20px;
    width: 160px;
    height: 176px;
  }
  body::after {
    top: -20px;
    right: 0;
    width: 500px;
  }
}

@media (max-width: 870px) {
  .app__title {
    font-size: 270%;
  }
  .app__tag {
    font-size: 13px;
  }

  .app__divider {
    height: 4px;
  }
  .app__header {
    margin-bottom: 5px;
  }

  .app__subtitle {
    font-size: 15px;
  }

  .config,
  .results,
  .visual {
    width: 590px;
    margin-top: 0;
  }

  .section__title {
    font-size: 13px;
    margin-top: 15px;
    padding: 1px 12px;
    margin-bottom: 5px;
  }

  .config__grid {
    gap: 15px;
    margin-bottom: 15px;
  }

  .config-block {
    gap: 8px;
  }

  .config-block label {
    font-size: 15px;
  }

  .app {
    padding: 30px 20px;
  }

  .config__grid {
    grid-template-columns: 1fr 1fr;
  }

  .results__grid {
    grid-template-columns: 1fr 1fr;
  }

  .syringe__scale {
    width: 92%;
    margin-left: 0;
    padding-left: 27%;
    padding-right: 10%;
  }
  .syringe__fill {
    left: 127px;
    height: 57px;
  }

  body::before {
    bottom: -20px;
    width: 118px;
    height: 130px;
  }
  body::after {
    top: -20px;
    width: 300px;
  }
  .value-number {
    font-size: 45px;
  }
  .result-label {
    font-size: 13px;
  }

  .result-unit {
    font-size: 13px;
  }
  .syringe__info {
    font-size: 20px;
    margin-top: 35px;
  }
  .syringe__note {
    margin-top: 20px;
    font-size: 14px;
    margin-bottom: 0;
  }
}

@media (max-width: 650px) {
  .app__title {
    font-size: 205%;
    margin-top: 2px;
  }

  .app__tag {
    font-size: 12px;
  }

  .app__subtitle {
    font-size: 14px;
    width: 420px;
    margin-top: 5px;
  }

  .config,
  .results,
  .visual {
    width: 440px;
    margin-top: 0;
  }

  .config__grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .results__grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 9px;
  }

  .section__title {
    font-size: 12px;
    padding: 1px 10px;
    margin-bottom: 0;
  }

  .config-block label {
    font-size: 13px;
  }

  .value-number {
    font-size: 34px;
  }

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

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

  .syringe__info {
    margin-top: 30px;
  }

  .syringe__alert {
    position: static;
    margin-top: 2px;
  }

  .syringe {
    max-width: 100%;
    margin-top: 15px;
  }

  .syringe__fill {
    left: 94px;
    height: 43px;
    border-radius: 10px;
  }

  .syringe__scale {
    padding-left: 27%;
    padding-right: 10%;
    font-size: 10px;
  }

  .syringe__note {
    font-size: 12px;
  }

  body::before {
    bottom: -8px;
    width: 99px;
    height: 109px;
  }
  body::after {
    top: -6px;
    width: 200px;
  }
}

@media (max-width: 480px) {
  .app__title {
    font-size: 165%;
    margin-top: -7px;
    margin-bottom: -5px;
  }

  .app__subtitle {
    font-size: 13px;
    width: 350px;
    margin-top: 2px;
  }

  .app__tag {
    font-size: 12px;
    margin-bottom: 2px;
  }

  .config,
  .results,
  .visual {
    width: 360px;
  }

  .app {
    padding: 25px 14px;
  }

  .btn-group {
    gap: 6px;
  }

  .input-row {
    height: 32px;
  }

  .input-row input {
    font-size: 16px;
  }

  .unit {
    font-size: 16px;
  }

  .value-number {
    font-size: 40px;
  }

  .result-label {
    font-size: 11px;
  }

  .result-unit {
    font-size: 11px;
  }

  .syringe__info {
    font-size: 14px;
    margin-top: 20px;
  }

  .syringe__fill {
    left: 77.5px;
    height: 34px;
    border-radius: 8px;
  }

  .syringe__scale {
    font-size: 9px;
    padding-left: 28%;
    padding-right: 10%;
  }

  .syringe__note {
    margin-top: 20px;
    font-size: 11px;
  }

  .visual {
    margin-top: 15px;
  }

  .syringe__alert {
    font-size: 12px;
  }

  body::before {
    width: 70px;
    height: 80px;
    bottom: 0;
  }

  body::after {
    width: 140px;
  }
}
