/**
 * Donation Form Shortcode Styles
 * Additional styles for the shortcode-generated form
 * 
 * @package Special_Got_Webbed
 * @since 1.0.0
 */

/* Form Container */
#special-donation-form {
  max-width: 800px;
  margin: 0 auto;
  padding: 30px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Progress Bar */
.form-progress-bar {
  display: flex;
  justify-content: space-between;
  margin-bottom: 40px;
  position: relative;
  padding-top: 16px;
}

.form-progress-bar::before {
  content: '';
  position: absolute;
  top: 0px;
  left: 0;
  right: 0;
  height: 8px;
  background: #ffc789;
  z-index: 0;
}

.progress-step {
  display: flex;
  flex-direction: row;
  flex: 1;
  text-align: center;
  position: relative;
  z-index: 1;
  align-items: center;
  gap: 8px;
  justify-content: center;
}

.progress-step .step-counter {
  display: inline-block;
  font-size: 13px;
  width: 28px;
  height: 28px;
  line-height: 28px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #e0e0e0;
  font-weight: bold;
  margin-bottom: 8px;
  transition: all 0.3s ease;
}

.progress-step .step-label {
  display: block;
  font-size: 14px;
  color: #666;
  transition: color 0.3s ease;
}

.progress-step.active .step-counter {
  background: #f6880e;
  border-color: #f6880e;
  color: #fff;
}

.progress-step.active .step-label {
  color: #f6880e;
  font-weight: bold;
}

.progress-step.completed .step-counter {
  background: #f6880e;
  border-color: #f6880e;
  color: #fff;
}

/* Form Steps */
.form-step {
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Form Groups */
.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 16px;
  color: #333;
}

.form-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.form-row .form-group {
  flex: 1;
  margin-bottom: 0;
}

/* Radio Groups */
.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.radio-option {
  flex: 1;
  min-width: 150px;
  cursor: pointer;
}

.radio-option input[type='radio'] {
  position: absolute;
  opacity: 0;
}

