/* ═══════════════════════════════════════════════════════════════════
   BACDU Contact Multi — Frontend Styles v1.0.0
   Brand: #1a3d2b (green) · #6b1a2b (maroon) · #c9a227 (gold)
   ═══════════════════════════════════════════════════════════════════ */

/* ── CSS Variables ── */
.bacdu-cf-wrap {
  --bcf-green:        #1a3d2b;
  --bcf-green-mid:    #2e6b47;
  --bcf-green-light:  #d4ede0;
  --bcf-green-pale:   #eef7f2;
  --bcf-maroon:       #6b1a2b;
  --bcf-maroon-light: #f5e0e4;
  --bcf-gold:         #c9a227;
  --bcf-gold-light:   #fdf3d8;
  --bcf-cream:        #f8f4ed;
  --bcf-ink:          #1c1c1a;
  --bcf-ink-mid:      #3d3d3a;
  --bcf-ink-light:    #6b6b67;
  --bcf-border:       rgba(28,28,26,0.13);
  --bcf-radius:       12px;
  --bcf-radius-sm:    7px;
  --bcf-shadow:       0 4px 24px rgba(26,61,43,0.09);

  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: clamp(15px, 1.5vw, 17px);
  color: var(--bcf-ink);
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(1rem, 4vw, 2rem) 0;
}
.bacdu-cf-wrap * { box-sizing: border-box; }

/* ── Header ── */
.bacdu-cf-header { margin-bottom: 1.75rem; }
.bacdu-cf-title {
  font-family: 'Playfair Display', Georgia, serif !important;
  font-size: clamp(26px, 3.5vw, 38px) !important;
  font-weight: 700 !important;
  color: var(--bcf-green) !important;
  margin: 0 0 0.4rem !important;
  line-height: 1.2 !important;
}
.bacdu-cf-subtitle {
  font-size: clamp(14px, 1.4vw, 16px);
  color: var(--bcf-ink-light);
  margin: 0;
  line-height: 1.6;
}

/* ── Message bar ── */
.bacdu-cf-msg {
  padding: 14px 18px;
  border-radius: var(--bcf-radius-sm);
  font-size: clamp(13px, 1.3vw, 15px);
  margin-bottom: 1.25rem;
  line-height: 1.5;
  border: 1px solid transparent;
}
.bacdu-cf-msg.is-success {
  background: var(--bcf-green-pale);
  color: var(--bcf-green);
  border-color: var(--bcf-green-light);
}
.bacdu-cf-msg.is-error {
  background: var(--bcf-maroon-light);
  color: var(--bcf-maroon);
  border-color: #f0c0cb;
}

/* ── Honeypot ── */
.bacdu-cf-hp {
  position: absolute !important;
  left: -9999px !important;
  opacity: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

/* ── Fields ── */
.bacdu-cf-field {
  margin-bottom: 1.1rem;
}
.bacdu-cf-field label {
  display: block;
  font-size: clamp(12px, 1.2vw, 14px);
  font-weight: 500;
  color: var(--bcf-ink-mid);
  margin-bottom: 5px;
  letter-spacing: 0.01em;
}
.bacdu-cf-req { color: var(--bcf-maroon); margin-left: 2px; }
.bacdu-cf-opt { color: var(--bcf-ink-light); font-weight: 400; font-size: 0.9em; }

.bacdu-cf-field input[type="text"],
.bacdu-cf-field input[type="email"],
.bacdu-cf-field input[type="tel"],
.bacdu-cf-field select,
.bacdu-cf-field textarea {
  width: 100% !important;
  padding: 11px 14px !important;
  border: 1.5px solid var(--bcf-border) !important;
  border-radius: var(--bcf-radius-sm) !important;
  font-size: clamp(14px, 1.4vw, 16px) !important;
  font-family: inherit !important;
  color: var(--bcf-ink) !important;
  background: #fff !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
  outline: none !important;
  appearance: none;
  -webkit-appearance: none;
}
.bacdu-cf-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b6b67' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 14px center !important;
  padding-right: 36px !important;
}
.bacdu-cf-field input:focus,
.bacdu-cf-field select:focus,
.bacdu-cf-field textarea:focus {
  border-color: var(--bcf-green-mid) !important;
  box-shadow: 0 0 0 3px rgba(46,107,71,0.13) !important;
}
.bacdu-cf-field textarea { resize: vertical; min-height: 140px; line-height: 1.6 !important; }

