.hkydf-gh-form {
  --hkydf-gh-form-primary: var(--c-primary, #024b79);
  --hkydf-gh-form-secondary: var(--c-secondary, #94bd30);
  --hkydf-gh-form-text: var(--f-m, #444444);

  max-width: 768px;
  margin: 0 auto;
  color: var(--hkydf-gh-form-primary);
  box-sizing: border-box;
}

.hkydf-gh-form button,
.hkydf-gh-form__file-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--hkydf-gh-form-primary);
  color: #fff;
  font-weight: 700;
  padding: 0.6rem 0.875rem;
  border-radius: 0.875rem;
  border: none;
}

.hkydf-gh-form button:hover,
.hkydf-gh-form button:focus,
.hkydf-gh-form__file-button:hover,
.hkydf-gh-form__file-button:focus {
  background-color: var(--hkydf-gh-form-primary);
  color: #fff;
}

.hkydf-gh-form__file-button {
  cursor: pointer;
}

.hkydf-gh-form__file-button > input[type="file"] {
  display: none;
}

/* Campaign Stats */
.hkydf-gh-campaign-stats {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  justify-content: center;
  background-color: var(--hkydf-gh-form-secondary);
  border-radius: 1rem;
  padding: 24px;
  margin-bottom: 24px;
  color: var(--hkydf-gh-form-primary);
}

.hkydf-gh-campaign-stats__amounts {
  font-weight: 700;
}

.hkydf-gh-campaign-stats__raised {
  font-size: 1.5rem;
  font-weight: 700;
}

.hkydf-gh-campaign-stats__supporters {
  font-size: 0.875rem;
  font-weight: 700;
}

.hkydf-gh-campaign-stats__indicator {
  display: flex;
  justify-content: space-between;
}

.hkydf-gh-campaign-stats__bar {
  background-color: #fff;
  border-radius: 1rem;
  height: 1rem;
  overflow: hidden;
}

.hkydf-gh-campaign-stats__bar-fill {
  background-color: var(--hkydf-gh-form-primary);
  height: 100%;
  border-radius: 8px;
  transition: width 0.3s ease;
}

.hkydf-gh-campaign-stats__bar-progress-text {
  position: relative;
  display: inline-flex;
  font-size: 0.875rem;
  background-color: #fff;
  color: var(--hkydf-gh-form-primary);
  padding: 0.5rem;
  border-radius: 1rem;
  margin-top: 10px;
  font-weight: 700;
}

.hkydf-gh-campaign-stats__bar-progress-text::before {
  content: "";
  width: 10px;
  height: 10px;
  background-color: #fff;
  position: absolute;
  top: -2px;
  left: 50%;
  transform: rotate(45deg) translateX(-50%);
}

.hkydf-gh-campaign-stats__meta {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #8c8c8c;
  margin-top: 10px;
}

h2.hkydf-gh-form__title {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 8px;
  font-size: 32px;
  font-weight: 700;
  color: var(--hkydf-gh-form-primary);
  margin-block-start: 26px;
  margin-block-end: 32px;
}

.hkydf-gh-form__title > img {
  height: 27px;
}

.hkydf-gh-form__wrapper {
  position: relative;
  border: 2px solid var(--hkydf-gh-form-secondary);
  border-radius: 0.875rem;
  padding: 0 16px 32px 16px;
}

.hkydf-gh-form__wrapper input[type="text"],
.hkydf-gh-form__wrapper input[type="email"],
.hkydf-gh-form__wrapper input[type="number"],
.hkydf-gh-form__wrapper select,
.hkydf-gh-form__wrapper textarea {
  border-radius: 1rem;
}

/* Step Progress */
.hkydf-gh-form__progress {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: start;
  max-width: 320px;
  margin: -20px auto 32px;
  gap: 0;
  z-index: 2;
}

.hkydf-gh-form__progress-step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 2;
  font-size: 20px;
}

.hkydf-gh-form__progress-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  color: var(--hkydf-gh-form-secondary);
  border: 2px solid var(--hkydf-gh-form-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  line-height: 1;
  transition: all 0.3s ease;
}

.hkydf-gh-form__progress-step--active .hkydf-gh-form__progress-number {
  background: var(--hkydf-gh-form-primary);
  border-color: var(--hkydf-gh-form-primary);
  color: #fff;
}

.hkydf-gh-form__progress-step--completed .hkydf-gh-form__progress-number {
  background: var(--hkydf-gh-form-secondary);
  border-color: var(--hkydf-gh-form-secondary);
  color: #fff;
}

