/* Material UI-inspired palette & elevation */
.pmd-donation-form-container {
  --mui-primary: #1976d2;
  --mui-primary-dark: #115293;
  --mui-primary-contrast: #fff;
  --mui-surface: #ffffff;
  --mui-border: #e5e7eb;
  --mui-muted: #64748b;
  --mui-radius: 12px;
  --mui-elev-1: 0 1px 2px rgba(0, 0, 0, 0.08), 0 1px 1px rgba(0, 0, 0, 0.06);
  --mui-elev-2: 0 2px 6px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);

  max-width: 680px;
  margin: 0 auto;
  padding: 28px;
  background: var(--mui-surface);
  border-radius: var(--mui-radius);
  box-shadow: var(--mui-elev-2);
  font-family:
    "Roboto",
    "Segoe UI",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Helvetica Neue",
    Arial,
    sans-serif;
}

.pmd-form-group {
  margin-bottom: 18px;
}
.pmd-form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: #0f172a;
  letter-spacing: 0.2px;
}

.pmd-form-control {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--mui-border);
  border-radius: 10px;
  font-size: 16px;
  box-sizing: border-box;
  background: #fff;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}
.pmd-form-control:focus {
  outline: none;
  border-color: var(--mui-primary);
  box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.2);
}

.pmd-amount-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

/* Unified Premium Selection Cards */
.pmd-selection-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.pmd-selection-card:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.pmd-selection-card.is-selected {
  border-color: #3b82f6;
  background: #f0f7ff;
  box-shadow: 0 0 0 1.5px #3b82f6, 0 8px 16px rgba(59, 130, 246, 0.12);
}

.pmd-selection-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pmd-selection-card .card-value {
  display: block;
  font-size: 22px;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 6px;
  line-height: 1.2;
}

.pmd-selection-card .card-desc {
  display: block;
  font-size: 14px;
  color: #64748b;
  font-weight: 500;
  line-height: 1.4;
}

/* Specific overrides for donation options */

/* Specific overrides for installment cards */
.pmd-installment-card {
  align-items: flex-start; /* As per image: text aligned left */
  text-align: left;
  padding: 18px 22px;
}
.pmd-installment-card .card-value { margin-bottom: 2px; }
.pmd-installment-card .card-desc { font-size: 13px; margin-bottom: 8px; order: -1; } /* Step name above price */
.pmd-installment-card .card-fee { font-size: 12px; color: #10b981; font-weight: 600; }

.pmd-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--mui-primary);
  color: var(--mui-primary-contrast);
  border: none;
  padding: 14px 18px;
  font-size: 16px;
  font-weight: 700;
  border-radius: 999px;
  cursor: pointer;
  width: 100%;
  transition:
    background 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.06s ease;
  box-shadow: var(--mui-elev-1);
}
.pmd-submit-btn:hover {
  background: var(--mui-primary-dark);
  box-shadow: var(--mui-elev-2);
}
.pmd-submit-btn:active {
  transform: translateY(1px);
}
.pmd-submit-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.25);
}

/* Ripple */
.pmd-ripple {
  position: relative;
  overflow: hidden;
}
.pmd-ripple .pmd-ripple-circle {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  animation: pmd-ripple 600ms linear;
  background-color: rgba(255, 255, 255, 0.5);
  pointer-events: none;
}
@keyframes pmd-ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

.pmd-message {
  padding: 12px 14px;
  margin-top: 16px;
  border-radius: 10px;
  display: none;
  border: 1px solid transparent;
  font-weight: 500;
}
.pmd-message.success {
  background: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
}
.pmd-message.error {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}

/* Installment Schedule Cards */
.pmd-installment-toggle {
  cursor: pointer;
  display: flex !important;
  align-items: center;
  padding: 16px 20px !important;
  background: #eff6ff !important;
  border-radius: 12px !important;
  border: 1px solid #bfdbfe !important;
  margin-bottom: 20px;
  transition: all 0.2s ease;
}
.pmd-installment-toggle:hover {
  background: #dbeafe !important;
  border-color: #93c5fd !important;
}
.pmd-installment-toggle input[type="checkbox"] {
  margin-right: 15px !important;
  transform: scale(1.2);
}

#pmd-installment-schedule {
  position: relative;
  padding-left: 12px;
}
#pmd-installment-schedule::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  bottom: 5px;
  width: 3px;
  background: #3b82f6;
  border-radius: 4px;
  opacity: 0.8;
}

.pmd-installment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.pmd-installment-card {
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  position: relative;
}

.pmd-installment-card:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.pmd-installment-card.is-selected {
  border-color: #3b82f6;
  background: #f0f7ff;
  box-shadow:
    0 0 0 1px #3b82f6,
    0 4px 12px rgba(59, 130, 246, 0.12);
}

.inst-card-title {
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 8px;
}

.inst-card-amount {
  font-size: 22px;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 4px;
}

.inst-card-fee {
  font-size: 12px;
  color: #10b981;
  font-weight: 600;
}

#custom_amount_group {
  transition: all 0.3s ease;
}

/* Member System Styles */
.pmd-auth-container {
  max-width: 400px;
  margin: 40px auto;
  padding: 30px;
  background: #fff;
  border-radius: 12px;
  box-shadow: var(--mui-elev-2);
  border: 1px solid var(--mui-border);
}

.pmd-auth-container h3 {
  margin-bottom: 20px;
  text-align: center;
}
.pmd-auth-footer {
  margin-top: 20px;
  text-align: center;
  font-size: 14px;
  color: var(--mui-muted);
}

.pmd-dashboard-container {
  max-width: 900px;
  margin: 20px auto;
}

.pmd-dash-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: var(--mui-elev-1);
  margin-bottom: 30px;
}

.pmd-plan-card {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 25px;
  box-shadow: var(--mui-elev-1);
  border: 1px solid var(--mui-border);
}

.plan-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
}

.plan-title strong {
  font-size: 1.2em;
  color: var(--mui-primary);
}
.plan-date {
  display: block;
  font-size: 12px;
  color: var(--mui-muted);
}

.total-value {
  font-size: 1.25em;
  font-weight: 700;
  color: #0f172a;
}

.pmd-progress-container {
  background: #f1f5f9;
  height: 10px;
  border-radius: 5px;
  margin: 15px 0 25px;
  position: relative;
}

.pmd-progress-bar {
  background: var(--mui-primary);
  height: 100%;
  border-radius: 5px;
  transition: width 0.5s ease;
}

.progress-text {
  position: absolute;
  right: 0;
  top: -20px;
  font-size: 12px;
  font-weight: 600;
}

.pmd-installments-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.pmd-installments-table th {
  text-align: left;
  padding: 10px;
  border-bottom: 2px solid var(--mui-border);
  color: var(--mui-muted);
  font-size: 13px;
  text-transform: uppercase;
}

.pmd-installments-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.pmd-status-badge {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.status-paid {
  background: #dcfce7;
  color: #166534;
}
.status-pending {
  background: #fef9c3;
  color: #854d0e;
}

.pmd-pay-now-btn {
  background: #635bff;
  color: #fff;
  border: none;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
}

.pmd-pay-now-btn:hover {
  background: #4b45d2;
  transform: translateY(-1px);
}

/* PayPal buttons container spacing */
#pmd-paypal-button-container {
  margin-top: 8px;
}
