@font-face {
  font-family: 'One Night Sans';
  font-style: normal;
  font-weight: 500;
  src: url('/fonts/OneNightSans-Medium.woff2') format('woff2'),
    url('/fonts/OneNightSans-Medium.woff') format('woff');
  font-display: swap;
}

@font-face {
  font-family: 'One Night Sans';
  font-style: normal;
  font-weight: 900;
  src: url('/fonts/OneNightSans-Black.woff2') format('woff2'),
    url('/fonts/OneNightSans-Black.woff') format('woff');
  font-display: swap;
}

@font-face {
  font-family: 'One Night Sans';
  font-style: normal;
  font-weight: 950;
  src: url('/fonts/OneNightSans-BlackHeadline.woff2') format('woff2'),
    url('/fonts/OneNightSans-BlackHeadline.woff') format('woff');
  font-display: swap;
}

html,
body {
  min-height: 100vh;
  margin: 0;
  padding: 0;
  background-color: #ffffff;
  scroll-behavior: smooth;
}

body {
  font-family: 'One Night Sans', Arial, sans-serif;
  color: #000000;
}

body::-webkit-scrollbar {
  width: 2px;
}

body::-webkit-scrollbar-track {
  background: #ffffff;
}

body::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb:hover {
  background: #e1103e;
}

.calculator-section {
  min-height: 100vh;
  padding: 64px 24px;
  background-color: #ffffff;
  box-sizing: border-box;
}

.calculator-section__title {
  font-family: 'Arial Black', Arial, Helvetica, sans-serif;
  font-size: 32px;
  font-weight: 900;
  line-height: 40px;
  color: #000000;
  text-align: center;
  margin: 0;
}

.calculator-section__form {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 56px 0;
}

