/* Keren Ohr Direct Stripe Donation Widget - Scoped Styles */
.ko-donate-wrap,
.ko-donate-wrap *,
.ko-donate-wrap *::before,
.ko-donate-wrap *::after {
  box-sizing: border-box;
}

.ko-donate-wrap {
  --ko-gold: #B19A67;
  --ko-gold-dark: #8e794b;
  --ko-gold-light: #faf7f0;
  --ko-plum: #614051;
  --ko-plum-dark: #462d3a;
  --ko-plum-hover: #734c60;
  --ko-text: #222222;
  --ko-muted: #6b7280;
  --ko-border: #d8d8d8;
  --ko-error: #c62828;
  max-width: 480px;
  min-width: 260px;
  margin: 0 auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Open Sans", Helvetica, Arial, sans-serif;
  color: var(--ko-text);
  line-height: 1.45;
  text-align: left;
}

.ko-top-tax-note {
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: #333;
  margin: 0 0 10px 0;
}

.ko-card {
  background: #ffffff;
  border-radius: 6px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.10), 0 1px 3px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

/* Header Bar (Matches Donorbox Gold Top Bar) */
.ko-header {
  background-color: var(--ko-gold);
  color: #ffffff;
  padding: 15px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  user-select: none;
}

.ko-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ko-nav-btn {
  appearance: none;
  background: rgba(255, 255, 255, 0.18);
  border: none;
  color: #ffffff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background 0.18s ease;
}

.ko-nav-btn:hover {
  background: rgba(255, 255, 255, 0.30);
}

.ko-nav-btn.ko-hidden {
  visibility: hidden;
  pointer-events: none;
}

.ko-header-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #ffffff;
}

.ko-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ko-step-dots {
  display: flex;
  align-items: center;
  gap: 7px;
}

.ko-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.75);
  background: transparent;
  transition: all 0.2s ease;
}

.ko-dot.is-active {
  background: #ffffff;
  border-color: #ffffff;
  transform: scale(1.12);
}

.ko-lock-icon {
  display: inline-flex;
  align-items: center;
  opacity: 0.92;
}

/* Body & Step Panels */
.ko-body {
  padding: 22px 24px 18px;
  background: #ffffff;
}

.ko-step-panel {
  display: none;
  animation: koFadeIn 0.22s ease;
}

.ko-step-panel.is-active {
  display: block;
}

@keyframes koFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.ko-cta-msg {
  text-align: center;
  font-size: 16px;
  color: #111111;
  margin: 0 0 16px 0;
  font-weight: 500;
}

/* Frequency Toggle (One-time vs Monthly) */
.ko-freq-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 10px;
  border-radius: 4px;
  overflow: hidden;
}

.ko-freq-btn {
  appearance: none;
  padding: 11px 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--ko-gold) !important;
  background: #ffffff;
  color: var(--ko-gold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.18s ease;
  margin: 0;
}

.ko-freq-btn:first-child {
  border-right: none !important;
  border-radius: 4px 0 0 4px;
}

.ko-freq-btn:last-child {
  border-radius: 0 4px 4px 0;
}

.ko-freq-btn.is-active {
  background: var(--ko-gold) !important;
  color: #ffffff !important;
}

.ko-freq-btn svg path {
  fill: var(--ko-gold);
  transition: fill 0.18s ease;
}

.ko-freq-btn.is-active svg path {
  fill: #ffffff;
}

.ko-recurring-note {
  text-align: center;
  font-size: 12px;
  color: var(--ko-muted);
  margin: 4px 0 14px;
  min-height: 18px;
}

/* Suggested Amount Tiers */
.ko-tiers-list {
  list-style: none !important;
  margin: 0 0 16px 0 !important;
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.ko-tier-item {
  border: 1.5px solid var(--ko-border);
  border-radius: 5px;
  padding: 11px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
  background: #ffffff;
  margin: 0 !important;
}

.ko-tier-item:hover {
  border-color: var(--ko-gold);
}

.ko-tier-item.is-selected {
  border-color: var(--ko-gold);
  background: var(--ko-gold-light);
  box-shadow: inset 0 0 0 0.5px var(--ko-gold);
}

.ko-radio-circle {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #9ca3af;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ko-tier-item.is-selected .ko-radio-circle {
  border-color: var(--ko-gold);
}

.ko-tier-item.is-selected .ko-radio-circle::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ko-gold);
}

.ko-tier-content {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.ko-tier-amount-row {
  display: flex;
  align-items: baseline;
  gap: 2px;
  font-size: 20px;
  font-weight: 700;
  color: #111111;
  line-height: 1.2;
}

.ko-tier-currency {
  font-size: 15px;
  font-weight: 600;
  color: #444444;
}

.ko-tier-desc {
  font-size: 13px;
  color: #555555;
  margin-top: 2px;
}

/* Custom Amount Input inside Tier */
.ko-custom-input-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
}

.ko-custom-input {
  border: none !important;
  border-bottom: 1px solid #cbd5e1 !important;
  background: transparent !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  color: #111111 !important;
  padding: 2px 4px !important;
  width: 165px !important;
  outline: none !important;
  box-shadow: none !important;
}

