/* ============================================================
   Sudamaseva Module Styles
   ============================================================
   Note: Form input/label styles are inherited from
   modules/Donation/assets/css/donate.css (.form-fields)
   Only Sudamaseva-specific additions go here.
   ============================================================ */

/* --- Tier Selection Cards --- */

.tier-card {
  cursor: pointer;
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  text-align: center;
  transition: all var(--transition-fast);
  background: var(--white);
}

.tier-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary-light) !important;
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.tier-card.selected {
  border-color: var(--primary) !important;
  background: linear-gradient(135deg, rgba(200, 107, 31, 0.08), rgba(200, 107, 31, 0.02));
  box-shadow: 0 0 0 1px var(--primary);
}

.tier-card .tier-amount {
  font-size: 24px;
  font-weight: 700;
  color: var(--maroon);
  margin-bottom: 4px;
}

.tier-card .tier-label {
  font-size: 12px;
  color: var(--text-light);
  line-height: 1.4;
}

/* Custom Tier */
.custom-tier {
  cursor: pointer;
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  text-align: center;
  transition: all var(--transition-fast);
  background: var(--cream-light);
}

.custom-tier:hover {
  border-color: var(--primary) !important;
  background: #fff8f0 !important;
}

.custom-tier.selected {
  border-color: var(--primary) !important;
  border-style: solid;
  background: linear-gradient(135deg, rgba(200, 107, 31, 0.05), rgba(200, 107, 31, 0.01));
}

/* Custom Amount Input (matching donate.css .custom-amount-input-wrap pattern) */
#customAmountWrap {
  display: none;
  margin-top: var(--space-sm);
  padding: var(--space-sm) 0;
}

#customAmountWrap.active {
  display: block;
}

#customAmountWrap label {
  display: block;
  font-size: var(--font-size-xs);
  color: var(--text-light);
  margin-bottom: 4px;
}

#customAmountWrap .input-group {
  display: flex;
  align-items: center;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

#customAmountWrap .input-group:focus-within {
  border-color: var(--primary);
}

#customAmountWrap .input-currency {
  padding: 10px 12px;
  background: var(--cream);
  font-size: var(--font-size-base);
  font-weight: 700;
  color: var(--primary);
  border-right: 1px solid var(--border);
}

#customAmountWrap input {
  flex: 1;
  padding: 10px 14px;
  border: none;
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  font-weight: 600;
  color: var(--dark);
  outline: none;
  background: var(--white);
}

/* --- Select dropdown consistent with input styling --- */

#sudamasevaForm select.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--font-size-sm);
  color: var(--text);
  outline: none;
  background: var(--cream-light);
  transition: border-color var(--transition-fast);
  appearance: auto;
  -webkit-appearance: auto;
  -moz-appearance: auto;
}

#sudamasevaForm select.form-control:focus {
  border-color: var(--primary);
  background: var(--white);
}

/* --- Monthly Notice always visible (Sudamaseva is always monthly) --- */

#monthlyNotice {
  display: flex !important;
}

/* --- Display Amount --- */

#displayAmount {
  font-size: 32px;
  font-weight: 700;
  color: var(--maroon);
  padding: var(--space-sm) 0;
}

/* --- Loading Overlay --- */

#sudamasevaLoading {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255,255,255,0.92);
  border-radius: var(--radius-lg);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

#sudamasevaLoading .donate-loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: var(--space-md);
}

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

/* --- Success Page Tweaks --- */

.payment-result .payment-detail-value.amount {
  font-size: 20px;
  font-weight: 700;
  color: var(--maroon);
}

.donate-detail-info {
  min-width: 0;
}

/* --- Mode Toggle (Auto Monthly / Pay Monthly) --- */

.mode-toggle-row {
  display: flex;
  gap: 8px;
  background: var(--cream-light);
  padding: 4px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.mode-toggle-row .mode-btn {
  flex: 1;
  padding: 10px 14px;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-light);
  background: transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
}

.mode-toggle-row .mode-btn i {
  margin-right: 6px;
}

.mode-toggle-row .mode-btn:hover {
  color: var(--text);
  background: rgba(255,255,255,0.6);
}

.mode-toggle-row .mode-btn.active {
  background: var(--white);
  color: var(--maroon);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* --- Mobile --- */

@media (max-width: 600px) {
  .tier-card,
  .custom-tier {
    padding: var(--space-md) !important;
  }

  .tier-card .tier-amount {
    font-size: 20px;
  }
}