.hkydf-gh-form__progress-label {
  font-size: 15px;
  color: var(--hkydf-gh-form-secondary);
  line-height: 1.2;
  text-align: center;
}

.hkydf-gh-form__progress-step--active .hkydf-gh-form__progress-label {
  color: var(--hkydf-gh-form-primary);
  font-weight: 700;
}

.hkydf-gh-form__progress-line {
  display: none;
}

/* Steps */
.hkydf-gh-form__step {
  display: none;
}

.hkydf-gh-form__step--active {
  display: block;
}

/* Fields */
.hkydf-gh-form__field {
  margin-bottom: 20px;
}

.hkydf-gh-form__label {
  display: block;
  font-weight: 700;
  margin-bottom: 10px;
  font-size: 16px;
  color: var(--hkydf-gh-form-primary);
}

.hkydf-gh-form__input,
.hkydf-gh-form__select,
.hkydf-gh-form__textarea {
  width: 100%;
  padding: 13px 16px;
  border: 2px solid #7cab8d;
  border-radius: 16px;
  font-size: 16px;
  color: var(--hkydf-gh-form-primary);
  background: #fff;
  box-sizing: border-box;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.hkydf-gh-form__input::placeholder,
.hkydf-gh-form__textarea::placeholder {
  color: #6f7f8c;
  opacity: 1;
}

.hkydf-gh-form__input:focus,
.hkydf-gh-form__select:focus,
.hkydf-gh-form__textarea:focus {
  border-color: var(--hkydf-gh-form-primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 79, 127, 0.12);
}

.hkydf-gh-form__textarea {
  min-height: 80px;
  resize: vertical;
}

.hkydf-gh-form__file {
  font-size: 0.875rem;
}

/* Quick Amounts */
.hkydf-gh-form__quick-amounts {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}

[type="button"].hkydf-gh-form__quick-amount {
  display: inline-flex;
  padding: 7px 12px;
  border: 0;
  border-radius: 0.875rem;
  background-color: #e8ecef;
  color: var(--hkydf-gh-form-primary);
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.2;
  transition: all 0.2s;
}

[type="button"].hkydf-gh-form__quick-amount:hover,
[type="button"].hkydf-gh-form__quick-amount:focus {
  background-color: var(--hkydf-gh-form-primary);
  color: #fff;
}

/* Radio Groups */
.hkydf-gh-form__radio-group {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.hkydf-gh-form__radio {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  color: var(--hkydf-gh-form-text);
  line-height: 1.2;
}

.hkydf-gh-form__radio input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--hkydf-gh-form-primary);
}

/* Checkbox */
.hkydf-gh-form__checkbox {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  font-size: 16px;
}

.hkydf-gh-form__checkbox input {
  margin: 0;
}

.hkydf-gh-form__checkbox a {
  color: var(--hkydf-gh-form-primary);
}

.hkydf-gh-form__checkbox-label-text {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
}

.hkydf-gh-form__radio_label {
  font-weight: 600;
  color: var(--hkydf-gh-form-text);
}

.hkydf-gh-form__radio_hint {
  font-size: 0.875rem;
  color: var(--hkydf-gh-form-text);
}

/* Hint */
.hkydf-gh-form__hint {
  font-size: 12px;
  color: var(--hkydf-gh-form-text);
  margin-top: 4px;
}

/* Row */
.hkydf-gh-form__row {
  display: flex;
  gap: 16px;
}

.hkydf-gh-form__row .hkydf-gh-form__field {
  flex: 1;
}

/* Card Element */
.hkydf-gh-form__card-element {
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  min-height: 44px;
}

/* Error */
.hkydf-gh-form__error {
  background: #fff0f0;
  border: 1px solid #ffccc7;
  color: #cf1322;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 16px;
  font-size: 0.875rem;
}

/* Success */
.hkydf-gh-form__success {
  text-align: center;
  padding: 32px;
}

.hkydf-gh-form__success h3 {
  color: #19be6b;
  font-size: 20px;
}

/* Actions */
.hkydf-gh-form__actions {
  display: flex;
  justify-content: center;
  margin-top: 34px;
  gap: 12px;
}

.hkydf-gh-form__btn {
  padding: 10px 28px;
  border: none;
  border-radius: 13px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.1;
  cursor: pointer;
  transition: all 0.2s;
}

.hkydf-gh-form__btn--prev {
  background: #f0f0f0;
  color: #666;
}

.hkydf-gh-form__btn--prev:hover {
  background: #e0e0e0;
}

.hkydf-gh-form__btn--next,
.hkydf-gh-form__btn--submit {
  background: var(--hkydf-gh-form-primary);
  color: #fff;
}

