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

button {
  all: unset;
  cursor: pointer;
  box-sizing: border-box;
}

body {
  background: rgb(211, 211, 211);
  width: 100%;
  font-family: 'Open Sans', Arial, sans-serif;
  font-size: 14px;
  color: #333333;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #00000099;
  z-index: 3;
  transition: opacity 0.3s ease;
}

.popup-wrapper {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: calc(100% - 32px);
  max-width: 730px;
  z-index: 5;
  display: flex;
  flex-direction: row-reverse;
  gap: 8px;


}

.popup {
  background: #ffffff;
  border-radius: 5px;
  width: 100%;

  max-height: calc(100vh - 80px);
  overflow-y: auto;

  display: flex;
  flex-direction: column;
  gap: 16px;
  /* padding: 30px 28px 24px; */
  padding: 40px;

  scrollbar-width: thin;
  scrollbar-color: #CCCCCC transparent;
}

.popup__close {
  flex-shrink: 0;
  align-self: flex-start;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  color: #fff;
  line-height: 1;
  padding: 4px;
  transition: color 0.2s;
  order: -1;
}

.popup__close:hover {
  color: #ddd;
}

.popup_header {
  font-weight: 700;
  font-size: 22px;
  line-height: 100%;
  letter-spacing: 0%;
  text-align: center;

}

.popup__section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn {
  font-weight: 600;
  font-size: 14px;
  line-height: 100%;
  letter-spacing: 0%;

  cursor: pointer;
  border: none;
  border-radius: 5px;
  transition: 0.2s;
}

.btn--outline {
  background: #ffffff;
  border: 1px solid #CCCCCC;
  color: #333;
  padding: 10px 18px;
  text-align: left;
  width: fit-content;
}

.btn--outline:hover {
  border-color: #aaa;
}

.area-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn--area-tab {
  background: #ffffff;
  border: 1px solid #CCCCCC;
  padding: 10px 18px;
  border-radius: 4px;
  text-align: left;
}

.btn--area-tab:hover {
  border-color: #aaa;
}

.btn--area-tab-active {
  background: #FEC152;
  border-color: #FEC152;
  color: #ffffff;
}

.btn--area-tab-active:hover {
  border-color: #FEC152;
}

.area-tab__back {
  align-self: center;

  font-weight: 400;
  font-size: 13px;
  line-height: 100%;
  letter-spacing: 0%;

}

.btn--calculate {
  background: #fff;
  border: 2px solid #F5C518;
  color: #F5C518;
  padding: 14px;
  width: 100%;
  border-radius: 4px;

  font-weight: 700;
  font-size: 14px;
  line-height: 100%;
  letter-spacing: 0%;
  text-align: center;

}

.parameters {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.parameters__label {
  font-weight: 700;
  font-size: 15px;
  line-height: 100%;
  letter-spacing: 0%;
}

.parameters__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.field__label {
  font-weight: 400;
  font-size: 13px;
  line-height: 100%;
  letter-spacing: 0%;
}

.field__required {
  color: #EEA600;
  margin-left: 2px;
}

.field__input {
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 9px 10px;
  font-size: 13px;
  width: 100%;
  outline: none;
  transition: all 0.2s;
  font-family: inherit;
  background: #F6F6F6;
}

.field__input_size {
  width: 177px;
}

.field__input::placeholder {
  color: #A9A9A9;
  font-size: 12px;
}

.field__input:focus {
  border: 1px solid #EEA600;
  background: #ffffff;
}

.field__input:not(:placeholder-shown) {
  background: #ffffff;
  border: 1px solid #C4C4C4;
}



.skill {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skill__label {
  font-weight: 700;
  font-size: 13px;
  line-height: 100%;
  letter-spacing: 0%;

}

.skill__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn--skill {
  background: #ffffff;
  border: 1px solid #CCCCCC;
  padding: 10px 18px;
  border-radius: 4px;
  white-space: nowrap;

  font-weight: 600;
  font-size: 14px;
  line-height: 100%;
  letter-spacing: 0%;

}

.btn--skill:hover {
  border-color: #aaa;
}

.btn--skill-active {
  background: #FEC152;
  border-color: #FEC152;
  color: #ffffff;
  font-weight: 600;
}

.btn--skill-active:hover {
  border-color: #FEC152;
}

.results {
  border: 1px solid #E2E3E8;
  border-radius: 10px;
  padding: 0 18px;
  gap: 0;
}

.results__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid #f0f0f0;
}

.results__row:last-child {
  border-bottom: none;
}

.results__name {
  font-weight: 600;
  font-size: 13px;
  line-height: 100%;
  letter-spacing: 0%;

}

.results__value {

  width: 100px;

  font-weight: 700;
  font-size: 16px;
  line-height: 100%;
  letter-spacing: 0%;

}

.hints {
  gap: 6px;
}

.hint {
  display: flex;
  align-items: flex-start;
  gap: 10px;

  font-weight: 400;
  font-size: 13px;
  line-height: 100%;
  letter-spacing: 0%;

}

.hint__icon {
  color: #F5C518;
  font-size: 15px;
  flex-shrink: 0;
  font-weight: 700;
  transform: rotate(180deg);

}

@media (max-width: 520px) {
  .popup-wrapper {
    width: calc(100% - 20px);
    flex-direction: column;
  }

  .popup {
    max-height: calc(100dvh - 80px);
  }

  .popup_header {
    line-height: 130%;
  }

  .popup__close {
    align-self: flex-end;
  }

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

  .field__label {
    white-space: normal;
  }

  .field__input {
    width: 100%;
  }

  .btn--calculate {
    font-size: 15px;
    padding: 13px;
  }

  .results__row {
    flex-wrap: wrap;
    gap: 2px;
  }

  .results__name {
    flex: 1 1 50%;
  }

  .results__value {
    flex: 0 1 auto;
  }
}

@media (min-width: 521px) and (max-width: 767px) {
  .parameters__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .popup-wrapper {
    flex-direction: column;
  }

  .popup__close {
    align-self: flex-end;
  }

  .field__input {
    width: 100%;
  }
}