/* ============================================================
   Ensign Properties — Rental Application
   Design System & Styles
   ============================================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:wght@600;700&display=swap');

/* --- Design Tokens --- */
:root {
  /* Ensign Properties Brand Colors */
  --color-bg:           #F5F4F0;
  --color-bg-alt:       #EFEEE9;
  --color-card:         #FFFFFF;
  --color-text:         #2D2D2D;
  --color-text-secondary: #636E72;
  --color-text-muted:   #9BA3A8;
  --color-accent:       #1A472A;
  --color-accent-dark:  #12331E;
  --color-accent-light: #E8F0EB;
  --color-gold:         #C9A84C;
  --color-gold-dark:    #B39543;
  --color-gold-light:   #FAF5E8;
  --color-success:      #6AB04C;
  --color-success-light:#EAFCE4;
  --color-error:        #E17055;
  --color-error-light:  #FDE8E2;
  --color-warning:      #F0932B;
  --color-border:       #E0DCD7;
  --color-border-focus: #1A472A;
  --color-divider:      #EDE9E3;

  /* Typography */
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Playfair Display', Georgia, serif;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:  0 4px 12px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg:  0 10px 30px rgba(0,0,0,0.08), 0 4px 8px rgba(0,0,0,0.04);
  --shadow-card: 0 2px 8px rgba(0,0,0,0.05);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Layout Container --- */
.container {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
  border-bottom: 3px solid var(--color-gold);
  padding: var(--space-2xl) 0 var(--space-xl);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  width: 600px;
  height: 600px;
  background: var(--color-gold);
  opacity: 0.06;
  border-radius: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}

.hero-inner {
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero-logo {
  width: 80px;
  height: 80px;
  background: rgba(255,255,255,0.12);
  border: 2px solid var(--color-gold);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-lg);
  font-size: 28px;
  color: var(--color-gold);
  font-weight: 700;
  font-family: var(--font-heading);
  backdrop-filter: blur(8px);
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: var(--space-sm);
  letter-spacing: -0.02em;
}

.hero-tagline {
  font-size: 1.15rem;
  color: var(--color-gold);
  font-weight: 500;
  margin-bottom: var(--space-sm);
}

.hero-subtext {
  font-size: 0.92rem;
  color: rgba(255,255,255,0.75);
  max-width: 520px;
  margin: 0 auto var(--space-lg);
  line-height: 1.5;
}

.hero-contact {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-md) var(--space-lg);
  font-size: 0.82rem;
  color: rgba(255,255,255,0.65);
}

.hero-contact a {
  color: var(--color-gold);
  text-decoration: none;
  transition: color var(--transition-fast);
}
.hero-contact a:hover {
  color: #fff;
}

.hero-contact-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hero-contact-item svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  stroke: var(--color-gold);
}

/* ============================================================
   PROGRESS BAR
   ============================================================ */
.progress-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-card);
  border-bottom: 1px solid var(--color-divider);
  box-shadow: var(--shadow-sm);
  padding: var(--space-sm) 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.progress-bar::-webkit-scrollbar {
  display: none;
}

.progress-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: max-content;
  padding: 0 var(--space-md);
}

.progress-step {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--color-text-muted);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  user-select: none;
}

.progress-step:hover {
  background: var(--color-bg-alt);
  color: var(--color-text-secondary);
}

.progress-step.active {
  background: var(--color-accent-light);
  color: var(--color-accent);
  font-weight: 600;
}

.progress-step.completed {
  color: var(--color-success);
}

.progress-step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-bg-alt);
  font-size: 0.65rem;
  font-weight: 600;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.progress-step.active .progress-step-number {
  background: var(--color-accent);
  color: #fff;
}

.progress-step.completed .progress-step-number {
  background: var(--color-success);
  color: #fff;
}

.progress-step.completed .progress-step-number::after {
  content: '✓';
  font-size: 0.6rem;
}

.progress-step.completed .progress-step-number span {
  display: none;
}

.progress-step-divider {
  width: 16px;
  height: 1px;
  background: var(--color-border);
  flex-shrink: 0;
}

/* ============================================================
   FORM SECTIONS
   ============================================================ */
.form-wrapper {
  padding: var(--space-xl) 0 var(--space-3xl);
}

.form-section {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: var(--space-xl);
  margin-bottom: var(--space-lg);
  transition: box-shadow var(--transition-base);
}

.form-section:hover {
  box-shadow: var(--shadow-md);
}

