/* ──────────────────────────────────────────────────────────────────────────
   Donation Portal – Frontend Form Styles
   ────────────────────────────────────────────────────────────────────────── */

/* === Wrapper === */
.dp-wrap {
  max-width: 600px;
  margin: 0 auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #1a1a1a;
}

/* === Header === */
.dp-header {
  text-align: center;
  margin-bottom: 28px;
}
.dp-header h2 {
  font-size: 1.8rem;
  margin-bottom: 8px;
  color: #c0392b;
}
.dp-header p {
  font-size: 0.95rem;
  color: #555;
  margin: 0;
}

/* === Amount picker === */
.dp-amount-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.dp-amount-btn {
  display: block;
  width: 100%;
  padding: 14px 8px;
  background: #fff;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
  line-height: 1;
}
.dp-amount-btn:hover {
  border-color: #c0392b;
  color: #c0392b;
}
.dp-amount-btn.dp-selected {
  background: #c0392b;
  border-color: #c0392b;
  color: #fff;
}
.dp-custom-amount-row {
  margin-bottom: 20px;
}
.dp-custom-amount-row label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: #444;
}
.dp-input-prefix {
  position: relative;
  display: flex;
  align-items: stretch;
}
.dp-input-prefix span {
  display: flex;
  align-items: center;
  padding: 0 12px;
  background: #f5f5f5;
  border: 1px solid #ccc;
  border-right: none;
  border-radius: 4px 0 0 4px;
  font-weight: 600;
  font-size: 1rem;
  color: #555;
}
.dp-input-prefix input {
  flex: 1;
  border-radius: 0 4px 4px 0 !important;
}

/* === Form fields === */
.dp-form-section {
  background: #fafafa;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 20px;
}
.dp-form-section h3 {
  margin: 0 0 16px;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #888;
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 8px;
}
.dp-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.dp-field {
  display: flex;
  flex-direction: column;
  margin-bottom: 14px;
}
.dp-field:last-child {
  margin-bottom: 0;
}
.dp-field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #444;
  margin-bottom: 4px;
}
.dp-field label .dp-required {
  color: #c0392b;
  margin-left: 2px;
}
.dp-field input,
.dp-field textarea {
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #fff;
  width: 100%;
  box-sizing: border-box;
}
.dp-field input:focus,
.dp-field textarea:focus {
  outline: none;
  border-color: #c0392b;
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.12);
}
.dp-field input.dp-error,
.dp-field textarea.dp-error {
  border-color: #e74c3c;
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.12);
}

/* === Card fields === */
.dp-card-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
}
.dp-card-icons {
  display: flex;
  gap: 6px;
  align-items: center;
  float: right;
  margin-top: -2px;
}
.dp-card-icons img {
  height: 22px;
  border-radius: 3px;
}
.dp-bogus-badge {
  display: inline-block;
  background: #f39c12;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: 3px;
  vertical-align: middle;
  margin-left: 8px;
}

/* === Message area === */
.dp-notice {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 16px;
  font-size: 0.9rem;
  display: none;
}
.dp-notice.dp-error {
  background: #fdecea;
  border: 1px solid #f5c6c2;
  color: #922b21;
  display: block;
}
.dp-notice.dp-success {
  background: #e8f8f0;
  border: 1px solid #a9dfbf;
  color: #1e6b3d;
  display: block;
}

/* === Submit button === */
.dp-submit-wrap {
  text-align: center;
  margin-top: 6px;
}
.dp-submit-btn {
  display: inline-block;
  padding: 16px 48px;
  background: #c0392b;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.03em;
  transition: background 0.2s, transform 0.1s;
  min-width: 200px;
}
.dp-submit-btn:hover {
  background: #a93226;
}
.dp-submit-btn:active {
  transform: scale(0.98);
}
.dp-submit-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}
.dp-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: dp-spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}
@keyframes dp-spin {
  to { transform: rotate(360deg); }
}
.dp-secure-notice {
  margin-top: 12px;
  color: #888;
  font-size: 0.78rem;
}
.dp-secure-notice .dashicons {
  font-size: 14px;
  vertical-align: middle;
}

/* === Success screen === */
.dp-success-screen {
  text-align: center;
  padding: 40px 20px;
  display: none;
}
.dp-success-screen .dp-tick {
  font-size: 4rem;
  color: #27ae60;
  display: block;
  margin-bottom: 16px;
}
.dp-success-screen h2 {
  font-size: 1.6rem;
  color: #1a1a1a;
  margin-bottom: 8px;
}
.dp-success-screen p {
  color: #555;
  margin-bottom: 6px;
}
.dp-success-screen .dp-reference {
  display: inline-block;
  background: #f0f0f0;
  padding: 6px 12px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 1rem;
  margin-top: 8px;
}

/* === Responsive === */
@media (max-width: 520px) {
  .dp-row,
  .dp-card-row {
    grid-template-columns: 1fr;
  }
  .dp-amount-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
