/* ==========================================================================
   Finding Freedom Ministries - Deliverance Intake Web Application
   6-Figure Agency Luxury Design System & Stylesheet
   ========================================================================== */

:root {
  /* Primary & Brand Color Palette */
  --color-navy-dark: #1e252d;
  --color-navy-primary: #2c3e50;
  --color-navy-surface: #34495e;
  --color-navy-muted: #5a6c7d;
  
  /* Luxury Gold & Metallic Accents */
  --color-gold-deep: #856404;
  --color-gold-primary: #c5a059;
  --color-gold-light: #dfbe76;
  --color-gold-champagne: #fdfbf7;
  --color-gold-glow: rgba(74, 144, 226, 0.22);
  --color-gold-border: rgba(74, 144, 226, 0.35);

  /* St. Paul's Church Accents */
  --color-church-blue: #4a90e2;
  --color-church-blue-dark: #357abd;
  --color-church-green: #50c878;
  
  /* Serene Neutral Surfaces */
  --color-bg-base: #ffffff;
  --color-bg-cream: #f8fafc;
  --color-surface-card: #ffffff;
  --color-surface-alt: #f8f9fa;
  --color-surface-glass: rgba(255, 255, 255, 0.95);
  
  /* Typography & Ink */
  --color-text-main: #2c3e50;
  --color-text-muted: #64748b;
  --color-text-light: #94a3b8;
  --color-text-inverse: #ffffff;

  /* Status Colors */
  --color-success: #15803d;
  --color-success-bg: #f0fdf4;
  --color-danger: #b91c1c;
  --color-danger-bg: #fef2f2;
  --color-warning: #b45309;
  --color-warning-bg: #fffbeb;

  /* Typography Stacks */
  --font-heading: 'Cormorant Garamond', Georgia, serif;
  --font-accent: 'Cinzel', serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Modern Multi-Layer Elevation Shadows */
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 8px 24px -4px rgba(15, 23, 42, 0.06), 0 4px 12px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 20px 40px -10px rgba(15, 23, 42, 0.09), 0 8px 16px -4px rgba(15, 23, 42, 0.04);
  --shadow-gold: 0 10px 28px -4px rgba(197, 160, 89, 0.35);
  --shadow-gold-hover: 0 14px 34px -4px rgba(197, 160, 89, 0.48);
  --shadow-card-luxury: 0 12px 36px -6px rgba(15, 23, 42, 0.06), 0 0 1px 1px rgba(197, 160, 89, 0.18);
  
  /* Radii */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 30px;
  --radius-full: 9999px;

  /* Spring Physics & Micro-Interactions */
  --transition-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-spring: 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Base resets & typography */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg-base);
  color: var(--color-text-main);
  line-height: 1.65;
  font-size: 15.5px;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, .font-serif {
  font-family: var(--font-heading);
  letter-spacing: -0.015em;
  font-weight: 600;
  color: var(--color-navy-primary);
}