.section-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 2px solid var(--color-divider);
}

.section-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--color-accent-light);
  border-radius: var(--radius-md);
  color: var(--color-accent);
  flex-shrink: 0;
}

.section-icon svg {
  width: 20px;
  height: 20px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text);
}

.section-subtitle {
  font-size: 0.82rem;
  color: var(--color-text-secondary);
  margin-top: 2px;
}

/* --- Form Grid --- */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.form-grid .full-width {
  grid-column: 1 / -1;
}

.form-grid .one-third {
  grid-column: span 1;
}

/* --- Form Groups --- */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.form-group label .required {
  color: var(--color-error);
  font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--color-text);
  background: var(--color-card);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  transition: all var(--transition-fast);
  outline: none;
  width: 100%;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--color-text-muted);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(26, 71, 42, 0.12);
}

.form-group input.valid,
.form-group select.valid {
  border-color: var(--color-success);
}

.form-group input.invalid,
.form-group select.invalid,
.form-group textarea.invalid {
  border-color: var(--color-error);
  box-shadow: 0 0 0 3px rgba(225, 112, 85, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.error-message {
  font-size: 0.75rem;
  color: var(--color-error);
  display: none;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
}

.error-message.visible {
  display: flex;
}

.error-message svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

/* --- Sub-section Divider --- */
.sub-divider {
  grid-column: 1 / -1;
  border: 0;
  border-top: 1px dashed var(--color-divider);
  margin: var(--space-sm) 0;
}

.sub-header {
  grid-column: 1 / -1;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text);
  padding-top: var(--space-sm);
}

/* --- Toggle Switch --- */
.toggle-container {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--color-bg-alt);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
}

.toggle-label {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--color-text);
}

.toggle-switch {
  position: relative;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--color-border);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--color-accent);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(22px);
}

.collapsible-section {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height var(--transition-slow), opacity var(--transition-base);
}

.collapsible-section.expanded {
  max-height: 2000px;
  opacity: 1;
}

/* --- Radio Buttons --- */
.radio-group {
  display: flex;
  gap: var(--space-md);
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--color-text);
}

.radio-option input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--color-border);
  border-radius: 50%;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
}

.radio-option input[type="radio"]:checked {
  border-color: var(--color-accent);
}

.radio-option input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  background: var(--color-accent);
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* --- Yes/No Toggles (Background Questions) --- */
.yes-no-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.yes-no-item {
  padding: var(--space-md);
  background: var(--color-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-divider);
}

.yes-no-question {
  font-size: 0.88rem;
  color: var(--color-text);
  margin-bottom: var(--space-sm);
  line-height: 1.4;
}

.yes-no-buttons {
  display: flex;
  gap: var(--space-sm);
}

.yes-no-btn {
  padding: 6px 20px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-full);
  background: var(--color-card);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--color-text-secondary);
}

.yes-no-btn:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.yes-no-btn.selected-yes {
  background: var(--color-error-light);
  border-color: var(--color-error);
  color: var(--color-error);
}

.yes-no-btn.selected-no {
  background: var(--color-success-light);
  border-color: var(--color-success);
  color: var(--color-success);
}

.yes-no-explain {
  margin-top: var(--space-sm);
  display: none;
}

.yes-no-explain.visible {
  display: block;
}

/* --- Dynamic Repeater --- */
.repeater-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.repeater-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-sm);
  padding: var(--space-md);
  background: var(--color-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-divider);
  animation: slideIn 0.3s ease;
}

.repeater-row-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
}

.repeater-row-fields.three-col {
  grid-template-columns: 1fr 1fr 1fr;
}

.repeater-row-fields.four-col {
  grid-template-columns: repeat(4, 1fr);
}

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

.btn-remove-row {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: var(--color-error-light);
  color: var(--color-error);
  border-radius: 50%;
  cursor: pointer;
  transition: all var(--transition-fast);
  align-self: center;
  flex-shrink: 0;
}

.btn-remove-row:hover {
  background: var(--color-error);
  color: #fff;
}

.btn-add-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1.5px dashed var(--color-accent);
  background: transparent;
  color: var(--color-accent);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-top: var(--space-sm);
}

.btn-add-row:hover {
  background: var(--color-accent-light);
}

/* --- Checkbox --- */
.checkbox-group {
  display: flex;
  gap: var(--space-sm);
  align-items: flex-start;
  padding: var(--space-md);
  background: var(--color-bg-alt);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-divider);
}

.checkbox-group.error-state {
  border-color: var(--color-error);
  background: var(--color-error-light);
}