/* Row layout for name + email */
.bacdu-cf-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 540px) { .bacdu-cf-row { grid-template-columns: 1fr; } }

/* Route hint */
.bacdu-cf-route-hint {
  font-size: 12px;
  color: var(--bcf-green-mid);
  margin: 5px 0 0;
  padding: 6px 10px;
  background: var(--bcf-green-pale);
  border-radius: var(--bcf-radius-sm);
  border-left: 3px solid var(--bcf-green-mid);
}

/* Char count */
.bacdu-cf-char-count {
  font-size: 11px;
  color: var(--bcf-ink-light);
  text-align: right;
  margin: 4px 0 0;
}

/* ── Submit button ── */
.bacdu-cf-footer { margin-top: 0.5rem; }
.bacdu-cf-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 32px;
  background: var(--bcf-green);
  color: #fff !important;
  border: none;
  border-radius: var(--bcf-radius-sm);
  font-size: clamp(14px, 1.4vw, 16px);
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  min-width: 180px;
}
.bacdu-cf-submit:hover { background: var(--bcf-green-mid); box-shadow: 0 4px 16px rgba(26,61,43,0.22); }
.bacdu-cf-submit:active { transform: scale(0.98); }
.bacdu-cf-submit:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }

/* Spinner */
.bacdu-cf-spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: bacdu-spin 0.65s linear infinite;
  vertical-align: middle;
}
@keyframes bacdu-spin { to { transform: rotate(360deg); } }

.bacdu-cf-privacy {
  font-size: 11px;
  color: var(--bcf-ink-light);
  margin: 10px 0 0;
}