.font-cinzel {
  font-family: var(--font-accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Background Ambient Luxury Gradients */
.luxury-bg-pattern {
  display: none !important;
}

/* ==========================================================================
   Header & Brand Navigation
   ========================================================================== */
.agency-navbar {
  background: rgba(9, 14, 26, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(197, 160, 89, 0.3);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  position: sticky;
  top: 0;
  z-index: 1020;
  padding: 0.85rem 0;
  transition: var(--transition-smooth);
}

.brand-crest {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #dfbe76 0%, #c5a059 50%, #99752b 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #090e1a;
  font-size: 20px;
  box-shadow: var(--shadow-gold);
}

.brand-title {
  font-family: var(--font-accent);
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  color: #ffffff;
  margin: 0;
  line-height: 1.1;
  font-weight: 700;
}

.brand-subtitle {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-gold-light);
  margin: 0;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
  padding: 0.35rem 0.85rem;
  font-size: 0.78rem;
  color: #e2e8f0;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #22c55e;
  box-shadow: 0 0 8px #22c55e;
  animation: pulse-dot 2.5s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

/* ==========================================================================
   Progress Stepper Navigation
   ========================================================================== */
.stepper-container {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.03);
  position: sticky;
  top: 67px;
  z-index: 1010;
  padding: 0.75rem 0 0.55rem 0;
  transition: var(--transition-fast);
}

.progress-track-wrapper {
  margin-bottom: 0.65rem;
}

.progress-metric {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
}

.agency-progress-bar {
  height: 6px;
  background: #e2e8f0;
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.agency-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #4a90e2 0%, #50c878 100%);
  border-radius: var(--radius-full);
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 10px rgba(74, 144, 226, 0.4);
}

.stepper-nav {
  display: flex;
  overflow-x: auto;
  gap: 0.5rem;
  padding: 0.2rem 0.25rem 0.5rem 0.25rem;
  scrollbar-width: thin;
  scrollbar-color: var(--color-church-blue) transparent;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scroll-padding: 0.5rem;
}

.stepper-nav::-webkit-scrollbar {
  height: 3px;
}

.stepper-nav::-webkit-scrollbar-track {
  background: transparent;
}

.stepper-nav::-webkit-scrollbar-thumb {
  background: rgba(74, 144, 226, 0.5);
  border-radius: 4px;
}

.step-nav-item {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.85rem;
  border-radius: var(--radius-full);
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: var(--color-text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
  scroll-snap-align: center;
  touch-action: manipulation;
  user-select: none;
}

.step-nav-item:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: var(--color-text-main);
  transform: translateY(-1px);
}

.step-nav-item:active {
  transform: scale(0.97);
}

.step-nav-item.active {
  background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
  border-color: #357abd;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(74, 144, 226, 0.3);
}

.step-nav-item.completed {
  background: #ecfdf5;
  border-color: #10b981;
  color: #065f46;
}

.step-nav-item .step-badge {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  background: rgba(0, 0, 0, 0.08);
  transition: var(--transition-fast);
}

.step-nav-item.active .step-badge {
  background: #ffffff;
  color: #357abd;
  font-weight: 700;
}

.step-nav-item.completed .step-badge {
  background: var(--color-gold-primary);
  color: #ffffff;
}

/* ==========================================================================
   Luxury Card Surfaces & Layout
   ========================================================================== */
.luxury-card {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(197, 160, 89, 0.24);
  box-shadow: var(--shadow-card-luxury);
  padding: 2.5rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.luxury-card:hover {
  box-shadow: 0 16px 40px -8px rgba(15, 23, 42, 0.08), 0 0 1px 1px rgba(197, 160, 89, 0.35);
  border-color: rgba(197, 160, 89, 0.38);
}

.card-gold-accent-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #99752b 0%, #c5a059 30%, #dfbe76 50%, #c5a059 70%, #99752b 100%);
}

.section-hero {
  margin-bottom: 2.25rem;
  position: relative;
}

.section-eyebrow {
  font-family: var(--font-accent);
  color: var(--color-gold-deep);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  font-weight: 700;
  margin-bottom: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-transform: uppercase;
}

.section-title {
  font-size: clamp(1.8rem, 3.2vw, 2.35rem);
  line-height: 1.18;
  color: var(--color-navy-primary);
  margin-bottom: 0.65rem;
  font-weight: 700;
}

.section-desc {
  font-size: clamp(0.95rem, 1.2vw, 1.05rem);
  color: var(--color-text-muted);
  max-width: 780px;
  line-height: 1.6;
}

/* Sub-card & Section Grouping */
.sub-group-card {
  background: #fafafa;
  border: 1px solid #edf2f7;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: var(--transition-fast);
}

.sub-group-card:hover {
  background: #ffffff;
  border-color: rgba(197, 160, 89, 0.3);
  box-shadow: var(--shadow-sm);
}

.sub-group-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--color-navy-primary);
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sub-group-subtitle {
  font-size: 0.86rem;
  color: var(--color-text-muted);
  margin-bottom: 1.1rem;
}

/* ==========================================================================
   Bespoke Interactive Choice Cards / Toggle Chips
   ========================================================================== */
.choice-card-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.choice-card {
  display: flex;
  align-items: flex-start;
  gap: 1.1rem;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 1.1rem 1.35rem;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  min-height: 52px;
}

.choice-card:hover {
  background: #fafaf8;
  border-color: var(--color-gold-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px -2px rgba(15, 23, 42, 0.06);
}

.choice-card:active {
  transform: scale(0.985);
}

.choice-card.checked {
  background: linear-gradient(135deg, #ffffff 0%, #faf6ec 100%);
  border-color: var(--color-gold-primary);
  box-shadow: 0 6px 20px -2px rgba(197, 160, 89, 0.22), 0 0 0 1px rgba(197, 160, 89, 0.35);
  transform: translateY(-1px);
}

.choice-indicator {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  border: 2px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  flex-shrink: 0;
  margin-top: 1px;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  background: #ffffff;
}

.choice-card.checked .choice-indicator {
  background: linear-gradient(135deg, #dfbe76 0%, #c5a059 100%);
  border-color: var(--color-gold-deep);
  color: #090e1a;
  box-shadow: 0 2px 8px rgba(197, 160, 89, 0.4);
  transform: scale(1.08);
}

.choice-indicator i {
  font-size: 14px;
  stroke-width: 1px;
  animation: checkPop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes checkPop {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.25); }
  100% { transform: scale(1); opacity: 1; }
}

.choice-card-body {
  flex: 1;
}

.choice-card-title {
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--color-navy-primary);
  line-height: 1.45;
  margin: 0;
}

.choice-card.checked .choice-card-title {
  color: #090e1a;
  font-weight: 600;
}

.choice-card-desc {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
  margin-bottom: 0;
}

/* Compact Grid Style for Strongholds & Afflictions */
.stronghold-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 0.75rem;
}

@media (max-width: 768px) {
  .stronghold-grid {
    grid-template-columns: 1fr;
  }
}

/* Expandable Details Container */
.conditional-expand {
  display: none;
  margin-top: 0.85rem;
  padding: 0.85rem;
  background: rgba(244, 235, 217, 0.35);
  border-left: 3px solid var(--color-gold-primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  animation: slideDown 0.3s ease-out;
}

.conditional-expand.open {
  display: block;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Form Controls, Inputs & Textareas
   ========================================================================== */
.form-label {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--color-navy-primary);
  margin-bottom: 0.4rem;
}

.form-label .required-star {
  color: var(--color-gold-deep);
  font-weight: bold;
}

.form-control, .form-select {
  border: 1.5px solid #e2e8f0;
  border-radius: var(--radius-sm);
  padding: 0.68rem 0.95rem;
  font-size: 0.92rem;
  color: var(--color-text-main);
  background-color: #ffffff;
  transition: var(--transition-fast);
}

.form-control:focus, .form-select:focus {
  border-color: var(--color-gold-primary);
  box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.2);
  outline: none;
  background-color: #ffffff;
}

.form-control::placeholder {
  color: #94a3b8;
  font-size: 0.88rem;
}

textarea.form-control {
  min-height: 95px;
  resize: vertical;
}

/* Scripture & Devotional Quote Cards */
.scripture-card {
  background: linear-gradient(135deg, #fbfaf6 0%, #f4f0e5 100%);
  border-left: 4px solid var(--color-gold-primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 1.35rem 1.6rem;
  margin: 1.5rem 0;
  box-shadow: var(--shadow-sm);
}

.scripture-text {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-style: italic;
  color: var(--color-navy-primary);
  margin-bottom: 0.4rem;
  line-height: 1.5;
}

.scripture-ref {
  font-family: var(--font-accent);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-gold-deep);
  letter-spacing: 0.08em;
  margin: 0;
}

/* Interactive Prayer Cards */
.prayer-card {
  background: #ffffff;
  border: 1.5px solid rgba(197, 160, 89, 0.35);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  position: relative;
}

.prayer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(197, 160, 89, 0.2);
}

.prayer-badge {
  background: var(--color-gold-champagne);
  color: var(--color-gold-deep);
  font-family: var(--font-accent);
  font-size: 0.75rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  letter-spacing: 0.05em;
}

.prayer-body {
  font-family: var(--font-heading);
  font-size: 1.18rem;
  line-height: 1.7;
  color: #1e293b;
  margin-bottom: 1rem;
}

.prayer-name-input {
  display: inline-block;
  border: none;
  border-bottom: 2px solid var(--color-gold-primary);
  background: rgba(197, 160, 89, 0.08);
  border-radius: 4px;
  padding: 0.1rem 0.5rem;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--color-navy-primary);
  font-weight: 700;
  outline: none;
  min-width: 180px;
}