.checkbox-group input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid var(--color-border);
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  flex-shrink: 0;
  margin-top: 2px;
}

.checkbox-group input[type="checkbox"]:checked {
  background: var(--color-accent);
  border-color: var(--color-accent);
}

.checkbox-group input[type="checkbox"]:checked::after {
  content: '✓';
  color: #fff;
  font-size: 12px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-weight: 700;
}

.checkbox-label {
  font-size: 0.85rem;
  color: var(--color-text);
  line-height: 1.5;
  cursor: pointer;
}

/* --- Legal Text --- */
.legal-text {
  padding: var(--space-lg);
  background: var(--color-bg);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-bottom: var(--space-lg);
}

/* --- Signature --- */
.signature-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-md);
  align-items: end;
  padding: var(--space-md);
  background: var(--color-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-divider);
}

.signature-input input {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.1rem;
  font-style: italic;
  border-bottom: 2px solid var(--color-text);
  border-radius: 0;
  border-top: none;
  border-left: none;
  border-right: none;
  background: transparent;
  padding: 8px 4px;
}

.signature-date {
  font-size: 0.82rem;
  color: var(--color-text-secondary);
  text-align: right;
  padding-bottom: 10px;
  white-space: nowrap;
}

/* ============================================================
   ID UPLOAD SECTION
   ============================================================ */
.id-upload-section {
  margin-top: var(--space-lg);
}

.id-upload-zone {
  border: 2px dashed var(--color-accent);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-base);
  background: var(--color-accent-light);
  position: relative;
}

.id-upload-zone:hover,
.id-upload-zone.dragover {
  border-color: var(--color-gold);
  background: var(--color-gold-light);
}

.id-upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.id-upload-icon {
  width: 48px;
  height: 48px;
  background: var(--color-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-md);
}

.id-upload-icon svg {
  width: 24px;
  height: 24px;
  stroke: #fff;
}

.id-upload-text {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--color-accent);
  margin-bottom: var(--space-xs);
}

.id-upload-hint {
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

.id-upload-previews {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-md);
  flex-wrap: wrap;
}

.id-preview-item {
  position: relative;
  width: 120px;
  height: 80px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid var(--color-accent);
  background: var(--color-bg);
}

.id-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.id-preview-item .preview-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(26, 71, 42, 0.85);
  color: #fff;
  font-size: 0.65rem;
  padding: 2px 6px;
  text-align: center;
  font-weight: 500;
}

.id-preview-item .preview-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  background: var(--color-error);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.id-preview-item .preview-remove:hover {
  transform: scale(1.1);
}

.id-upload-success {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: var(--space-sm) var(--space-md);
  background: var(--color-success-light);
  border: 1px solid var(--color-success);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: #166534;
  font-weight: 500;
  margin-top: var(--space-sm);
}

/* ============================================================
   PAYMENT SECTION
   ============================================================ */
.payment-section {
  background: var(--color-card);
  border: 2px solid var(--color-accent);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-xl);
  margin-bottom: var(--space-lg);
  position: relative;
  overflow: hidden;
}

.payment-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-gold));
}

.payment-locked {
  opacity: 0.5;
  pointer-events: none;
  position: relative;
}

.payment-locked::after {
  content: '🔒 Complete all required fields above to submit';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--color-card);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  white-space: nowrap;
  z-index: 10;
}

.payment-header {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.payment-amount {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-text);
}

.payment-subtext {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  margin-top: var(--space-xs);
}

/* Payment field containers */
#pt_hpf_form {
  margin: var(--space-md) 0;
}

#pt_hpf_form iframe {
  min-height: 44px;
}

.pt-field-wrapper {
  margin-bottom: var(--space-md);
}

.pt-field-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-xs);
  display: block;
}

.pt-field-container {
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 2px;
  background: var(--color-card);
  min-height: 44px;
  transition: border-color var(--transition-fast);
}

.pt-field-container:focus-within {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(26, 71, 42, 0.12);
}

/* --- Submit Button --- */
.btn-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-gold-dark) 100%);
  color: var(--color-accent);
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: 0 4px 12px rgba(201, 168, 76, 0.3);
  margin-top: var(--space-lg);
  position: relative;
  overflow: hidden;
}

.btn-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(201, 168, 76, 0.4);
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
  color: var(--color-gold);
}

.btn-submit:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(201, 168, 76, 0.3);
}

.btn-submit:disabled {
  background: var(--color-border);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  color: var(--color-text-muted);
}