.radio-option .radio-label {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-shadow: 5.74px 5.74px 14.35px 0px #00000026;
  border: 3px solid transparent;
  border-radius: 12px;
  background:
    linear-gradient(to right, white, white),
    linear-gradient(to right, #009ab440, #f6880e40);
  background-clip: padding-box, border-box;
  background-origin: padding-box, border-box;
  transition: all 0.3s ease;
  text-align: center;
  min-height: 60px;
}

.radio-option input[type='radio']:checked + .radio-label {
  border: 3px solid transparent;
  outline: 3px solid transparent;
  background:
    linear-gradient(to right, white, white),
    linear-gradient(to right, #009ab4, #f6880e);
  background-clip: padding-box, border-box !important;
  background-origin: padding-box, border-box;
  font-weight: bold;
}

.radio-option:hover .radio-label {
  border-color: #f6880e;
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.2);
}

/* Cause Selection */
.cause-selection .radio-option {
  flex-basis: calc(50% - 12px);
}

.cause-selection .radio-label {
  flex-direction: row;
  padding: 20px 16px;
  justify-content: flex-start;
  gap: 20px;
}

.cause-selection .cause-option:has(input:checked) .radio-label:after {
  content: url(/wp-content/uploads/2025/09/mingcute-check-circle-line.svg);
  flex: 1;
  text-align: left;
}

.cause-selection .radio-label img {
  width: 40px;
  height: 40px;
  margin-bottom: 8px;
}

/* Amount Selection */
.amount-selection {
  flex-direction: row;
  flex-wrap: wrap;
}

.amount-option {
  flex-basis: calc(50% - 6px);
  min-width: unset;
}

.amount-option .radio-label {
  justify-content: center;
  padding: 16px 20px;
}

.amount-option.other-amount {
  flex-basis: 50%;
}

.amount-option.other-amount .radio-label {
  justify-content: center;
}

/* Toggle between text and input based on checked state */
.amount-option.other-amount .radio-label .other-amount-text {
  display: block;
}

.amount-option.other-amount
  input[type='radio']:checked
  + .radio-label
  .other-amount-text {
  display: none;
}

.amount-option.other-amount .radio-label .inline-other-input {
  display: none;
  width: 100%;
}

.amount-option.other-amount
  input[type='radio']:checked
  + .radio-label
  .inline-other-input {
  display: block;
}

/* Style the inline other input with gradient border */
.amount-option.other-amount .inline-other-input input {
  width: 100%;
  padding: 12px 16px;
  box-shadow: 5.74px 5.74px 14.35px 0px #00000026;
  border: 3px solid transparent;
  border-radius: 12px;
  background:
    linear-gradient(to right, white, white),
    linear-gradient(to right, #009ab440, #f6880e40);
  background-clip: padding-box, border-box;
  background-origin: padding-box, border-box;
  font-size: 16px;
  transition: all 0.3s ease;
  color: #000;
}

.amount-option.other-amount .inline-other-input input:focus,
#gdf_other_amount:focus {
  border: 3px solid transparent;
  outline: none;
  background:
    linear-gradient(to right, white, white),
    linear-gradient(to right, #009ab4, #f6880e);
  background-clip: padding-box, border-box !important;
  background-origin: padding-box, border-box;
}

.donation_amount_note {
  display: block;
  font-size: 12px;
  font-weight: normal;
  color: #666;
  margin-top: 4px;
}

/* Custom Other Input */
.custom-other-input {
  width: 100%;
  padding: 12px 16px;
  box-shadow: 5.74px 5.74px 14.35px 0px #00000026;
  border: 3px solid transparent;
  border-radius: 12px;
  background:
    linear-gradient(to right, white, white),
    linear-gradient(to right, #009ab440, #f6880e40);
  background-clip: padding-box, border-box;
  background-origin: padding-box, border-box;
  font-size: 16px;
  transition: all 0.3s ease;
}

.custom-other-input:focus {
  border: 3px solid transparent;
  outline: 3px solid transparent;
  background:
    linear-gradient(to right, white, white),
    linear-gradient(to right, #009ab4, #f6880e);
  background-clip: padding-box, border-box !important;
  background-origin: padding-box, border-box;
}

.custom-other-input-container {
  width: 100%;
  display: flex !important;
  justify-content: center !important;
  padding: 1px !important;
}

/* Support for dynamically inserted other amount input in label */
.amount-option.other-amount .radio-label .custom-other-input-container {
  display: flex !important;
}

.amount-option.other-amount .radio-label:has(.custom-other-input-container) {
  padding: 1px;
}

/* Other amount input below (for non-shortcode forms) */
.other-amount-input {
  flex-basis: 100%;
  width: 100%;
  margin-top: 12px;
}

.other-amount-input input {
  width: 100%;
  padding: 12px 16px;
  box-shadow: 5.74px 5.74px 14.35px 0px #00000026;
  border: 3px solid transparent;
  border-radius: 12px;
  background:
    linear-gradient(to right, white, white),
    linear-gradient(to right, #009ab440, #f6880e40);
  background-clip: padding-box, border-box;
  background-origin: padding-box, border-box;
  font-size: 16px;
}

.other-amount-input input:focus {
  border: 3px solid transparent;
  outline: 3px solid transparent;
  background:
    linear-gradient(to right, white, white),
    linear-gradient(to right, #009ab4, #f6880e);
  background-clip: padding-box, border-box !important;
  background-origin: padding-box, border-box;
}

/* Switcher (Donation Type) */
.switcher-con .radio-group {
  background: #fff;
  border-radius: 50px;
  padding: 4px;
  position: relative;
}

.switcher-option {
  min-height: 62px;
  flex: 1;
  margin: 0;
}

.switcher-option .radio-label {
  border: 3px solid transparent;
  border-radius: 50px;
  background: transparent;
  padding: 12px 20px;
  min-height: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: 100%;
}

.switcher-option input[type='radio']:checked + .radio-label {
  border: 3px solid transparent;
  outline: 3px solid transparent;
  background:
    linear-gradient(to right, white, white),
    linear-gradient(to right, #009ab4, #f6880e);
  background-clip: padding-box, border-box !important;
  background-origin: padding-box, border-box;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.inner-span {
  font-size: 12px;
  font-weight: normal;
  color: #666;
  margin: 0;
}

/* Installments */
.installments-wrapper {
  margin-top: 20px;
}

.installments-wrapper label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
}

.installments-wrapper select {
  width: 100%;
  padding: 12px 16px;
  box-shadow: 5.74px 5.74px 14.35px 0px #00000026;
  border: 3px solid transparent;
  border-radius: 12px;
  background:
    linear-gradient(to right, white, white),
    linear-gradient(to right, #009ab440, #f6880e40);
  background-clip: padding-box, border-box;
  background-origin: padding-box, border-box;
  font-size: 16px;
  cursor: pointer;
}

.installments-wrapper select:focus {
  border: 3px solid transparent;
  outline: 3px solid transparent;
  background:
    linear-gradient(to right, white, white),
    linear-gradient(to right, #009ab4, #f6880e);
  background-clip: padding-box, border-box !important;
  background-origin: padding-box, border-box;
}

/* Text Inputs */
#special-donation-form input[type='text'],
#special-donation-form input[type='email'],
#special-donation-form input[type='tel'],
#special-donation-form input[type='number'] {
  width: 100%;
  padding: 12px 16px;
  box-shadow: 5.74px 5.74px 14.35px 0px #00000026;
  border: 3px solid transparent !important;
  border-radius: 12px;
  background:
    linear-gradient(to right, white, white),
    linear-gradient(to right, #009ab440, #f6880e40);
  background-clip: padding-box, border-box;
  background-origin: padding-box, border-box;
  font-size: 16px;
  transition: all 0.3s ease;
}

#special-donation-form input[type='text']:focus,
#special-donation-form input[type='email']:focus,
#special-donation-form input[type='tel']:focus,
#special-donation-form input[type='number']:focus,
#special-donation-form select:focus,
#special-donation-form textarea:focus {
  border: 3px solid transparent;
  outline: none;
  background:
    linear-gradient(to right, white, white),
    linear-gradient(to right, #009ab4, #f6880e);
  background-clip: padding-box, border-box !important;
  background-origin: padding-box, border-box;
}

/* Checkbox */
.checkbox-label {
  display: flex;
  align-items: flex-start;
  cursor: pointer;
  font-size: 14px;
}

.checkbox-label input[type='checkbox'] {
  margin-left: 8px;
  margin-top: 2px;
  width: 18px;
  height: 18px;
  box-shadow: 5.74px 5.74px 14.35px 0px #00000026;
  border: 3px solid transparent;
  border-radius: 4px;
  background:
    linear-gradient(to right, white, white),
    linear-gradient(to right, #009ab440, #f6880e40);
  background-clip: padding-box, border-box;
  background-origin: padding-box, border-box;
  cursor: pointer;
}

.checkbox-label input[type='checkbox']:checked {
  border: 3px solid transparent;
  outline: 3px solid transparent;
  background:
    linear-gradient(to right, white, white),
    linear-gradient(to right, #009ab4, #f6880e);
  background-clip: padding-box, border-box !important;
  background-origin: padding-box, border-box;
}

/* Donor Fields Toggle */
.company-donor-fields {
  display: none;
}

/* Payment Method Containers */
.payment-method-container {
  display: none;
  padding: 20px;
  background: #f9f9f9;
  border-radius: 8px;
  margin-top: 20px;
}

.payment-method-container.active,
.credit-payment-container {
  display: block;
}

/* Donation Summary */
.donation-summary {
  display: inline-block;
  padding: 12px 20px;
  background: #f1f8f4;
  border: 2px solid #f6880e;
  border-radius: 8px;
  font-weight: bold;
  color: black;
}

/* Form Actions (Navigation Buttons) */
.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 30px;
  gap: 16px;
}

button.btn-next,
button.btn-prev,
button.btn-submit {
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0px 0px 0px 0px;
  padding: 8px 20px 8px 20px;
  font-size: 20px;
  font-weight: 300;
  border-style: solid;
  border-width: 3px 3px 3px 3px;
  border-color: #009ab4;
  border-radius: 50px 50px 50px 50px;
  color: #000;
  background-color: #fff;
}

button.btn-next:hover,
button.btn-prev:hover,
button.btn-next:focus,
button.btn-prev:focus {
  background: #009ab4;
  color: white;
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

button.btn-prev {
  flex: 0;
  justify-content: center;
}

button.btn-submit {
  background: #ff9800;
  color: #fff;
  /* width: 100%; removed to allow flex sharing */
  flex: 1;
  justify-content: center;
}

button.btn-submit:hover {
  background: #f57c00;
  box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
}

.btn-next .arrow-icon {
  flex-shrink: 0;
  display: flex;
}

.btn-prev .arrow-icon {
  flex-shrink: 0;
  display: flex;
  transform: rotate(180deg);
}

.arrow-icon svg {
  width: 24px;
  height: 24px;
}
.payment-method-selection .radio-label {
  gap: 12px;
}

.payment-method-selection .radio-label img {
  width: 24px;
  height: auto;
  margin: 0;
  display: inline-block;
  vertical-align: middle;
}

/* Payment Note */
#credit_card_payment_note {
  margin-top: 20px;
  padding: 16px;
  background: #fff;
  border-radius: 8px;
  text-align: center;
}

#credit_card_payment_note p {
  margin: 0 0 12px 0;
  font-size: 14px;
  color: #666;
}

.payment_methods_imgs {
  max-width: 300px;
  height: auto;
}

/* Hide legacy payment injection containers to prevent duplicate buttons */
#paypal_payment,
#paybox_payment {
  display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
  #special-donation-form {
    padding: 20px;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .form-row .form-group {
    margin-bottom: 16px;
  }

  .cause-selection .radio-option {
    flex-basis: calc(50% - 12px);
  }

  .amount-option {
    flex-basis: calc(20% - 6px);
  }

  .amount-option.other-amount {
    flex-basis: 100%;
  }

  .form-actions {
    flex-direction: column-reverse;
  }

  .btn-next,
  .btn-prev {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .cause-selection .radio-option {
    flex-basis: 100%;
  }

  .progress-step .step-label {
    font-size: 12px;
  }

  .progress-step .step-counter {
    width: 35px;
    height: 35px;
    line-height: 35px;
  }
}

/* WBD editions */
@media (max-width: 768px) {
  .progress-step {
    gap: 2px;
  }

  .progress-step .step-counter {
    width: 24px;
    height: 24px;
    line-height: 24px;
    font-size: 14px;
  }

  .cause-selection .radio-label {
    padding: 8px 8px;
  }
  .cause-selection .radio-label img {
    width: 36px;
    height: 36px;
    margin-bottom: 0;
  }

  .amount-option {
    flex-basis: calc(45% - 6px);
  }

  .switcher-option {
    min-width: 100%;
  }
  span.donation-summary {
    font-size: 13px;
  }
  button.btn-next,
  button.btn-prev,
  button.btn-submit {
    padding: 4px 12px 4px 12px;
    font-size: 14px;
  }
  .form-actions {
    flex-direction: row !important;
  }
  .form-row {
    margin: 0;
  }
  .form-row .form-group {
    margin-bottom: 8px;
  }
  .second_step .spaced-row {
    margin: 0;
  }
  .payment-method-selection span.radio-label {
    padding: 4px;
    font-size: 14px;
  }
  .payment-method-selection {
    gap: 8px;
  }
  .payment-method-container {
    padding: 8px;
  }
}
