/* Calculator Styles - adaptado a root.css general */

.calculator-page {
  min-height: 100vh;
  padding: 2rem;
  padding-top: calc(2rem + 100px);
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  background-color: var(--white);
}

@media only screen and (max-width: 768px) {
  .calculator-page {
    padding-top: 2rem;
    padding-bottom: calc(2rem + 70px);
    background-color: var(--primary-50);
  }
}

.calculator {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 400px;
  width: 100vw;
  padding: 18px;
  border-radius: 10px;
  background-color: var(--primary-50);
  box-shadow: 0 16px 14px -6px rgb(0 0 0 / 0.1), 0 10px 20px -14px rgb(0 0 0 / 0.1);
}

.calculator h2 {
  text-align: center;
  margin-bottom: 12px;
  color: var(--black);
  font-family: "Urbanist Black", Arial, Helvetica, sans-serif;
  font-weight: 900;
  font-size: 28px;
}

/* Form Group Styles */
.calculator .option-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}

/* Select Styles */
.calculator select {
  width: 100%;
  border-color: var(--primary-300);
  border-width: 2px;
  border-radius: 5px;
  padding: 0.5rem;
  font-size: 16px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.calculator select:focus,
.calculator select:visited {
  border-color: var(--primary-100);
}

/* Text Styles */
.calculator label.title {
  font-family: Urbanist, Arial, Helvetica, sans-serif;
  font-size: 18px;
  font-weight: bold;
  margin: 0;
  color: var(--black);
}

.calculator label {
  font-family: Urbanist, Arial, Helvetica, sans-serif;
  font-size: 14px;
  color: var(--black);
}

/* Input Group Styles */
.calculator .one-row {
  display: grid;
  grid-template-columns: 24px 1fr 24px 1fr;
  grid-template-rows: 24px;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.calculator .one-row > :nth-child(1),
.calculator .one-row > :nth-child(3),
.calculator .one-row > :nth-child(5),
.calculator .one-row > :nth-child(7) {
  justify-self: center;
}

.calculator .two-rows {
  display: grid;
  grid-template-columns: 24px 1fr 24px 1fr;
  grid-template-rows: 24px 24px;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.calculator .two-rows > :nth-child(1),
.calculator .two-rows > :nth-child(3),
.calculator .two-rows > :nth-child(5),
.calculator .two-rows > :nth-child(7) {
  justify-self: center;
}

/* Checkbox/Radio Styles */
.calculator .checkbox-group input[type="checkbox"],
.calculator .radio-group input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  content: "";
  display: block;
  width: 16px;
  height: 16px;
  box-sizing: border-box;
  border: 2px solid var(--black);
  background-color: var(--white);
  accent-color: var(--primary-300);
  cursor: pointer;
}

.calculator .radio-group input[type="radio"] {
  border-radius: 50%;
}

.calculator .checkbox-group input[type="checkbox"] {
  border-radius: 3px;
}

.calculator .checkbox-group input[type="checkbox"]:checked,
.calculator .radio-group input[type="radio"]:checked {
  background-color: var(--primary-300);
  border-color: var(--primary-300);
}

/* Button Styles */
.calculator button {
  font-family: "Urbanist Black", Arial, Helvetica, sans-serif;
  font-weight: 900;
  display: block;
  margin: 20px auto;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  background-color: var(--primary-400);
  color: var(--white);
  font-size: 16px;
  cursor: pointer;
}

/* Result Styles */
.calculator #resultado {
  font-family: Urbanist, Arial, Helvetica, sans-serif;
  text-align: center;
  font-weight: 600;
  color: var(--black);
}

/* Media Queries */
@media only screen and (max-width: 768px) {
  .calculator-page {
    margin: 0;
    padding: 0;
  }

  .calculator {
    height: 100vh;
    margin: auto 0;
    box-shadow: none;
    border-radius: 0;
    background-color: var(--primary-50);
  }

  .calc {
    display: flex;
    flex-direction: column;
    align-content: space-around;
    margin: auto 0;
  }

  .calculator .option-group,
  .calculator .checkbox-group,
  .calculator .radio-group {
    gap: 5px;
  }

  .calculator .checkbox-group label,
  .calculator .radio-group label {
    font-size: 14px;
  }

  .calculator h2 {
    font-size: 22px;
  }

  .calculator label.title {
    font-size: 16px;
  }

  .calculator select {
    font-size: 14px;
    padding: 5px;
  }

  .calculator button {
    margin: 10px auto;
    padding: 3px 20px;
    font-size: 16px;
  }

  .calculator #resultado {
    font-size: 16px;
    font-weight: 600;
  }
}