.calculator-section__form-column {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.calculator-section__input {
  font-family: 'One Night Sans', Arial, sans-serif;
  font-size: 64px;
  font-weight: 900;
  line-height: 100px;
  color: #000000;
  text-align: center;
  width: 160px;
  height: 160px;
  margin-bottom: 20px;
  background-color: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 20px;
  transition: border-color 0.2s ease;
  appearance: textfield;
}

.calculator-section__input:focus {
  border-color: #e1103e;
  outline: none;
}

.calculator-section__input::-webkit-outer-spin-button,
.calculator-section__input::-webkit-inner-spin-button {
  appearance: none;
}

.calculator-section__label {
  font-family: 'One Night Sans', Arial, sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  color: #000000;
  text-align: center;
}

.calculator-section__icon--plus {
  font-family: 'Arial Black', Arial, Helvetica, sans-serif;
  font-size: 90px;
  font-weight: 900;
  color: #e1103e;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 10px;
}

.calculator-section__button {
  font-family: 'One Night Sans', Arial, sans-serif;
  font-size: 16px;
  font-weight: 900;
  line-height: 24px;
  text-align: center;
  display: flex;
  align-items: center;
  margin-top: 56px;
  padding: 11px 40px;
  cursor: pointer;
  border: 1px solid #e1103e;
  border-radius: 8px;
  transition: all 0.3s ease;
  appearance: none;
}

.calculator-section__button svg {
  margin-left: 12px;
}

.calculator-section__button--primary {
  color: #ffffff;
  background-color: #e1103e;
}

.calculator-section__button--primary svg path {
  fill: #ffffff;
}

.calculator-section__button--primary:hover {
  background-color: #c00e34;
  border-color: #c00e34;
}

.calculator-section__button--primary:focus,
.calculator-section__button--primary:active {
  background-color: #e1103e;
  border-color: #ffffff;
  outline: 3px solid rgba(225, 16, 62, 0.4);
  outline-offset: 2px;
}

.calculator-section__button--secondary {
  color: #000000;
  background-color: transparent;
  border-color: #000000;
}

.calculator-section__button--secondary:hover {
  background-color: rgba(0, 0, 0, 0.08);
}

.calculator-section__button--secondary:focus,
.calculator-section__button--secondary:active {
  background-color: rgba(0, 0, 0, 0.05);
  outline: 3px solid rgba(225, 16, 62, 0.4);
  outline-offset: 2px;
}

.calculator-section__buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.calculator-section__buttons .calculator-section__button--primary,
.calculator-section__buttons .calculator-section__button--secondary {
  margin: 0;
}

.calculator-section__buttons .calculator-section__button--primary svg {
  margin-right: 12px;
  margin-left: 0;
  transform: rotate(180deg);
}

.calculator-section__result .calculator-section__button--primary {
  color: #ffffff;
  background-color: #e1103e;
  border-color: #e1103e;
}

.calculator-section__result .calculator-section__button--primary svg path {
  fill: #ffffff;
}

.calculator-section__result .calculator-section__button--primary:hover {
  background-color: #c00e34;
  border-color: #c00e34;
}

.calculator-section__result {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 16px;
  padding: 32px 16px;
  background-color: #f5f5f5;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
}

.calculator-section__result .calculator-section__title {
  color: #000000;
}

.calculator-section__result .calculator-section__title {
  font-family: 'Arial Black', Arial, Helvetica, sans-serif;
  font-size: 20px;
  font-weight: 900;
  line-height: 25px;
  text-align: center;
}

.calculator-section__number {
  font-family: 'Arial Black', Arial, Helvetica, sans-serif;
  font-size: 64px;
  font-weight: 900;
  line-height: 80px;
  color: #e1103e;
  text-align: center;
  margin-top: 32px;
}

.calculator-section__number-text {
  font-size: 18px;
  font-weight: 900;
  line-height: 27px;
  text-align: center;
  margin: 0;
}

.calculator-section__text {
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  color: #000000;
  margin-top: 0;
}

.calculator-section__error {
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  color: #e1103e;
  text-align: center;
  display: none;
  margin-top: 32px;
}

.popup {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
}

.popup-inner {
  color: #000000;
  position: relative;
  width: 280px;
  max-width: 640px;
  padding: 20px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 16px;
}

.popup-inner__close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.popup-inner__close-btn:hover,
.popup-inner__close-btn:focus {
  outline: 3px solid rgba(225, 16, 62, 0.4);
}

.popup-inner__title {
  font-family: 'Arial Black', Arial, Helvetica, sans-serif;
  font-size: 18px;
  font-weight: 900;
  line-height: 22.5px;
  color: #000000;
  margin-top: 58px;
  margin-bottom: 0;
}

.popup-inner__text {
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
}

.popup img {
  width: 100%;
  height: auto;
  max-width: 600px;
}

@media screen and (min-width: 1000px) {
  .calculator-section {
    padding: 80px 64px;
  }

  .calculator-section__title {
    font-size: 42px;
    line-height: 52.5px;
    margin: 0;
  }

  .calculator-section__form {
    flex-direction: row;
    flex-wrap: wrap;
    height: 650px;
    max-width: 750px;
    margin: 0 auto;
  }

  .calculator-section__form-column {
    width: 325px;
    min-height: 425px;
  }

  .calculator-section__icon--plus {
    font-size: 115px;
    margin: -85px auto 0 auto;
  }

  .calculator-section__input {
    width: 200px;
    height: 200px;
    margin: 72px auto;
  }

  .calculator-section__error {
    text-align: center;
    flex-basis: 100%;
  }

  .calculator-section__button--primary {
    margin: 56px auto 104px;
  }

  .calculator-section__result {
    height: auto;
    max-width: 900px;
    margin: 30px auto 0;
    padding: 50px 56px;
    border-radius: 20px;
  }

  .calculator-section__result .calculator-section__title {
    font-size: 32px;
    line-height: 40px;
  }

  .calculator-section__number {
    font-size: 80px;
    line-height: 100px;
  }

  .calculator-section__number-text {
    font-size: 20px;
    line-height: 30px;
    margin: 0;
  }

  .calculator-section__text {
    font-size: 16px;
    line-height: 24px;
    margin-top: 32px;
  }

  .calculator-section__buttons {
    flex-direction: row;
    margin-top: 36px;
    gap: 24px;
  }

  .popup-inner {
    width: 440px;
  }

  .popup-inner__title {
    font-size: 20px;
    line-height: 25px;
  }
}