.btn-submit .spinner {
  display: none;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.btn-submit.loading .spinner {
  display: block;
}

.btn-submit.loading .btn-text {
  opacity: 0.7;
}

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

/* ============================================================
   CONFIRMATION SECTION
   ============================================================ */
.confirmation-section {
  display: none;
  text-align: center;
  padding: var(--space-3xl) var(--space-md);
}

.confirmation-section.visible {
  display: block;
  animation: fadeIn 0.6s ease;
}

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

.confirmation-icon {
  width: 80px;
  height: 80px;
  background: var(--color-success-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-lg);
  animation: scaleIn 0.5s ease 0.2s both;
}

@keyframes scaleIn {
  from { transform: scale(0); }
  to { transform: scale(1); }
}

.confirmation-icon svg {
  width: 40px;
  height: 40px;
  color: var(--color-success);
}

.confirmation-section h2 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  color: var(--color-text);
  margin-bottom: var(--space-sm);
}

.confirmation-message {
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-xl);
  line-height: 1.6;
}

.confirmation-details {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  max-width: 420px;
  margin: 0 auto var(--space-xl);
  text-align: left;
}

.confirmation-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--color-divider);
  font-size: 0.88rem;
}

.confirmation-detail-row:last-child {
  border-bottom: none;
}

.confirmation-detail-label {
  color: var(--color-text-secondary);
}

.confirmation-detail-value {
  font-weight: 600;
  color: var(--color-text);
}

.confirmation-next-steps {
  font-size: 0.88rem;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-lg);
  line-height: 1.6;
}

.confirmation-contact {
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

.confirmation-contact a {
  color: var(--color-accent);
  text-decoration: none;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  padding: var(--space-xl) 0 var(--space-lg);
  text-align: center;
  border-top: 1px solid var(--color-divider);
}

.footer-credit {
  font-size: 11px;
  opacity: 0.4;
  transition: opacity var(--transition-base);
}

.footer-credit:hover {
  opacity: 0.9;
}

.footer-credit a {
  color: var(--color-text-secondary);
  text-decoration: none;
}

.footer-credit a:hover {
  color: var(--color-accent);
}

/* --- Honeypot --- */
.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
  pointer-events: none;
}

/* ============================================================
   ERROR / STATUS MESSAGES
   ============================================================ */
.form-status {
  padding: var(--space-md);
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  margin-bottom: var(--space-md);
  display: none;
  align-items: center;
  gap: var(--space-sm);
}

.form-status.visible {
  display: flex;
}

.form-status.error {
  background: var(--color-error-light);
  color: var(--color-error);
  border: 1px solid var(--color-error);
}

.form-status.success {
  background: var(--color-success-light);
  color: var(--color-success);
  border: 1px solid var(--color-success);
}

/* ============================================================
   DUAL PRICING — PAYMENT METHOD TABS
   ============================================================ */

/* --- Payment Method Tabs --- */
.payment-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: var(--space-lg);
}

.payment-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 12px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: var(--color-bg);
  color: var(--color-text-secondary);
  transition: all var(--transition-base);
  position: relative;
}

.payment-tab:first-child {
  border-right: 1.5px solid var(--color-border);
}

.payment-tab:hover {
  background: var(--color-accent-light);
  color: var(--color-accent);
}

.payment-tab.active {
  background: var(--color-accent-light);
  color: var(--color-accent);
  box-shadow: inset 0 -3px 0 var(--color-accent);
}

.tab-fee-badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 0.68rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  background: #FEF3CD;
  color: #92400E;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.tab-discount-badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 0.68rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  background: var(--color-success-light);
  color: #166534;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

/* --- Dual Pricing Display --- */
.dual-pricing-display {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0;
  margin-bottom: var(--space-lg);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1.5px solid var(--color-border);
}

.dual-price-option {
  padding: var(--space-md);
  text-align: center;
  transition: all var(--transition-base);
  background: var(--color-bg);
}

.dual-price-option.active.ach {
  background: #F0FDF4;
  border-color: #86EFAC;
  box-shadow: inset 0 0 0 1px #86EFAC;
}

.dual-price-option.active.card {
  background: #FFFBEB;
  border-color: #FCD34D;
  box-shadow: inset 0 0 0 1px #FCD34D;
}

.dual-price-badge {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.dual-price-amount {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 4px;
}

.dual-price-detail {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  line-height: 1.3;
}

.dual-price-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  background: var(--color-bg);
  border-left: 1.5px solid var(--color-border);
  border-right: 1.5px solid var(--color-border);
}