.hkydf-gh-form__btn--next::after {
  content: " »";
  color: #82bd22;
}

.hkydf-gh-form__btn--next:hover,
.hkydf-gh-form__btn--submit:hover {
  background: #003f66;
}

.hkydf-gh-form__btn--submit:disabled {
  background: #b0d0f0;
  cursor: not-allowed;
}

.hkydf-gh-form__payment-method-intro {
  color: var(--hkydf-gh-form-primary);
  text-align: center;
  font-weight: 600;
}

/* Payment Methods */
.hkydf-gh-form__payment-method-fieldset {
  margin: 0 0 1rem;
  padding: 0;
  border: 0;
}

.hkydf-gh-form__payment-method-legend {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hkydf-gh-form__payment-method-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  max-width: 15rem;
  margin: 0 auto 1.25rem;
}

.hkydf-gh-form__payment-method-option {
  position: relative;
  cursor: pointer;
}

.hkydf-gh-form__payment-method-option > input[type="radio"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hkydf-gh-form__payment-method-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  aspect-ratio: 1;
  padding: 0.75rem 0.35rem;
  box-sizing: border-box;
  border: 2px solid rgba(2, 75, 121, 0.5);
  border-radius: 16px;
  color: var(--hkydf-gh-form-text);
  transition:
    border-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}

.hkydf-gh-form__payment-method-inner > svg {
  width: 33px;
  height: 33px;
  color: rgba(2, 75, 121, 0.5);
}

input[type="radio"]:checked + .hkydf-gh-form__payment-method-inner {
  border-color: var(--hkydf-gh-form-secondary);
  color: var(--hkydf-gh-form-secondary);
  box-shadow: 0 0 0 1px var(--hkydf-gh-form-secondary);
}

input[type="radio"]:checked + .hkydf-gh-form__payment-method-inner > svg {
  color: var(--hkydf-gh-form-secondary);
}

.hkydf-gh-form__payment-method-label {
  font-size: 0.875rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.25;
}

.hkydf-gh-form__payment-section,
.hkydf-gh-form__payment-consent {
  max-width: 40rem;
  margin: 0 auto 1.5rem;
}

.hkydf-gh-form__payment-notes p {
  font-size: 0.875rem;
  color: var(--hkydf-gh-form-text);
  line-height: 1.55;
}

.hkydf-gh-form__payment-consent-checkbox-label {
  font-weight: 400;
  color: var(--hkydf-gh-form-text);
  line-height: 1.2;
}

.hkydf-gh-form__payment-consent-checkbox-label > a {
  color: var(--hkydf-gh-form-secondary);
}

.hkydf-gh-form__payment-consent-checkbox-label > a:hover {
  color: var(--hkydf-gh-form-primary);
}

/* Responsive */
@media (max-width: 480px) {
  .hkydf-gh-form__progress {
    max-width: 280px;
  }

  .hkydf-gh-form__progress-label {
    font-size: 12px;
  }

  .hkydf-gh-form__row {
    flex-direction: column;
    gap: 0;
  }

  .hkydf-gh-form__radio-group {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .hkydf-gh-form__quick-amounts {
    gap: 8px;
  }

  .hkydf-gh-campaign-stats__raised {
    font-size: 22px;
  }
}

/* Toast */
.hkydf-gh-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 99998;
  animation: hkydf-gh-overlay-in 0.3s ease;
}

.hkydf-gh-overlay--hiding {
  animation: hkydf-gh-overlay-out 0.3s ease forwards;
}

@keyframes hkydf-gh-overlay-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes hkydf-gh-overlay-out {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

.hkydf-gh-toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  z-index: 99999;
  animation: hkydf-gh-toast-in 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hkydf-gh-toast--loading {
  background: #fff;
  color: #333;
  border: 1px solid #ddd;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.hkydf-gh-toast--success {
  background: #f6ffed;
  color: #52c41a;
  border: 1px solid #b7eb8f;
}

.hkydf-gh-toast--error {
  background: #fff2f0;
  color: #ff4d4f;
  border: 1px solid #ffccc7;
}

.hkydf-gh-toast--hiding {
  animation: hkydf-gh-toast-out 0.3s ease forwards;
}

@keyframes hkydf-gh-toast-in {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes hkydf-gh-toast-out {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

.hkydf-gh-toast__spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #ddd;
  border-top-color: #333;
  border-radius: 50%;
  animation: hkydf-gh-toast-spin 0.6s linear infinite;
}

@keyframes hkydf-gh-toast-spin {
  to {
    transform: rotate(360deg);
  }
}