.ko-custom-input:focus {
  border-bottom-color: var(--ko-gold) !important;
}

.ko-custom-input::placeholder {
  font-weight: 400;
  font-size: 15px;
  color: #9ca3af;
}

/* Checkboxes & Fields */
.ko-checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 11px 0;
  cursor: pointer;
  font-size: 13.5px;
  color: #333333;
}

.ko-checkbox-row input[type="checkbox"] {
  accent-color: var(--ko-gold);
  width: 16px;
  height: 16px;
  margin-top: 2px;
  cursor: pointer;
  flex-shrink: 0;
}

.ko-comment-box {
  margin-top: 8px;
  display: none;
}

.ko-comment-box.is-visible {
  display: block;
}

.ko-textarea,
.ko-input {
  width: 100% !important;
  padding: 11px 12px !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 4px !important;
  font-size: 14.5px !important;
  color: #111111 !important;
  background: #ffffff !important;
  transition: border-color 0.15s ease !important;
  outline: none !important;
  box-shadow: none !important;
  font-family: inherit !important;
}

.ko-textarea:focus,
.ko-input:focus {
  border-color: var(--ko-gold) !important;
  box-shadow: 0 0 0 2px rgba(177, 154, 103, 0.18) !important;
}

/* Step 2 Form Grid */
.ko-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 420px) {
  .ko-grid-2 {
    grid-template-columns: 1fr;
  }
  .ko-body {
    padding: 18px 16px 14px;
  }
}

.ko-field-group {
  margin-bottom: 14px;
}

.ko-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: #4b5563;
  margin-bottom: 5px;
}

.ko-req {
  color: var(--ko-error);
}

.ko-hint-badge {
  display: inline-block;
  font-size: 11.5px;
  color: var(--ko-muted);
  background: #f3f4f6;
  padding: 2px 7px;
  border-radius: 10px;
  margin-top: 3px;
}

/* Summary Pill on Step 2 & 3 */
.ko-summary-bar {
  background: var(--ko-gold-light);
  border: 1px solid rgba(177, 154, 103, 0.45);
  border-radius: 5px;
  padding: 10px 13px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13.5px;
}

.ko-summary-bar strong {
  color: #111111;
  font-size: 15px;
}

.ko-edit-link {
  background: none !important;
  border: none !important;
  color: var(--ko-plum) !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  text-decoration: underline !important;
  cursor: pointer !important;
  padding: 0 !important;
}

/* Step 3 Stripe Payment Container */
.ko-payment-loading {
  text-align: center;
  padding: 28px 12px;
  color: var(--ko-muted);
  font-size: 14px;
}

.ko-spinner {
  width: 26px;
  height: 26px;
  border: 3px solid #e5e7eb;
  border-top-color: var(--ko-gold);
  border-radius: 50%;
  animation: koSpin 0.75s linear infinite;
  margin: 0 auto 10px;
}

@keyframes koSpin {
  to { transform: rotate(360deg); }
}

.ko-error-banner {
  display: none;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--ko-error);
  padding: 10px 12px;
  border-radius: 4px;
  font-size: 13px;
  margin: 10px 0;
}

.ko-error-banner.is-visible {
  display: block;
}

/* Footer CTA Button (Matches Donorbox Plum #614051) */
.ko-footer {
  padding: 6px 24px 22px;
  background: #ffffff;
}

.ko-primary-btn {
  appearance: none;
  width: 100%;
  background-color: var(--ko-plum) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 4px !important;
  box-shadow: 0 2px 0 0 var(--ko-plum-dark) !important;
  padding: 14px 18px !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  transition: background-color 0.16s ease, opacity 0.16s ease !important;
}

.ko-primary-btn:hover:not(:disabled) {
  background-color: var(--ko-plum-hover) !important;
}

.ko-primary-btn:disabled {
  opacity: 0.65 !important;
  cursor: not-allowed !important;
}

.ko-secure-footer {
  text-align: center;
  font-size: 11.5px;
  color: #777777;
  margin-top: 12px;
  line-height: 1.4;
}

.ko-portal-link {
  display: inline-block;
  margin-top: 4px;
  color: var(--ko-gold-dark);
  text-decoration: underline;
}

/* Thank You Screen */
.ko-thankyou {
  text-align: center;
  padding: 12px 4px 6px;
}

.ko-ty-badge {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #ecfdf5;
  color: #059669;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.ko-ty-title {
  font-size: 22px;
  font-weight: 700;
  color: #111111;
  margin: 0 0 8px 0;
}

.ko-ty-receipt-box {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 14px 16px;
  text-align: left;
  font-size: 13.5px;
  margin: 16px 0;
}

.ko-ty-row {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  border-bottom: 1px dashed #e5e7eb;
}

.ko-ty-row:last-child {
  border-bottom: none;
}

.ko-test-badge {
  background: #fef3c7;
  color: #92400e;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  padding: 4px 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
