.popup-overlay {
  position: fixed;
  inset: 0;
  background: #0000004d;
  backdrop-filter: blur(16px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.popup-overlay.active {
  display: flex;
  opacity: 1;
}

.popup {
  background: #fff;
  padding: 30px 40px 40px;
  width: auto;
  min-width: 480px;
  border-radius: 30px;
  position: relative;
  transform: translateY(-20px);
  transition: all 0.5s ease;
}

.popup.calculate-popup,
.popup.demo-popup {
  min-width: 736px;
}

.popup-overlay.active .popup {
  transform: translateY(0);
}

.popup-success {
  display: none;
  text-align: center;
}

.popup-success.active {
  display: block;
}

.popup-success p {
  text-align: center;
  font-weight: 500;
  font-size: 24px;
  letter-spacing: 0%;
  margin: 0;
}

.popup-success p span {
  font-weight: 400;
  font-size: 18px;
}

body.popup-open {
  overflow: hidden;
}

.popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
}

.popup-title {
  font-weight: 500;
  font-size: 24px;
  line-height: 120%;
  letter-spacing: 0%;
}

.popup-close {
  width: 32px;
  height: 32px;
  background-color: transparent;
  padding: 0;
  margin: 0;
}

.popup-content form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.popup-content form .submitBtn {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Manrope;
  font-weight: 700;
  font-size: 14px;
  line-height: 100%;
  letter-spacing: 0%;
  width: 204px;
  height: 43px;
}

.popup-content form .submitBtn:disabled:hover {
  background-color: #16c2ea;
  border: 1px solid #16c2ea;
  color: #fff;
  transform: none;
}

.popup-content form .submitBtn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}

.form-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.form-row.radio-group {
  gap: 24px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.form-group label {
  font-weight: 500;
  font-size: 14px;
  line-height: 140%;
  letter-spacing: 0%;
}

.form-group label span {
  color: #e31e24;
  padding-left: 3px;
}

.form-group input {
  font-family: Manrope;
  font-weight: 400;
  font-size: 16px;
  letter-spacing: 0%;
  border: 1px solid #d5d5d5;
  outline: none;
  background-color: #fff;
  width: 100%;
  height: 44px;
  padding: 11px 16px;
  border-radius: 8px;
  box-sizing: border-box;
  margin: 0;
}

.form-group textarea {
  font-family: Manrope;
  font-weight: 400;
  font-size: 16px;
  letter-spacing: 0%;
  border: 1px solid #d5d5d5;
  outline: none;
  background-color: #fff;
  width: 100%;
  height: 100px;
  padding: 11px 16px;
  border-radius: 8px;
  box-sizing: border-box;
  margin: 0;
}

form-group input::placeholder,
form-group textarea::placeholder {
  font-family: Manrope;
  font-weight: 400;
  font-size: 16px;
  line-height: 140%;
  letter-spacing: 0%;
  color: #a6a6a6;
}

.form-group.checkbox-group {
  flex-direction: row;
}

.form-group.checkbox-group label {
  color: #7d7d7d;
  margin-bottom: 6px;
}

.form-group.checkbox-group label a {
  color: #16c2ea;
  text-decoration: underline;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  position: relative;
}

.checkbox-group input[type="checkbox"] {
  display: none;
}

.checkbox-ui {
  width: 16px;
  height: 16px;
  border: 2px solid #16c2ea;
  border-radius: 4px;
  background: #fff;
  position: relative;
  transition: all 0.2s ease;
}

.checkbox-ui::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 2px;
  width: 8px;
  height: 8px;
  background: url("/wp-content/themes/svody-theme/images/done.svg") no-repeat
    center;
  background-size: contain;
  opacity: 0;
  transition: 0.2s ease;
}

.checkbox-group input[type="checkbox"]:checked + .checkbox-ui::after {
  opacity: 1;
}

.checkbox-group input[type="checkbox"]:checked + .checkbox-ui {
  background: #16c2ea;
}

.radio-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 400;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: 0%;
  color: #42474d;
  user-select: none;
}

.radio-group input[type="radio"] {
  display: none;
}

.custom-radio {
  width: 16px;
  height: 16px;
  border: 1px solid #d5d5d5;
  border-radius: 50%;
  background: #fff;
  position: relative;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.radio-group input[type="radio"]:checked + .custom-radio {
  background: url("/wp-content/themes/svody-theme/images/radio.svg") no-repeat
    center;
  background-size: contain;
  border-color: #16c2ea;
}

.custom-select {
  position: relative;
  border: 1px solid #d5d5d5;
  outline: none;
  background-color: #fff;
  width: 100%;
  height: 44px;
  padding: 11px 16px;
  border-radius: 8px;
  box-sizing: border-box;
  margin: 0;
}

.custom-select.open {
  border: 1px solid #16c2ea;
}

.custom-select__trigger {
  position: relative;
  font-family: Manrope;
  font-weight: 400;
  font-size: 16px;
  letter-spacing: 0%;
  color: #a6a6a6;
  cursor: pointer;
}

.custom-select__trigger::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  width: 16px;
  height: 16px;
  pointer-events: none;
  transform: translateY(-50%);
  background: url("/wp-content/themes/svody-theme/images/select-arrow.svg")
    no-repeat center;
  background-size: contain;
  transition: transform 0.3s ease;
}

.custom-select.open .custom-select__trigger::after {
  background: url("/wp-content/themes/svody-theme/images/select-active.svg");
}

.custom-options {
  position: absolute;
  top: 110%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #d5d5d5;
  border-radius: 8px;
  box-shadow: 0px 9px 14px 0px #00000040;
  display: none;
  flex-direction: column;
  gap: 8px;
  z-index: 10;
  padding: 11px 16px;
  max-height: 200px;
  overflow-y: auto;
}

/* Каждая опция */
.custom-option {
  font-family: Manrope;
  font-weight: 400;
  font-size: 16px;
  line-height: 140%;
  letter-spacing: 0%;
  color: #2f2f2f;
  cursor: pointer;
  transition: background 0.2s;
}

.custom-option:hover {
  color: #16c2ea;
}

.custom-select.open .custom-options {
  display: flex;
}

.password-wrapper {
  position: relative;
}

.password-wrapper input {
  width: 100%;
  padding-right: 40px;
}

.toggle-password {
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 16px;
  height: 16px;
}

@media (max-width: 768px) {
  .popup {
    padding: 30px;
    min-width: auto;
  }

  .popup.calculate-popup,
  .popup.demo-popup {
    padding: 30px;
    min-width: auto;
  }

  .popup-title {
    font-size: 18px;
  }

  .popup-header {
    margin-bottom: 15px;
  }

  .form-group label {
    font-size: 12px;
  }

  .popup-content form {
    gap: 8px;
  }

  .form-group input {
    font-size: 14px;
    height: 42px;
  }

  .form-group textarea {
    font-size: 14px;
  }
}
