@keyframes rf-spin {
  100% {
    transform: rotate(360deg);
  }
}

@keyframes heartbeat {
  from {
    transform: scale(1);
    transform-origin: center center;
    animation-timing-function: ease-out;
  }

  10% {
    transform: scale(0.94);
    animation-timing-function: ease-in;
  }

  17% {
    transform: scale(0.98);
    animation-timing-function: ease-out;
  }

  33% {
    transform: scale(0.92);
    animation-timing-function: ease-in;
  }

  45% {
    transform: scale(1);
    animation-timing-function: ease-out;
  }
}

.rf-container {
  font-family: Arial, sans-serif;
  display: flex;
  justify-content: center;
  width: 100%;
}

.rf-container__inner {
  box-sizing: border-box;
  max-width: 520px;
  width: 100%;
}

.rf-form {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  background: rgba(14, 28, 42, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.rf-form__content {
  position: relative;
  box-sizing: border-box;
  padding: 28px;
}

.rf-form__content > * + * {
  margin-top: 16px;
}

.rf-form-title {
  margin: 0 0 6px;
  font-size: 30px;
  line-height: 1.15;
  font-weight: 800;
  color: #ffffff;
  text-align: center;
}

.rf-form-subtitle {
  margin: 0 0 18px;
  font-size: 15px;
  line-height: 1.5;
  text-align: center;
  color: rgba(255, 255, 255, 0.82);
}

.rf-form__loader {
  position: absolute;
  z-index: 1000;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: inherit;
  background: rgba(7, 16, 26, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.rf-form__loader.active {
  display: flex;
}

.rf-form__loader-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 290px;
  padding: 24px;
}

.rf-loader-spinner {
  width: 56px;
  height: 56px;
  margin-bottom: 16px;
  border-radius: 50%;
  border: 5px solid transparent;
  border-color: #9be23a transparent #9be23a transparent;
  animation: rf-spin 1s linear infinite;
}

.rf-loader-text {
  font-size: 16px;
  line-height: 1.45;
  color: #ffffff;
  font-weight: 700;
}

.rf-form-field {
  width: 100%;
}

.rf-form-field__error {
  line-height: 1.3;
  display: none;
  width: 100%;
  margin-top: 8px;
  color: #ffd5d5;
  font-size: 13px;
  font-weight: 600;
}

.rf-form-field__error.active {
  display: block;
}

.rf-form-input {
  font-size: 19px;
  line-height: 1.2;
  box-sizing: border-box;
  width: 100%;
  min-height: 68px;
  padding: 18px 22px;
  color: #111827;
  border: 2px solid rgba(203, 213, 225, 0.85);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.98);
  appearance: none;
  box-shadow:
    0 10px 22px rgba(10, 17, 25, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition:
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    transform 0.22s ease,
    background 0.22s ease;
}

.rf-form-input::placeholder {
  color: #5b6470;
  opacity: 1;
}

.rf-form-input:hover {
  border-color: #a7b4c5;
}

.rf-form-input:focus {
  outline: none;
  border-color: #8dd52c;
  background: #ffffff;
  box-shadow:
    0 0 0 4px rgba(141, 213, 44, 0.18),
    0 16px 30px rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
}

.rf-form-input.is-invalid {
  border-color: #ff7f7f;
  box-shadow:
    0 0 0 4px rgba(255, 127, 127, 0.18),
    0 12px 24px rgba(0, 0, 0, 0.1);
}

.rf-alert {
  display: flex;
  align-items: flex-start;
  box-sizing: border-box;
  padding: 12px 14px;
  border-radius: 14px;
}

.rf-alert_error {
  color: #fff2f2;
  background: rgba(185, 28, 28, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.rf-alert__icon {
  opacity: 0.9;
  flex-shrink: 0;
}

.rf-alert__content {
  font-size: 14px;
  line-height: 1.45;
  padding-left: 12px;
}

.rf-form-button,
.scroll-btn {
  font-family: inherit;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
  width: 100%;
  min-height: 72px;
  padding: 18px 22px;
  box-sizing: border-box;
  color: #ffffff;
  cursor: pointer;
  border: 0;
  border-radius: 22px;
  background: linear-gradient(180deg, #a6ef45 0%, #7ed321 52%, #67bf17 100%);
  box-shadow:
    0 8px 0 #58a512,
    0 18px 38px rgba(86, 165, 18, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
  text-align: center;
  text-decoration: none;
  transition:
    transform 0.18s ease,
    filter 0.18s ease,
    box-shadow 0.18s ease;
}

.rf-form-button:hover,
.scroll-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.03);
}

.rf-form-button:active,
.scroll-btn:active {
  transform: translateY(2px);
  box-shadow:
    0 4px 0 #58a512,
    0 10px 20px rgba(86, 165, 18, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.rf-form-button:focus,
.scroll-btn:focus {
  outline: none;
  box-shadow:
    0 8px 0 #58a512,
    0 0 0 5px rgba(166, 239, 69, 0.24),
    0 18px 38px rgba(86, 165, 18, 0.32);
}

.rf-form-button[disabled] {
  opacity: 0.72;
  pointer-events: none;
}

.scroll-btn {
  max-width: 420px;
  margin: 0 auto;
  animation: heartbeat 3s ease-in-out infinite both;
}

.iti {
  width: 100%;
}

.iti--inline-dropdown .iti__dropdown-content {
  display: none;
}

@media (max-width: 767px) {
  .rf-container__inner {
    max-width: 100%;
  }

  .rf-form {
    border-radius: 22px;
  }

  .rf-form__content {
    padding: 20px 16px;
  }

  .rf-form-title {
    font-size: 24px;
  }

  .rf-form-subtitle {
    font-size: 14px;
    margin-bottom: 14px;
  }

  .rf-form-input {
    min-height: 60px;
    font-size: 18px;
    padding: 16px 18px;
    border-radius: 18px;
  }

  .rf-form-button,
  .scroll-btn {
    min-height: 64px;
    font-size: 20px;
    border-radius: 18px;
  }

  .rf-loader-text {
    font-size: 14px;
  }
}