.dual-price-divider span {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* --- Payment Method Panels --- */
.payment-method-panel {
  animation: fadeIn 0.3s ease;
}

/* --- ACH Info Box --- */
.ach-info-box {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-md);
  background: #F0FDF4;
  border: 1px solid #86EFAC;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-lg);
}

.ach-info-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  line-height: 1;
}

.ach-info-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: #166534;
  margin-bottom: 4px;
}

.ach-info-text {
  font-size: 0.78rem;
  color: #15803D;
  line-height: 1.5;
}

/* --- Convenience Fee Disclosure --- */
.convenience-fee-disclosure {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: var(--space-md);
  background: #FFFBEB;
  border: 1px solid #FCD34D;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  color: #92400E;
  line-height: 1.5;
  margin-top: var(--space-md);
}

.convenience-fee-disclosure svg {
  flex-shrink: 0;
  margin-top: 2px;
  stroke: #92400E;
}

/* --- ACH Discount Inline Badge --- */
.ach-discount-badge-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: var(--space-sm) var(--space-md);
  background: #F0FDF4;
  border: 1px solid #86EFAC;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  color: #166534;
  font-weight: 500;
  margin-top: var(--space-md);
}

.ach-discount-badge-inline svg {
  flex-shrink: 0;
  stroke: #166534;
}

/* --- ACH payment field containers --- */
#pt_ach_form {
  margin: var(--space-md) 0;
}

#pt_ach_form iframe {
  min-height: 44px;
}

/* --- EPX Pay Button --- */
.epx-button-wrapper {
  margin-top: var(--space-lg);
}

.epx-button-wrapper.locked {
  pointer-events: none;
  opacity: 0.5;
}

.epx-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-gold-dark) 100%);
  color: var(--color-accent);
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: 0 4px 12px rgba(201, 168, 76, 0.3);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  text-align: center;
  letter-spacing: 0.01em;
  line-height: 1.5;
}

.epx-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(201, 168, 76, 0.4);
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
  color: var(--color-gold);
}

.epx-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(201, 168, 76, 0.3);
}

.epx-button-wrapper.locked .epx-button {
  background: var(--color-border);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  color: var(--color-text-muted);
}

/* --- Venmo Pay Button --- */
.venmo-button-wrapper {
  margin-top: var(--space-lg);
}

.venmo-button-wrapper.locked {
  pointer-events: none;
  opacity: 0.5;
}

.btn-venmo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #3D95CE 0%, #2a7ab5 100%);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: 0 4px 12px rgba(61, 149, 206, 0.3);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  text-align: center;
  letter-spacing: 0.01em;
  line-height: 1.5;
}

.btn-venmo:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(61, 149, 206, 0.4);
}

.btn-venmo:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(61, 149, 206, 0.3);
}

.venmo-button-wrapper.locked .btn-venmo {
  background: var(--color-border);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* --- Venmo Modal --- */
.venmo-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.venmo-modal-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.venmo-modal {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px;
  position: relative;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
  transform: translateY(20px) scale(0.96);
  transition: transform 0.3s ease;
}

.venmo-modal-overlay.visible .venmo-modal {
  transform: translateY(0) scale(1);
}

.venmo-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--color-text-muted);
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}

.venmo-modal-close:hover {
  background: var(--color-border);
  color: var(--color-text);
}

.venmo-modal-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 24px;
  padding-right: 32px;
}

.venmo-modal-step {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--color-border);
}

.venmo-modal-step:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}

.venmo-modal-step-number {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #3D95CE 0%, #2a7ab5 100%);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
}

.venmo-modal-step-content {
  flex: 1;
}

.venmo-modal-step-content p {
  margin: 0 0 12px;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--color-text);
}

.venmo-modal-note {
  font-size: 0.85rem !important;
  color: var(--color-text-muted) !important;
  font-style: italic;
}

.btn-venmo-open {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: linear-gradient(135deg, #3D95CE 0%, #2a7ab5 100%);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(61, 149, 206, 0.3);
}

.btn-venmo-open:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(61, 149, 206, 0.4);
  color: #fff;
}

/* Venmo modal checkbox */
.venmo-modal-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  padding: 12px 16px;
  background: var(--color-bg);
  border-radius: var(--radius-md);
  border: 2px solid var(--color-border);
  margin-bottom: 16px;
  transition: border-color 0.2s, background 0.2s;
}