/* ── Success state — replace form with big checkmark ── */
.bacdu-cf-success-state {
  text-align: center;
  padding: 3rem 1rem;
}
.bacdu-cf-success-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--bcf-green-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  margin: 0 auto 1rem;
}
.bacdu-cf-success-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(22px, 2.5vw, 28px);
  color: var(--bcf-green);
  margin: 0 0 0.5rem;
}
.bacdu-cf-success-body {
  font-size: clamp(14px, 1.4vw, 16px);
  color: var(--bcf-ink-light);
  max-width: 420px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ── Admin topic pills (log page) ── */
.bacdu-cf-topic-pill {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  background: #f0f0ef;
  color: #555;
}
.bacdu-cf-topic-general   { background: #d4ede0; color: #1a3d2b; }
.bacdu-cf-topic-membership{ background: #fdf3d8; color: #7a5c00; }
.bacdu-cf-topic-donations { background: #ede9fe; color: #4c1d95; }
.bacdu-cf-topic-programs  { background: #e6f1fb; color: #185fa5; }
.bacdu-cf-topic-media     { background: #f5e0e4; color: #6b1a2b; }
.bacdu-cf-topic-heritage  { background: #fdf3d8; color: #7a5c00; }
.bacdu-cf-topic-technical { background: #f0f0ef; color: #555; }

/* ═══════════════════════════════════════════════════════════════════
   BACDU Contact Router public layout — v1.1.0
   Public-facing only: no workflow cards, no recipient exposure.
   ═══════════════════════════════════════════════════════════════════ */
.bacdu-router-shell {
  --bcr-green: #0b2f1f;
  --bcr-green-2: #153d2c;
  --bcr-maroon: #5a1020;
  --bcr-cream: #f8f4ed;
  --bcr-white: #ffffff;
  --bcr-ink: #102318;
  --bcr-muted: #5d6a61;
  --bcr-border: rgba(16, 35, 24, 0.13);

  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(380px, 0.95fr);
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: stretch;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.bacdu-router-shell * { box-sizing: border-box; }

.bacdu-router-panel {
  position: relative;
  overflow: hidden;
  min-height: 560px;
  padding: clamp(2rem, 5vw, 5.5rem) clamp(1.5rem, 4vw, 5rem);
  border-radius: 30px;
  color: #fff;
  background:
    radial-gradient(circle at 90% 100%, rgba(201, 162, 39, 0.28), transparent 28%),
    radial-gradient(circle at 72% 78%, rgba(90, 16, 32, 0.78), transparent 42%),
    linear-gradient(135deg, var(--bcr-green) 0%, #1d241d 48%, var(--bcr-maroon) 100%);
  box-shadow: 0 28px 80px rgba(11, 47, 31, 0.22);
}

.bacdu-router-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.06), transparent 42%);
  pointer-events: none;
}

.bacdu-router-eyebrow,
.bacdu-router-title,
.bacdu-router-intro,
.bacdu-router-copy { position: relative; z-index: 1; }

.bacdu-router-eyebrow {
  margin: 0 0 clamp(1.6rem, 3vw, 3rem);
  font-size: clamp(0.78rem, 1.3vw, 1rem);
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.92);
}

.bacdu-router-title {
  max-width: 760px;
  margin: 0 0 clamp(1.3rem, 2.5vw, 2.2rem);
  font-family: 'Playfair Display', Georgia, serif !important;
  font-size: clamp(3rem, 7vw, 5.8rem) !important;
  line-height: 0.98 !important;
  font-weight: 500 !important;
  letter-spacing: -0.05em;
  color: #fff !important;
}

.bacdu-router-intro {
  max-width: 760px;
  margin: 0 0 clamp(1.3rem, 2.4vw, 2.25rem);
  font-size: clamp(1.1rem, 2.35vw, 1.9rem);
  line-height: 1.55;
  font-weight: 650;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.94);
}

.bacdu-router-copy {
  max-width: 720px;
  font-size: clamp(1rem, 1.65vw, 1.28rem);
  line-height: 1.75;
  color: rgba(255,255,255,0.86);
}

.bacdu-router-copy p { margin: 0 0 1rem; }
.bacdu-router-copy p:last-child { margin-bottom: 0; }

.bacdu-router-form-card {
  min-width: 0;
  width: 100%;
  padding: clamp(1.35rem, 3vw, 3.25rem);
  border: 1px solid var(--bcr-border);
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(16, 35, 24, 0.12);
}

.bacdu-router-form-card .bacdu-cf-wrap {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 0;
}

.bacdu-router-no-panel {
  display: block;
  max-width: 820px;
}

.bacdu-router-no-panel .bacdu-router-form-card {
  margin: 0 auto;
}

@media (max-width: 980px) {
  .bacdu-router-shell {
    grid-template-columns: 1fr;
  }

  .bacdu-router-panel {
    min-height: auto;
    border-radius: 24px;
  }

  .bacdu-router-title {
    font-size: clamp(2.65rem, 11vw, 4.5rem) !important;
  }
}

@media (max-width: 640px) {
  .bacdu-router-shell {
    gap: 1rem;
  }

  .bacdu-router-panel,
  .bacdu-router-form-card {
    border-radius: 20px;
  }

  .bacdu-router-panel {
    padding: 2rem 1.25rem;
  }

  .bacdu-router-title {
    font-size: clamp(2.35rem, 13vw, 3.6rem) !important;
    letter-spacing: -0.04em;
  }

  .bacdu-router-intro {
    font-size: clamp(1rem, 5vw, 1.35rem);
  }

  .bacdu-router-form-card {
    padding: 1.25rem;
  }
}