.prayer-name-input:focus {
  background: rgba(197, 160, 89, 0.18);
  border-color: var(--color-gold-deep);
}

/* ==========================================================================
   Signature Canvas Pad
   ========================================================================== */
.signature-box-wrapper {
  background: #ffffff;
  border: 2px dashed rgba(197, 160, 89, 0.4);
  border-radius: var(--radius-md);
  padding: 1rem;
  position: relative;
  transition: var(--transition-fast);
}

.signature-box-wrapper:hover, .signature-box-wrapper:focus-within {
  border-color: var(--color-gold-primary);
  box-shadow: var(--shadow-sm);
}

.signature-canvas {
  width: 100%;
  height: 180px;
  background-color: #fdfdfd;
  border-radius: var(--radius-sm);
  cursor: crosshair;
  touch-action: none;
  display: block;
}

.signature-baseline {
  border-bottom: 1px dashed #cbd5e1;
  margin-top: -30px;
  margin-bottom: 20px;
  pointer-events: none;
}

.signature-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.75rem;
  padding-top: 0.5rem;
}

/* ==========================================================================
   Buttons & Actions
   ========================================================================== */
.btn-agency-primary {
  background: linear-gradient(135deg, #4a90e2 0%, #50c878 100%);
  color: #ffffff !important;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0.78rem 1.8rem;
  border-radius: var(--radius-full);
  border: none;
  box-shadow: 0 6px 18px rgba(74, 144, 226, 0.3);
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-agency-primary:hover {
  background: linear-gradient(135deg, #357abd 0%, #43a866 100%);
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -4px rgba(74, 144, 226, 0.45);
}

.btn-agency-primary:active {
  transform: translateY(0);
}

.btn-agency-secondary {
  background: #ffffff;
  color: var(--color-navy-primary);
  font-weight: 600;
  padding: 0.75rem 1.6rem;
  border-radius: var(--radius-full);
  border: 1.5px solid #cbd5e1;
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-agency-secondary:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: var(--color-navy-dark);
  transform: translateY(-1px);
}

.btn-agency-outline-gold {
  background: transparent;
  color: var(--color-gold-deep);
  border: 1.5px solid var(--color-gold-primary);
  font-weight: 600;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-full);
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-agency-outline-gold:hover {
  background: var(--color-gold-champagne);
  color: var(--color-navy-dark);
  border-color: var(--color-gold-deep);
}

/* Bottom Stepper Action Bar */
.wizard-footer-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.5rem;
  margin-top: 2rem;
  border-top: 1px solid #e2e8f0;
}

/* ==========================================================================
   Notice / Alert Boxes
   ========================================================================== */
.agency-alert-warning {
  background: #fffbeb;
  border: 1px solid #fef3c7;
  border-left: 4px solid #f59e0b;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 1.1rem 1.35rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.agency-alert-info {
  background: #eff6ff;
  border: 1px solid #dbeafe;
  border-left: 4px solid #3b82f6;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 1.1rem 1.35rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

/* ==========================================================================
   Review Accordion & Summary Elements
   ========================================================================== */
.review-section-header {
  background: #f8fafc;
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.25rem;
  margin-top: 1.25rem;
  margin-bottom: 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.review-item-row {
  display: flex;
  justify-content: space-between;
  padding: 0.55rem 0;
  border-bottom: 1px dashed #e2e8f0;
  font-size: 0.88rem;
}

.review-item-label {
  color: var(--color-text-muted);
  font-weight: 500;
}

.review-item-value {
  color: var(--color-navy-primary);
  font-weight: 600;
  text-align: right;
  max-width: 60%;
}

/* Submission Success State Screen */
.success-screen-card {
  text-align: center;
  padding: 3.5rem 2rem;
}

.success-icon-badge {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #dfbe76, #c5a059);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #090e1a;
  font-size: 36px;
  box-shadow: var(--shadow-gold);
  margin-bottom: 1.5rem;
  animation: scaleIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes scaleIn {
  0% { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* Floating Autosave Toast */
.autosave-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--color-navy-dark);
  color: #ffffff;
  border: 1px solid rgba(197, 160, 89, 0.4);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-full);
  padding: 0.6rem 1.2rem;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 1050;
  transition: var(--transition-smooth);
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
}

.autosave-toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Footer styling */
.agency-footer {
  background: var(--color-navy-dark);
  color: var(--color-text-light);
  border-top: 1px solid rgba(197, 160, 89, 0.25);
  padding: 3rem 0 2rem 0;
  margin-top: 4rem;
  font-size: 0.88rem;
}

.agency-footer a {
  color: var(--color-gold-light);
  text-decoration: none;
}

.agency-footer a:hover {
  text-decoration: underline;
}

/* Step transition animations */
.step-pane {
  display: none;
  animation: fadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.step-pane.active {
  display: block;
}

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

/* ==========================================================================
   Quick Search & Interactive Filter
   ========================================================================== */
.quick-filter-wrapper {
  position: relative;
  margin-bottom: 1.35rem;
}

.quick-filter-input {
  width: 100%;
  padding: 0.82rem 1rem 0.82rem 2.85rem;
  border-radius: var(--radius-full);
  border: 1.5px solid #e2e8f0;
  background: #ffffff;
  font-size: 0.94rem;
  color: var(--color-navy-primary);
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.quick-filter-input:focus {
  border-color: var(--color-gold-primary);
  box-shadow: 0 0 0 4px rgba(197, 160, 89, 0.22);
  outline: none;
}

.quick-filter-icon {
  position: absolute;
  left: 1.15rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 1.05rem;
  pointer-events: none;
  transition: color 0.2s ease;
}

.quick-filter-input:focus + .quick-filter-icon,
.quick-filter-wrapper:focus-within .quick-filter-icon {
  color: var(--color-gold-deep);
}

.quick-filter-clear {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 1rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  display: none;
  border-radius: 50%;
  transition: color 0.2s ease;
}

.quick-filter-clear:hover {
  color: var(--color-navy-dark);
}

.choice-card.filter-hidden {
  display: none !important;
}

/* ==========================================================================
   Live Selection Counter Badges
   ========================================================================== */
.section-counter-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: rgba(197, 160, 89, 0.12);
  color: var(--color-gold-deep);
  border: 1px solid rgba(197, 160, 89, 0.28);
  transition: all 0.25s ease;
}

.section-counter-badge.has-selected {
  background: linear-gradient(135deg, #dfbe76 0%, #c5a059 100%);
  color: #090e1a;
  border-color: #99752b;
  box-shadow: 0 2px 10px rgba(197, 160, 89, 0.4);
  animation: badgePop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes badgePop {
  0% { transform: scale(0.9); }
  50% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

/* ==========================================================================
   Interactive Prayer Declaration Cards
   ========================================================================== */
.prayer-card {
  transition: all 0.28s ease;
}

.prayer-card.declared {
  border-color: #16a34a;
  background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
  box-shadow: 0 6px 20px -2px rgba(22, 163, 74, 0.18), 0 0 0 1px rgba(22, 163, 74, 0.3);
}

.prayer-card.declared .prayer-badge {
  background: #16a34a;
  color: #ffffff;
}

.btn-declare-prayer {
  background: #ffffff;
  color: var(--color-navy-primary);
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius-full);
  padding: 0.5rem 1.25rem;
  font-size: 0.84rem;
  font-weight: 600;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  touch-action: manipulation;
}

.btn-declare-prayer:hover {
  background: #f8fafc;
  border-color: var(--color-gold-primary);
  color: var(--color-gold-deep);
  transform: translateY(-1px);
}

.prayer-card.declared .btn-declare-prayer {
  background: #15803d;
  color: #ffffff;
  border-color: #15803d;
  box-shadow: 0 2px 8px rgba(21, 128, 61, 0.3);
}

/* ==========================================================================
   Sticky Mobile Bottom Navigation Dock
   ========================================================================== */
.mobile-bottom-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(9, 14, 26, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(197, 160, 89, 0.32);
  box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.35);
  padding: 0.7rem 1rem calc(0.7rem + env(safe-area-inset-bottom, 0px)) 1rem;
  z-index: 1040;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.mobile-bottom-info {
  display: flex;
  flex-direction: column;
}

.mobile-step-title {
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

.mobile-progress-badge {
  color: var(--color-gold-light);
  font-size: 0.72rem;
  font-weight: 600;
}

.mobile-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-mobile-prev {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  touch-action: manipulation;
  transition: all 0.2s ease;
}

.btn-mobile-prev:active {
  background: rgba(255, 255, 255, 0.22);
  transform: scale(0.95);
}

.btn-mobile-next {
  background: linear-gradient(135deg, #dfbe76 0%, #c5a059 100%);
  color: #090e1a;
  border: none;
  border-radius: var(--radius-full);
  padding: 0.65rem 1.25rem;
  font-weight: 700;
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  touch-action: manipulation;
  box-shadow: 0 4px 14px rgba(197, 160, 89, 0.4);
  transition: all 0.2s ease;
  min-height: 44px;
}

.btn-mobile-next:active {
  transform: scale(0.97);
}

/* ==========================================================================
   Responsive Utilities & Mobile Viewport Rules
   ========================================================================== */
@media (max-width: 767.98px) {
  body {
    padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  }

  .mobile-bottom-bar {
    display: flex;
  }

  /* Prevent iOS Safari auto-zooming into inputs */
  .form-control, 
  .form-select, 
  input[type="text"], 
  input[type="email"], 
  input[type="tel"], 
  input[type="date"], 
  select, 
  textarea {
    font-size: 16px !important;
  }

  .luxury-card {
    padding: 1.35rem 1.1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.25rem;
  }

  .section-hero {
    margin-bottom: 1.5rem;
  }

  .section-title {
    font-size: 1.65rem;
  }

  .sub-group-card {
    padding: 1.15rem 1rem;
    border-radius: var(--radius-sm);
  }

  .choice-card {
    padding: 0.95rem 1rem;
  }

  .brand-title {
    font-size: 1rem;
  }

  .brand-subtitle {
    font-size: 0.65rem;
  }

  /* Hide repetitive bottom action bar inside cards on mobile since sticky bottom bar handles it */
  .wizard-footer-actions {
    display: flex;
    flex-direction: column-reverse;
    gap: 0.75rem;
  }

  .wizard-footer-actions button {
    width: 100%;
    justify-content: center;
    padding: 0.85rem 1.25rem;
  }
}

@media (min-width: 768px) and (max-width: 991.98px) {
  .luxury-card {
    padding: 1.85rem;
  }
}

/* ==========================================================================
   St. Paul's Reformed Church Website Harmonization & CSS Reset Overrides
   ========================================================================== */

/* Wrapper & Main Layout Integration */
#wrapper {
  background: #ffffff;
}

#main {
  background: #ffffff;
  padding: 3rem 2rem 2rem 2rem;
}

@media (max-width: 768px) {
  #main {
    padding: 1.5rem 1rem;
  }
}

/* Form Input Overrides to Neutralize Massively CSS Resets */
#main #deliveranceForm input[type="text"],
#main #deliveranceForm input[type="email"],
#main #deliveranceForm input[type="tel"],
#main #deliveranceForm input[type="date"],
#main #deliveranceForm input[type="number"],
#main #deliveranceForm select,
#main #deliveranceForm textarea {
  display: block !important;
  width: 100% !important;
  padding: 0.65rem 1rem !important;
  font-size: 0.95rem !important;
  font-family: var(--font-sans) !important;
  line-height: 1.5 !important;
  color: #1e293b !important;
  background-color: #ffffff !important;
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  height: auto !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

#main #deliveranceForm input:focus,
#main #deliveranceForm select:focus,
#main #deliveranceForm textarea:focus {
  border-color: #4a90e2 !important;
  outline: none !important;
  box-shadow: 0 0 0 0.2rem rgba(74, 144, 226, 0.2) !important;
  background-color: #ffffff !important;
}

#main #deliveranceForm input[type="checkbox"],
#main #deliveranceForm input[type="radio"] {
  opacity: 1 !important;
  float: none !important;
  margin: 0 0.5rem 0 0 !important;
  position: static !important;
  width: 1.2rem !important;
  height: 1.2rem !important;
  display: inline-block !important;
  vertical-align: middle !important;
  appearance: auto !important;
  -webkit-appearance: auto !important;
  cursor: pointer !important;
  z-index: 1 !important;
}

#main #deliveranceForm label {
  text-transform: none !important;
  letter-spacing: normal !important;
  font-family: inherit !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  padding: 0 !important;
  margin-bottom: 0.35rem !important;
  display: inline-block !important;
  font-size: 0.95rem !important;
}

#main #deliveranceForm .form-label {
  font-weight: 600 !important;
  color: #2c3e50 !important;
  margin-bottom: 0.4rem !important;
}

#main #deliveranceForm .btn {
  text-transform: none !important;
  letter-spacing: normal !important;
}

/* Stepper sticky top adjustment under St. Paul's nav */
.stepper-container {
  top: 0 !important;
  background: #ffffff !important;
  border-bottom: 2px solid #e8ebf0 !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03) !important;
  margin-bottom: 1.5rem !important;
}

/* Signature Canvas Border */
#signatureCanvas {
  border: 2px dashed #cbd5e1 !important;
  border-radius: 12px !important;
  background-color: #fdfdfd !important;
  cursor: crosshair !important;
}