.venmo-modal-checkbox:hover {
  border-color: #3D95CE;
}

.venmo-modal-checkbox input[type="checkbox"] {
  display: none;
}

.venmo-checkbox-mark {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border: 2px solid var(--color-border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  margin-top: 2px;
}

.venmo-modal-checkbox input:checked + .venmo-checkbox-mark {
  background: #3D95CE;
  border-color: #3D95CE;
}

.venmo-modal-checkbox input:checked + .venmo-checkbox-mark::after {
  content: '✓';
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.venmo-modal-checkbox input:checked ~ span:last-child {
  color: var(--color-text);
}

.venmo-modal-checkbox span:last-child {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--color-text-muted);
}

/* Venmo modal input */
.venmo-modal-input-group {
  margin-bottom: 0;
}

.venmo-modal-input-group label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text-muted);
  margin-bottom: 6px;
  display: block;
}

.venmo-modal-input-group input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: var(--font-body);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.venmo-modal-input-group input:focus {
  outline: none;
  border-color: #3D95CE;
  box-shadow: 0 0 0 3px rgba(61, 149, 206, 0.12);
}

/* Venmo modal actions */
.venmo-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
}

.btn-venmo-submit {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(26, 71, 42, 0.3);
}

.btn-venmo-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(26, 71, 42, 0.4);
}

.btn-venmo-submit:disabled {
  background: var(--color-border);
  cursor: not-allowed;
  box-shadow: none;
  opacity: 0.6;
}

.btn-venmo-cancel {
  width: 100%;
  padding: 12px;
  background: transparent;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-venmo-cancel:hover {
  background: var(--color-bg);
  color: var(--color-text);
  border-color: var(--color-text-muted);
}

/* Confirmation — pending status */
.confirmation-pending {
  color: #e67e22;
  font-weight: 600;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-grid .one-third {
    grid-column: span 1;
  }

  .form-section {
    padding: var(--space-lg) var(--space-md);
    border-radius: var(--radius-md);
  }

  .hero h1 {
    font-size: 1.6rem;
  }

  .hero-contact {
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
  }

  .progress-steps {
    justify-content: flex-start;
  }

  .progress-step {
    padding: 4px 8px;
    font-size: 0.65rem;
  }

  .progress-step-label {
    display: none;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
  }

  .repeater-row-fields,
  .repeater-row-fields.three-col,
  .repeater-row-fields.four-col {
    grid-template-columns: 1fr;
  }

  .signature-row {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }

  .signature-date {
    text-align: left;
  }

  .payment-locked::after {
    white-space: normal;
    text-align: center;
    max-width: 280px;
  }

  .payment-amount {
    font-size: 1.4rem;
  }

  .dual-pricing-display {
    grid-template-columns: 1fr;
  }

  .dual-price-divider {
    border-left: 0;
    border-right: 0;
    border-top: 1.5px solid var(--color-border);
    border-bottom: 1.5px solid var(--color-border);
    padding: 6px 0;
  }

  .dual-price-amount {
    font-size: 1.3rem;
  }

  .payment-tabs {
    grid-template-columns: 1fr;
  }

  .payment-tab:first-child {
    border-right: none;
    border-bottom: 1.5px solid var(--color-border);
  }

  .confirmation-details {
    margin-left: 0;
    margin-right: 0;
  }

  .id-upload-previews {
    justify-content: center;
  }

  .venmo-modal {
    padding: 24px 20px;
    max-height: 85vh;
  }

  .venmo-modal-title {
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-sm);
  }

  .hero {
    padding: var(--space-xl) 0 var(--space-lg);
  }

  .hero h1 {
    font-size: 1.4rem;
  }

  .form-section {
    padding: var(--space-md) var(--space-sm);
  }

  .payment-section {
    padding: var(--space-lg) var(--space-sm);
  }

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

  .btn-submit {
    padding: 14px;
    font-size: 0.92rem;
  }

  .yes-no-buttons {
    flex-direction: row;
  }

  .checkbox-group {
    padding: var(--space-sm);
  }

  .legal-text {
    padding: var(--space-md);
    font-size: 0.75rem;
  }

  .id-upload-zone {
    padding: var(--space-lg);
  }
}

/* Print styles */
@media print {
  .progress-bar,
  .payment-section,
  .btn-submit,
  .site-footer {
    display: none;
  }

  .form-section {
    box-shadow: none;
    border: 1px solid #ccc;
    page-break-inside: avoid;
  }
}
