/* Quote Form Styles - Scoped Branding & Performance Optimized */

/* Global Neutral Tokens (Layout, Typography, etc.) */
:root {
  /* Neutral Colors (for non-brand elements) */
  --success: #10b981;
  --error: #ef4444;
  --warning: #f59e0b;

  /* Layout & Typography */
  --font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.08);
  --radius: 8px;
  --radius-lg: 12px;
  --spacing-xs: 0.5rem;
  --spacing-sm: 0.75rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;

  /* Neutral Fallbacks */
  --text-primary:#1a202c;
  --text-muted:#64748b;
  --border:#e5e7eb;
  --bg:#fff;
  --bg-light:#f8fafc;
  --brand-primary:#6c757d;
  --brand-primary-dark:#495057;
  --brand-primary-10: rgba(108,117,125,.10);
  --brand-gradient: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-dark) 100%);
  --calendar-inactive-bg:#f8f9fa;
  --calendar-inactive-text:#6b7280;
  --calendar-hover-tint: rgba(108,117,125,.08);
  --calendar-available-text:#495057;
}

/* Amsterdam Cleaning Brand (Purple/Blue) */
body.brand-amsterdam {
  --brand-primary: #8A3CF1;
  --brand-primary-dark: #5C2BD6;
  --brand-primary-10: rgba(138, 60, 241, .10);
  --brand-gradient: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-dark) 100%);
  --text-primary: #0F172A;
  --text-muted: #64748B;
  --border: #E2E8F0;
  --bg: #fff;
  --bg-light: #f8fafc;
  --calendar-inactive-bg: #EFEAFB;
  --calendar-inactive-text: #6B5AAE;
  --calendar-hover-tint: rgba(138, 60, 241, 0.08);
  --calendar-available-text: #6E44FF;
}

/* Clean4U Brand (Gold/Teal) */
body.brand-clean4u {
  --brand-primary: #D29664;
  --brand-primary-dark: #B8824F;
  --brand-primary-10: rgba(210, 150, 100, .10);
  --brand-gradient: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-dark) 100%);
  --text-primary: #1E293B;
  --text-muted: #6B7280;
  --border: #E2E8F0;
  --bg: #fff;
  --bg-light: #f8fafc;
  --calendar-inactive-bg: #fdf5ef;
  --calendar-inactive-text: #b8824f;
  --calendar-hover-tint: rgba(210, 150, 100, 0.08);
  --calendar-available-text: #b8824f;
}


/* Ensure conditional fields are properly hidden */
.c4u-field.c4u-conditional[hidden],
[data-allowed-services][hidden] { 
  display: none !important; 
}

[data-hourly-min] { 
  color: var(--text-muted); 
}

/* Avoid costly transitions: limit to opacity, transform; will-change for performance */
* {
  transition-property: opacity, transform;
}

.form-step,
.summary-drawer {
  will-change: transform;
}

* {
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  line-height: 1.65;
  color: var(--text-primary);
}

/* Utility Classes */
.u-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.is-hidden {
  display: none !important;
}

/* Card Components */
.card {
  background: var(--bg);
  border-radius: 16px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  /* Original: overflow: hidden; */
}

.card--tight {
  padding: var(--spacing-lg);
}

.card--ghost {
  background: var(--bg-light);
  border: 1px solid var(--border);
  box-shadow: none;
}

/* Main Container */
.quote-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--spacing-xl) var(--spacing-md);
  min-height: 100vh;
}

/* Grid Layout */
.quote-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-xl);
}

@media (min-width: 1024px) {
  .quote-grid {
    grid-template-columns: 1fr 400px;
    gap: var(--spacing-2xl);
  }
}

/* Form Styles */
.quote-form {
  background: var(--bg);
  border-radius: 16px;
  box-shadow: var(--shadow);
  /* FIX: Ensure dropdowns are not clipped by parent */
  overflow: visible; /* Explicitly set to visible */
  position: relative; /* Needed for z-index to work */
  z-index: 2; /* Give it a z-index higher than default page content */
}

/* Progress Header */
.progress-container {
  background: var(--brand-gradient);
  padding: var(--spacing-xl) var(--spacing-2xl);
  color: #fff;
  /* Ensure text is white */
  border-bottom: 1px solid rgba(255, 255, 255, .12);
   border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  overflow: hidden; /* clips the gradient inside the rounded top */
}

/* Bar wrapper */
.progress-bar {
  display: flex;
  /* Use flex for badge stepper */
  justify-content: space-between;
  align-items: center;
  /* Align items to center for badge style */
  margin: 0 auto var(--spacing-lg);
  /* Centered with bottom margin */
  padding: 0 20px;
  /* No top padding, just side padding */
  max-width: 920px;
  /* Wider so labels breathe */
}

/* Track + animated fill */
.progress-track,
.progress-fill {
  display: none !important;
  /* Hide the lines */
}

/* Each step */
.progress-step {
  display: flex;
  /* Use flex for indicator and label */
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
  flex: 1;
  text-align: center;
  gap: 8px;
  /* Space between indicator and label */
}

/* Dot (now a badge) */
.step-indicator {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  font-size: 18px;
  color: var(--brand-primary);
  /* Purple for numbers/checkmarks */
  background-color: white;
  /* Default background */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
  /* Smooth transitions */
  position: relative;
  /* For checkmark */
}

/* Completed step */
.progress-step.completed .step-indicator {
  background-color: white;
  color: transparent;
  /* Hide number */
  box-shadow: 0 2px 10px rgba(0, 0, 0, .12);
  /* Stronger shadow */
}

.progress-step.completed .step-indicator::after {
  content: "\2713";
  /* Checkmark */
  position: absolute;
  font-size: 1rem;
  font-weight: 900;
  color: var(--brand-primary);
}

/* Active step */
.progress-step.active .step-indicator {
  background-color: white;
  color: var(--brand-primary);
  transform: scale(1.1);
  /* Slightly larger for active */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Future step */
.progress-step.future .step-indicator {
  background-color: rgba(255, 255, 255, 0.2);
  /* Lighter white */
  color: rgba(255, 255, 255, 0.6);
  /* Lighter purple for number */
  box-shadow: none;
}

/* Labels */
.progress-step-label {
  font-size: 14px;
  color: white;
  /* Default for completed/current */
  white-space: nowrap;
  /* Prevent labels from wrapping */
  font-weight: 500;
  letter-spacing: .2px;
}

.progress-step.future .progress-step-label {
  color: rgba(255, 255, 255, 0.6);
  /* Lighter white for text */
}

.progress-step.active .progress-step-label {
  color: #fff;
}

.progress-step.completed .progress-step-label {
  color: #fff;
}


/* Shrink nicely on small viewports */
@media (max-width: 900px) {

  /* Using 900px as a general breakpoint for progress bar */
  .progress-bar {
    padding: 0 10px;
    margin-bottom: 30px;
  }

  .step-indicator {
    width: 35px;
    height: 35px;
    font-size: 16px;
  }

  .progress-step-label {
    font-size: 12px;
  }
}

/* Progress info (title/subtitle) */
.progress-info {
  text-align: center;
  margin-top: var(--spacing-md);
}

.progress-title {
  font-weight: 700;
  font-size: 1.125rem;
  margin-bottom: var(--spacing-xs);
  line-height: 1.3;
  color: #fff;
  /* Ensure title is white for contrast */
}

.progress-subtitle {
  color: rgba(255, 255, 255, .8);
  /* Lighter color for better contrast on purple */
  margin-bottom: var(--spacing-2xl);
  font-size: 1rem;
  line-height: 1.6;
}

/* Form Steps - Enhanced with Optimized Animations */
.form-step {
  display: none;
  padding: var(--spacing-2xl);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.form-step.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.step-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--spacing-sm);
  line-height: 1.3;
}

.step-subtitle {
  color: var(--text-muted);
  margin-bottom: var(--spacing-2xl);
  font-size: 1rem;
  line-height: 1.6;
}

/* Form Sections - NEW */
.form-section {
  margin-bottom: var(--spacing-2xl);
  padding: var(--spacing-xl);
  background: var(--bg-light);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.form-section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 var(--spacing-sm) 0;
  line-height: 1.3;
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.form-section-subtitle {
  color: var(--text-muted);
  margin: 0 0 var(--spacing-lg) 0;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.section-icon {
  font-size: 1.125rem;
}

/* Form Rows - NEW */
.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-lg);
}

@media (min-width: 640px) {
  .form-row {
    grid-template-columns: 1fr 1fr;
  }
}

/* Address Group - NEW (without ::before pseudo-element) */
.address-group {
  background: var(--bg);
  border-radius: var(--radius);
  padding: var(--spacing-lg);
  border: 0px solid var(--border);
  position: relative;
  background: transparent;
  padding: 0;            /* optional: makes it tighter */
}

/* Terms & Conditions Styles - NEW */
.terms-group {
  background: var(--bg);
  border: 0px solid var(--border);
  border-radius: var(--radius);
  padding: var(--spacing-lg);
  margin-bottom: 0;
  background: transparent;
  padding: 0;            /* optional: makes it tighter */
}

.terms-checkbox {
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  min-height: auto;
}

.terms-checkbox input[type=\"checkbox\"] {
  width: 20px;
  height: 20px;
  accent-color: var(--brand-primary);
}

.terms-label {
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--text-primary);
  margin-bottom: 0;
}

.terms-link {
  color: var(--brand-primary);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s ease;
}

.terms-link:hover {
  color: var(--brand-primary-dark);
  text-decoration: underline;
}

.required-indicator {
  color: var(--error);
  font-weight: 700;
  margin-left: 2px;
}

.terms-error {
  margin-top: var(--spacing-sm);
  padding: var(--spacing-sm);
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius);
  color: var(--error);
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.terms-error::before {
  content: "\26a0\fe0f";
  font-size: 0.875rem;
}

/* Form Groups - Enhanced Spacing */
.form-group {
  margin-bottom: var(--spacing-xl);
}

/* FIX: Ensure service dropdown appears on top */
#service-group {
  position: relative;
  z-index: 10;
}

.form-group.hidden {
  display: none;
}

.form-label {
  display: block;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--spacing-sm);
  font-size: 0.9375rem;
  line-height: 1.4;
}

.form-label.required::after {
  content: ' *';
  color: var(--error);
}

/* Input Styles - Performance Optimized */
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: var(--spacing-md) var(--spacing-lg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  background: var(--bg);
  min-height: 48px;
  line-height: 1.5;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px var(--brand-primary-10);
}

.form-input:invalid,
.form-select:invalid,
.form-textarea:invalid {
  border-color: var(--error);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
  padding: var(--spacing-lg);
  line-height: 1.6;
}

/* Help Text */
.help-text {
  margin-top: var(--spacing-xs);
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Stepper Controls for Numeric Inputs */
.field--stepper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0;
}

.field--stepper .form-input {
  text-align: center;
  border-radius: 0;
  border-left: none;
  border-right: none;
  flex: 1;
  min-width: 80px;
}

.stepper-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 48px;
  background: var(--brand-gradient);
  color: white;
  border: 2px solid var(--brand-primary);
  cursor: pointer;
  font-size: 1.125rem;
  font-weight: 600;
  transition: all 0.15s ease;
  user-select: none;
}

.stepper-btn:hover {
  background: var(--brand-primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

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

.stepper-btn:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
}

.stepper-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.stepper-btn--decrease {
  border-radius: var(--radius) 0 0 var(--radius);
  border-right: none;
}

.stepper-btn--increase {
  border-radius: 0 var(--radius) var(--radius) 0;
  border-left: none;
}

/* Radio and Checkbox Groups - Enhanced */
.radio-group,
.checkbox-group {
  display: grid;
  gap: var(--spacing-sm);
}

.radio-option,
.checkbox-option {
  display: flex;
  align-items: center;
  padding: var(--spacing-lg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
  background: var(--bg);
  min-height: 56px;
  gap: var(--spacing-sm);
}

.radio-option:hover,
.checkbox-option:hover {
  border-color: var(--brand-primary);
  background: var(--brand-primary-10);
}

.radio-option.selected,
.checkbox-option.selected,
.radio-option:has(input:checked),
.checkbox-option:has(input:checked) {
  border-color: var(--brand-primary);
  background: var(--brand-primary-10);
}

.radio-option input,
.checkbox-option input {
  accent-color: var(--brand-primary);
  width: 18px;
  height: 18px;
  margin: 0;
}

.radio-option label,
.checkbox-option label {
  cursor: pointer;
  font-weight: 500;
  line-height: 1.5;
  flex: 1;
}

/* Multi-select - Enhanced */
.multi-select {
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: var(--spacing-sm);
  background: var(--bg);
}

.multi-select-option {
  display: flex;
  align-items: center;
  padding: var(--spacing-sm);
  cursor: pointer;
  border-radius: calc(var(--radius) - 2px);
  transition: background-color 0.15s ease;
  min-height: 44px;
  gap: var(--spacing-sm);
}

.multi-select-option:hover {
  background: var(--bg-light);
}

.multi-select-option input {
  accent-color: var(--brand-primary);
  margin: 0;
}

.multi-select-option label {
  cursor: pointer;
  font-weight: 500;
  line-height: 1.5;
  flex: 1;
}

/* Number Input Groups */
.number-group {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--spacing-lg);
  align-items: end;
}

.number-input {
  width: 120px;
  min-width: 120px;
}

/* Date/Time Inputs */
.datetime-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-lg);
}

@media (max-width: 640px) {
  .datetime-group {
    grid-template-columns: 1fr;
  }
}

/* File Upload - Enhanced */
.file-upload {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: var(--spacing-2xl);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
  background: var(--bg-light);
  min-height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.file-upload:hover {
  border-color: var(--brand-primary);
  background: var(--brand-primary-10);
}

.file-upload.dragover {
  border-color: var(--brand-primary);
  background: var(--brand-primary-10);
}

.file-list {
  margin-top: var(--spacing-md);
  text-align: left;
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-sm);
  background: var(--bg);
  border-radius: var(--radius);
  margin-bottom: var(--spacing-xs);
  border: 1px solid var(--border);
}

.file-remove {
  background: var(--error);
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Navigation Buttons - Enhanced */
.form-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-xl);
  border-top: 1px solid var(--border);
  background: var(--bg-light);
}

.btn {
  padding: var(--spacing-lg) var(--spacing-xl);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 2px solid transparent;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-sm);
  min-height: 48px;
  min-width: 120px;
  justify-content: center;
  line-height: 1.4;
}

.btn-primary {
  background: var(--brand-gradient);
  color: white;
  box-shadow: var(--shadow);
}

.btn-primary:hover {
  background: var(--brand-primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.btn-primary:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
}

.btn-secondary {
  background: var(--bg);
  color: var(--text-primary);
  border-color: var(--border);
}

.btn-secondary:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

.btn-secondary:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Summary Panel - Desktop */
.summary-panel {
  background: var(--bg);
  border-radius: 16px;
  box-shadow: var(--shadow);
  height: fit-content;
  transition: box-shadow 0.15s ease;
}

@media (min-width: 1024px) {
  .summary-panel {
    position: sticky;
    top: var(--spacing-md);
  }
}

.summary-panel:hover {
  box-shadow: 0 14px 40px rgba(16, 24, 40, .12);
}

.summary-header {
  padding: var(--spacing-xl);
  border-bottom: 1px solid var(--border);
  background: var(--brand-gradient);
  color: white;
  border-radius: 16px 16px 0 0;
  position: relative;
}

/* Fix 1B: Quote Summary header text color */
.summary-header h3,
.summary-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  line-height: 1.3;
  color: #fff;
  /* Ensure white text */
}

.summary-service {
  font-size: 0.875rem;
  opacity: 0.9;
  line-height: 1.4;
}

.summary-content {
  padding: var(--spacing-xl);
}

.summary-section {
  margin-bottom: var(--spacing-xl);
}

.summary-section:last-child {
  margin-bottom: 0;
}

.summary-section-title {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--spacing-sm);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.line-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-sm) 0;
  border-bottom: 1px solid var(--border);
}

.line-item:last-child {
  border-bottom: none;
}

.line-item-label {
  font-size: 0.875rem;
  color: var(--text-primary);
  line-height: 1.4;
}

.line-item-amount {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.875rem;
}

.total-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-lg) 0 0 0;
  border-top: 2px solid var(--border);
  margin-top: var(--spacing-md);
}

.total-label {
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--text-primary);
  line-height: 1.3;
}

.total-amount {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--brand-primary);
  line-height: 1.2;
}

/* Fix 5: Quote Summary simplifications - VAT line muted */
.summary-vat-line {
  font-size: 0.85rem;
  opacity: 0.75;
  margin-top: -4px;
  display: none !important;
  /* Hide old VAT line */
}

.summary-vat-line .line-item-label,
.summary-vat-line .line-item-amount {
  font-size: 0.85rem;
  font-weight: 500;
  color: #7E7E9A;
  /* Muted color as requested */
}

.summary-gross-total .total-amount {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--brand-primary);
}

.price-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: var(--spacing-lg);
  padding: var(--spacing-sm);
  background: var(--bg-light);
  border-radius: var(--radius);
  border-left: 4px solid var(--warning);
  line-height: 1.5;
}

.whats-included {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  color: var(--brand-primary);
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 500;
  margin-top: var(--spacing-xs);
  line-height: 1.4;
}

.whats-included:hover {
  text-decoration: underline;
}

/* Crew/Time block in summary - Reduced emphasis */
.summary-ops {
  margin-top: var(--spacing-sm);
  padding: var(--spacing-sm) var(--spacing-md);
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.825rem;
}

.summary-ops .ops-row {
  display: flex;
  justify-content: space-between;
  margin: var(--spacing-xs) 0;
  line-height: 1.4;
}

.ops-label {
  color: var(--text-muted);
}

.ops-value {
  font-weight: 500;
  color: var(--text-primary);
}

/* Empty Summary State */
.summary-empty {
  text-align: center;
  padding: var(--spacing-xl);
  color: var(--text-muted);
}

.summary-empty-icon {
  font-size: 2rem;
  margin-bottom: var(--spacing-sm);
}

.summary-empty-text {
  font-size: 0.875rem;
  line-height: 1.5;
}

/* Mobile Summary Drawer */
@media (max-width: 767px) {
  .summary-panel {
    display: none;
  }

  .summary-trigger {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--brand-gradient);
    color: white;
    border: none;
    border-radius: 25px;
    padding: var(--spacing-md) var(--spacing-lg);
    font-weight: 600;
    font-size: 0.875rem;
    box-shadow: var(--shadow);
    cursor: pointer;
    z-index: 1000;
    transition: transform 0.15s ease;
  }

  .summary-trigger:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
  }

  .summary-drawer__backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
  }

  .summary-drawer.is-active {
    opacity: 1;
    visibility: visible;
  }

  .summary-drawer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg);
    border-radius: 16px 16px 0 0;
    box-shadow: var(--shadow-lg);
    z-index: 1002;
    max-height: 80vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.2s ease;
  }

  .summary-drawer.is-active {
    transform: translateY(0);
  }

  .summary-drawer__header {
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--border);
    background: var(--brand-gradient);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 16px 16px 0 0;
  }

  .summary-drawer__title {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
    color: #fff;
    /* Ensure white text in mobile drawer too */
  }

  .summary-total-shortcode {
    font-size: 0.875rem;
    opacity: 0.9;
    font-weight: 600;
  }

  .summary-drawer__close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: var(--spacing-xs);
    border-radius: var(--radius);
    transition: background-color 0.15s ease;
  }

  .summary-drawer__close:hover {
    background: rgba(255, 255, 255, 0.1);
  }

  .summary-drawer__body {
    padding: var(--spacing-lg);
  }

  .summary-drawer__footer {
    padding: var(--spacing-lg);
    border-top: 1px solid var(--border);
    background: var(--bg-light);
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.5;
  }
}

@media (min-width: 768px) {
  .summary-trigger {
    display: none;
  }

  .summary-drawer,
  .summary-drawer__backdrop {
    display: none;
  }
}

/* Extras Gate Styles - Performance Optimized */
.extras-gate {
  padding: var(--spacing-lg);
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg-light);
}

.extras-gated {
  margin-top: var(--spacing-lg);
  transition: opacity 0.15s ease, visibility 0.15s ease;
}

.extras-gated[hidden] {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.extras-gated:not([hidden]) {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Extras Card Styles - Enhanced with Icons */
.extras-card {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.extras-card:hover {
  border-color: var(--brand-primary);
  box-shadow: 0 2px 8px var(--brand-primary-10);
}

.extras-card:last-child {
  margin-bottom: 0;
}

.extras-card__header {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-weight: 600;
  cursor: pointer;
  padding: var(--spacing-xs);
}

.extras-card__header input[type=\"checkbox\"] {
  accent-color: var(--brand-primary);
  width: 18px;
  height: 18px;
}

.extras-card__header label {
  cursor: pointer;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  line-height: 1.4;
}

.extras-card__body {
  margin-top: var(--spacing-lg);
  padding-top: var(--spacing-lg);
  border-top: 1px solid var(--border);
  transition: opacity .15s ease, visibility .15s ease;
}

.extras-card__body[hidden] {
  display: none !important;
}

/* Legacy extras-category for backward compatibility */
.extras-category {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--spacing-md);
  margin-bottom: var(--spacing-md);
}

.extras-category:last-child {
  margin-bottom: 0;
}

/* Loading States */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Error States - Enhanced */
.error-message {
  color: var(--error);
  font-size: 0.875rem;
  margin-top: var(--spacing-xs);
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding: var(--spacing-xs);
  background: rgba(239, 68, 68, 0.1);
  border-radius: var(--radius);
  line-height: 1.4;
}

.error-message::before {
  content: "\26a0\fe0f";
  font-size: 0.75rem;
}

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

/* Success States */
.success-message {
  color: var(--success);
  font-size: 0.875rem;
  margin-top: var(--spacing-xs);
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  line-height: 1.4;
}

/* Performance & Accessibility Optimizations */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .form-step {
    transition: none;
  }

  .btn,
  .stepper-btn,
  .radio-option,
  .checkbox-option,
  .form-input,
  .form-select,
  .form-textarea {
    transition: none;
  }
}

/* Focus Rings - Enhanced */
.btn:focus-visible,
.form-input:focus-visible,
.form-select:focus-visible,
.form-textarea:focus-visible,
.radio-option:focus-within,
.checkbox-option:focus-within {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  :root {
    --border: #000000;
    --text-muted: #000000;
  }
}

/* Print Styles */
@media print {

  .form-navigation,
  .summary-panel,
  .summary-trigger,
  .summary-drawer {
    display: none;
  }

  .quote-grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile Optimizations */
@media (max-width: 768px) {
  .quote-container {
    padding: var(--spacing-md) var(--spacing-sm);
  }

  .form-step {
    padding: var(--spacing-lg);
  }

  .step-title {
    font-size: 1.5rem;
  }

  .form-navigation {
    padding: var(--spacing-lg);
    flex-direction: column;
    gap: var(--spacing-md);
  }

  .form-navigation>div {
    margin-left: 0 !important;
    width: 100%;
  }

  .btn {
    width: 100%;
  }

  /* Add padding bottom for mobile drawer */
  .quote-form {
    margin-bottom: 100px;
  }

  /* Mobile adjustments for form sections */
  .form-section {
    padding: var(--spacing-lg);
  }

  .form-section-title {
    font-size: 1.125rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .address-group {
    padding: var(--spacing-md);
  }
}

/* Tablet Optimizations */
@media (min-width: 768px) and (max-width: 1023px) {
  .datetime-group {
    grid-template-columns: 1fr 1fr;
  }

  .number-group {
    grid-template-columns: 1fr auto;
  }
}

/* Thank You Page Styles */
.thank-you-error {
  text-align: center;
  padding: 4rem 2rem;
}

.error-icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
}

.thank-you-success {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.thank-you-header {
  text-align: center;
  margin-bottom: 3rem;
  padding: 2.5rem;
  background: var(--brand-gradient);
  color: white;
  border-radius: 16px;
}

.success-icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  color: #fff;
}

.thank-you-header h1 {
  font-size: 2.75rem;
  font-weight: 700;
  margin: 0 0 0.75rem 0;
  line-height: 1.2;
  color: #fff;
}

.thank-you-subtitle {
  font-size: 1.25rem;
  opacity: 0.9;
  margin-bottom: 2rem;
  line-height: 1.5;
  color: #fff;
}

.quote-reference {
  background: rgba(255, 255, 255, 0.2);
  padding: 1.25rem;
  border-radius: var(--radius);
  font-size: 1.25rem;
  color: #fff;
}

.thank-you-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

@media (min-width: 768px) {
  .thank-you-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.quote-details-card h2,
.pricing-summary-card h2 {
  font-size: 1.625rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: var(--text-primary);
  line-height: 1.3;
}

.detail-section,
.pricing-section {
  margin-bottom: 2.5rem;
}

.detail-section:last-child,
.pricing-section:last-child {
  margin-bottom: 0;
}

.detail-section h3,
.pricing-section h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 1.25rem 0;
  color: var(--brand-primary);
  line-height: 1.3;
}

.detail-item,
.pricing-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.detail-item:last-child,
.pricing-item:last-child {
  border-bottom: none;
}

.detail-label,
.pricing-label {
  font-weight: 500;
  color: var(--text-muted);
  flex: 1;
  line-height: 1.5;
}

.detail-value,
.pricing-amount {
  font-weight: 600;
  color: var(--text-primary);
  text-align: right;
  flex: 1;
  line-height: 1.5;
}

.detail-notes {
  background: var(--bg-light);
  padding: 1.25rem;
  border-radius: var(--radius);
  border-left: 4px solid var(--brand-primary);
  white-space: pre-wrap;
  line-height: 1.6;
}

.pricing-totals {
  border-top: 2px solid var(--border);
  padding-top: 1.25rem;
  margin-top: 1.25rem;
}

.pricing-total-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  font-weight: 600;
  line-height: 1.4;
}

.pricing-total-line.final-total {
  font-size: 1.25rem;
  color: var(--brand-primary);
  border-top: 1px solid var(--border);
  margin-top: 0.75rem;
  padding-top: 1.25rem;
}

.pricing-note {
  background: var(--bg-light);
  padding: 1.25rem;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-top: 1.25rem;
  border-left: 4px solid var(--warning);
  line-height: 1.6;
}

.next-steps-card h2 {
  font-size: 1.625rem;
  font-weight: 700;
  margin-bottom: 2.5rem;
  text-align: center;
  color: var(--text-primary);
  line-height: 1.3;
}

.steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .steps-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.step-item {
  text-align: center;
  padding: 2rem;
  border-radius: var(--radius);
  background: var(--bg-light);
}

.step-number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--brand-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.125rem;
  margin: 0 auto 1.5rem auto;
}

.step-content h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 0.75rem 0;
  color: var(--text-primary);
  line-height: 1.3;
}

.step-content p {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.6;
}

.thank-you-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 768px) {
  .thank-you-actions {
    grid-template-columns: 1fr auto;
  }
}

.contact-info h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.75rem 0;
  color: var(--text-primary);
  line-height: 1.3;
}

.contact-info p {
  color: var(--text-muted);
  margin: 0 0 1.25rem 0;
  line-height: 1.5;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .contact-methods {
    flex-direction: row;
    gap: 1.5rem;
  }
}

.contact-method {
  color: var(--brand-primary);
  text-decoration: none;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  line-height: 1.4;
}

.contact-method:hover {
  text-decoration: underline;
}

.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 640px) {
  .action-buttons {
    flex-direction: row;
  }
}

/* Hide native number input arrows (Chrome, Safari, Edge) */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Hide native number input arrows (Firefox) */
input[type=number] {
  -moz-appearance: textfield;
}

/* Performance Optimization: GPU acceleration for frequently animated elements */
.btn,
.summary-trigger {
  will-change: transform;
}

/* Ensure smooth scrolling performance */
.summary-drawer,
.form-step {
  contain: layout;
}

/* =================================================================== */
/* STEP 3 – NEW Calendar + Time Chips Styles (Purple Brand) */
/* =================================================================== */

/* General form field styles for Step 3 */
.c4uq-field {
  margin-bottom: var(--spacing-xl);
}

.c4uq-label {
  display: block;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--spacing-sm);
  font-size: 0.9375rem;
  line-height: 1.4;
}

.c4uq-label .req {
  color: var(--error);
}

/* NEW: Enhanced Calendar with Purple Gradient Header */
.c4u-calendar-container {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  border: 2px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background-color: var(--bg);
  box-shadow: 0 10px 30px rgba(20, 20, 43, 0.06);
}

.c4u-calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--brand-gradient);
  color: white;
  padding: var(--spacing-lg) var(--spacing-xl);
  font-weight: 600;
  font-size: 1.125rem;
}

.c4u-calendar-nav-btn {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius);
  transition: background-color 0.15s ease;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.c4u-calendar-nav-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.c4u-calendar-nav-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.c4u-calendar-month-year {
  font-weight: 700;
}

.c4u-calendar-weekdays,
.c4u-calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
}

.c4u-calendar-weekdays {
  background-color: var(--bg-light);
  padding: var(--spacing-md) 0;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.c4u-calendar-day-name {
  padding: var(--spacing-xs) 0;
}

.c4u-calendar-days {
  padding: var(--spacing-md);
  gap: 2px;
}

.c4u-calendar-day {
  padding: var(--spacing-md) 0;
  font-size: 1rem;
  cursor: pointer;
  border-radius: var(--radius);
  transition: background-color 0.15s ease, color 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  font-weight: 500;
  border: none;
  background: transparent;
}

/* FIX 2: Improved contrast for disabled/inactive/muted calendar days */
.c4u-calendar-day--disabled,
.c4u-calendar-day--inactive,
.c4u-calendar-day--muted {
  background: var(--calendar-inactive-bg);
  color: var(--calendar-inactive-text);
  cursor: not-allowed;
}

.c4u-calendar-day:hover:not(.c4u-calendar-day--disabled):not(.c4u-calendar-day--selected):not(.c4u-calendar-day--inactive):not(.c4u-calendar-day--muted) {
  background-color: var(--calendar-hover-tint);
}

/* Hover state for inactive days with 8% purple tint */
.c4u-calendar-day--disabled:hover,
.c4u-calendar-day--inactive:hover,
.c4u-calendar-day--muted:hover {
  background-color: var(--calendar-hover-tint);
}

.c4u-calendar-day--empty {
  visibility: hidden;
}

.c4u-calendar-day--selected {
  background: var(--brand-gradient);
  color: white;
  font-weight: 600;
}

.c4u-calendar-day:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
}

/* NEW: Time Chips Grid */
.c4u-time-chips {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  max-width: 760px;
  margin: 0 auto;
}

.c4u-time-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  border-radius: 16px;
  border: 2px solid var(--border);
  background: var(--bg);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.15s ease;
  color: var(--text-primary);
}

.c4u-time-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(20, 20, 43, 0.06);
  border-color: var(--brand-primary);
}

.c4u-time-chip:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
}

.c4u-time-chip.is-selected {
  color: white;
  background: var(--brand-gradient);
  border-color: transparent;
  box-shadow: 0 8px 18px rgba(138, 60, 241, 0.3);
}

/* Sunday Notice Banner */
.c4u-sunday-banner {
  margin-top: 16px;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  padding: 16px 20px;
  border-radius: 12px;
  border: 2px solid var(--brand-primary);
  background: var(--brand-primary-10);
  color: var(--text-primary);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
}

.c4u-sunday-banner::before {
  content: "\2139\fe0f";
  font-size: 1.125rem;
}

/* Help Messages */
[data-c4u-help] {
  margin: 12px auto 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.1);
  color: var(--error);
  border: 1px solid rgba(239, 68, 68, 0.3);
  font-size: 14px;
  max-width: 760px;
  display: flex;
  align-items: center;
  gap: 8px;
}

[data-c4u-help]::before {
  content: "\26a0\fe0f";
  font-size: 14px;
}

/* Responsive adjustments for Step 3 */
@media (max-width: 640px) {
  .c4u-calendar-container {
    max-width: 100%;
    border-radius: 12px;
  }

  .c4u-calendar-header {
    padding: var(--spacing-md) var(--spacing-lg);
    font-size: 1rem;
  }

  .c4u-calendar-nav-btn {
    width: 36px;
    height: 36px;
    font-size: 1.25rem;
  }

  .c4u-calendar-days {
    padding: var(--spacing-sm);
    gap: 1px;
  }

  .c4u-calendar-day {
    min-height: 40px;
    font-size: 0.9rem;
  }

  .c4u-time-chips {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .c4u-time-chip {
    height: 48px;
    font-size: 0.9rem;
  }

  .c4u-sunday-banner,
  [data-c4u-help] {
    max-width: 100%;
  }
}

/* ------------------------------------------
   Calendar: make AVAILABLE days more visible
   ------------------------------------------ */

/* Available = not disabled/inactive/muted/selected */
.c4u-calendar-days .c4u-calendar-day:not(.c4u-calendar-day--disabled):not(.c4u-calendar-day--inactive):not(.c4u-calendar-day--muted):not(.c4u-calendar-day--selected) {
  color: var(--calendar-available-text);
  font-weight: 600;
  /* give digits more presence */
}

/* Hover state for available days */
.c4u-calendar-days .c4u-calendar-day:not(.c4u-calendar-day--disabled):not(.c4u-calendar-day--inactive):not(.c4u-calendar-day--muted):not(.c4u-calendar-day--selected):hover {
  background-color: var(--calendar-hover-tint);
}

/* Focus ring for keyboard users */
.c4u-calendar-days .c4u-calendar-day:focus-visible {
  outline: 2px solid var(--calendar-available-text);
  outline-offset: 2px;
}

/* Keep disabled/outside days readable (your earlier rule can stay);
   this line just ensures there's no opacity wash-out anywhere */
.c4u-calendar-day--disabled,
.c4u-calendar-day--inactive,
.c4u-calendar-day--muted {
  opacity: 1;
  /* make sure they're visible but distinct */
}

/* Summary – Estimated range row */
.summary-range {
  position: relative;
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem 0;
  border-top: 1px dashed var(--border, #e6e6ef);
  border-bottom: 1px dashed var(--border, #e6e6ef);
  margin: .25rem 0 .75rem;
}

.summary-range-label {
  font-weight: 600;
  color: var(--text-primary, #1e1e2d);
}

.summary-range-value {
  margin-left: auto;
  font-weight: 700;
}

.summary-range-info {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid #c8c6ff;
  background: #f5f4ff;
  color: #5b4bff;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.summary-range-info:focus {
  outline: 2px solid #b4afff;
  outline-offset: 2px;
}

.summary-range-tooltip {
  position: absolute;
  right: 0;
  transform: translateY(8px);
  background: #111827;
  color: #fff;
  font-size: 12px;
  line-height: 1.4;
  padding: 10px 12px;
  border-radius: 8px;
  max-width: 280px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
  display: none;
  z-index: 50;
}

.summary-range-tooltip.is-open {
  display: block;
}

.summary-date-placeholder {
  margin: 10px 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Compact Total Block */
.summary-total.compact {
  margin-top: 8px;
  padding-top: 8px;
}

.summary-total__label {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  opacity: .9;
}

.summary-total__value {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--brand-primary);
  line-height: 1.2;
  margin-top: 4px;
}

/* Optional breakdown hidden by default */
.summary-breakdown {
  margin-top: 6px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px 10px;
  background: var(--bg-light);
}

.summary-breakdown>summary {
  cursor: pointer;
  list-style: none;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
}

.summary-breakdown>summary::-webkit-details-marker {
  display: none;
}

.summary-breakdown[open]>summary {
  color: var(--brand-primary);
}

.summary-breakdown__row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  padding: 6px 0;
  border-top: 1px dashed var(--border);
}

/* NEW Inclusions List */
.summary-includes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  /* Two columns for desktop */
  gap: 10px 20px;
  /* Adjust spacing as needed */
  margin-top: 1.5rem;
  /* Space below price block */
  padding: 0;
  list-style: none;
}

.inclusion-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.inclusion-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: rgba(16, 185, 129, 0.15);
  /* Soft green background */
  color: var(--success);
  /* Green checkmark */
  font-weight: 900;
  font-size: 0.8rem;
  flex-shrink: 0;
  /* Prevent icon from shrinking */
}

.inclusion-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

/* Tiny note */
.summary-note--tiny {
  margin-top: 10px;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* Remove old duplication if still present */
.summary-net-total,
.summary-gross-total {
  display: none !important;
}

/* Price header */
.price-head {
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--text-primary, #0F172A);
  margin: 0 0 .25rem;
}

.price-row {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.price-main {
  font-weight: 800;
  font-size: 2rem;
  letter-spacing: .2px;
  color: var(--brand-primary, #8A3CF1);
  line-height: 1.1;
}

.price-badge {
  padding: .3rem .6rem;
  border-radius: 999px;
  background: rgba(16, 185, 129, .12);
  /* soft green */
  color: #059669;
  font-weight: 700;
  font-size: .875rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

.price-before {
  margin: -0.5rem 0 0.25rem;
  font-size: 0.85rem;
  color: var(--text-muted, #64748B);
}

.price-save {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: #059669;
}

/* Keep existing breakdown button look; this is a safe enhancement */
.see-breakdown {
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  border-radius: 12px;
  border: 2px solid var(--border, #e5e7eb);
  background: var(--bg-light, #f8fafc);
  color: #334155;
  font-weight: 700;
}

.see-breakdown:hover {
  background: #f1f5f9;
}

/* Mobile tweaks */
@media (max-width: 640px) {
  .price-head {
    font-size: 1rem;
  }

  .price-main {
    font-size: 1.6rem;
  }

  .price-badge {
    font-size: .75rem;
    padding: .25rem .5rem;
  }

  .price-row {
    gap: .4rem;
  }

  /* Mobile adjustments for inclusions */
  .summary-includes {
    grid-template-columns: 1fr;
    /* Single column for mobile */
    gap: 8px;
    margin-top: 1rem;
    margin-bottom: 12px;
    /* Tighter spacing */
  }

  .inclusion-text {
    font-size: 0.85rem;
    /* Smaller font on mobile */
  }

  .inclusion-icon {
    width: 18px;
    height: 18px;
    font-size: 0.75rem;
  }
}

.price-note-mini {
  margin: .25rem 0 1rem;
  font-size: .875rem;
  color: var(--text-muted, #64748B);
}

/* Breakdown wrapper: no border/background, no extra padding */
.summary-breakdown {
  border: none;
  background: none;
  padding: 0;
  margin-top: 1rem;
}

.summary-breakdown summary {
  padding: 0;
  background: none;
  border: none;
  color: var(--brand-primary);
  font-weight: 600;
  font-size: .9rem;
}

.summary-breakdown[open] summary {
  margin-bottom: .5rem;
}

.breakdown-content {
  padding: .75rem;
  border-radius: 10px;
  background: var(--bg-light);
  border: 1px solid var(--border);
}

/* ===== [FIXED] Service Dropdown Styles - Brand-safe overrides ===== */

/* Scope under #service-group to beat theme rules without global fallout */
#service-group .service-dropdown-wrapper {
  position: relative;
  width: 100%;
  z-index: 10;
}

/* Input inherits .form-input; override brand & kill legacy purple focus */
#service-group .service-dropdown-wrapper .service-dropdown-input.form-input {
  border: 2px solid var(--border) !important;
  background: var(--bg) !important;
  color: var(--text-primary) !important;
  border-radius: 8px;
  padding-right: 2.25rem; /* space for ▼ */
  transition: all .15s ease;
}
#service-group .service-dropdown-wrapper .service-dropdown-input.form-input:focus {
  outline: none !important;
  border-color: var(--brand-primary) !important;
  box-shadow: 0 0 0 3px var(--brand-primary-10) !important;
}

/* ▼ icon */
#service-group .service-dropdown-wrapper .service-dropdown-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--text-primary);
  opacity: .7;
}

/* Open state */
#service-group .service-dropdown-wrapper.is-open .service-dropdown-input.form-input {
  border-color: var(--brand-primary) !important;
  box-shadow: 0 0 0 3px var(--brand-primary-10) !important;
}

/* Options panel */
#service-group .service-dropdown-wrapper .service-dropdown-options {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg);
  border: 2px solid var(--brand-primary);
  border-top: none;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 8px 25px rgba(0,0,0,.15);
  max-height: 300px;
  overflow-y: auto;
  z-index: 100;
  display: none;
}

#service-group .service-dropdown-wrapper.is-open .service-dropdown-options {
  display: block;
}

/* Option row */
#service-group .service-dropdown-wrapper .service-dropdown-option {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, transform .15s ease;
}
#service-group .service-dropdown-wrapper .service-dropdown-option:last-child { border-bottom: none; }

/* Hover / keyboard highlight */
#service-group .service-dropdown-wrapper .service-dropdown-option:hover,
#service-group .service-dropdown-wrapper .service-dropdown-option.highlighted {
  background: var(--brand-primary-10) !important;
  color: var(--brand-primary) !important;
  transform: translateX(4px);
}

/* "Popular" badge */
#service-group .service-dropdown-wrapper .service-popular-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  font-size: .75rem;
  font-weight: 600;
  line-height: 1.4;
  border-radius: 12px;
  background: var(--brand-primary-10) !important;
  color: var(--brand-primary) !important;
  border: 1px solid var(--brand-primary);
}

/* Dropup variant */
#service-group .service-dropdown-wrapper.dropup .service-dropdown-options {
  bottom: 100%;
  top: auto;
  border-radius: 8px 8px 0 0;
}

/* Accessibility helpers */
@media (prefers-contrast: high) {
  #service-group .service-dropdown-wrapper .service-dropdown-input.form-input { border-width: 3px; }
}

/* Postcode-first address lookup */
.c4u-postcode-row {
  align-items: end;
}

.c4u-suffix-field {
  max-width: 12rem;
}

.c4u-address-status {
  margin: var(--spacing-md) 0;
  border-radius: var(--radius);
  font-size: 0.95rem;
}

.c4u-address-status:not(:empty) {
  padding: var(--spacing-md);
  border: 1px solid var(--border);
}

.c4u-address-status.is-loading {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.c4u-address-status.is-found {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #047857;
  font-weight: 600;
}

.c4u-address-status.is-not-found,
.c4u-address-status.is-error {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}

@media (min-width: 640px) {
  .c4u-postcode-row {
    grid-template-columns: 1fr 1fr;
  }
}

/* CLEAN4U-QUOTE-UX-POLISH: modern visual-only skin overrides */
:root {
  --success: #059669;
  --error: #dc2626;
  --warning: #d97706;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 24px 70px rgba(15, 23, 42, 0.14);
  --radius: 14px;
  --radius-lg: 22px;
  --focus-ring: 0 0 0 4px color-mix(in srgb, var(--brand-primary) 22%, transparent);
  --surface-elevated: rgba(255, 255, 255, 0.92);
}

.quote-container {
  background: radial-gradient(circle at top left, var(--brand-primary-10), transparent 32rem), linear-gradient(180deg, #fff 0%, var(--bg-light) 100%);
}

.quote-form,
.summary-panel,
.summary-drawer,
.card {
  border-radius: var(--radius-lg);
  border-color: rgba(148, 163, 184, 0.26);
  box-shadow: var(--shadow);
}

.progress-container {
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
  padding: clamp(1.25rem, 4vw, 2.5rem);
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-dark) 72%, #1e1b4b 100%);
}

.progress-bar { position: relative; gap: .75rem; padding: 0; }
.progress-track,
.progress-fill { display: block !important; position: absolute; left: 20px; right: 20px; top: 20px; height: 4px; border-radius: 999px; }
.progress-track { background: rgba(255,255,255,.28); }
.progress-fill { right: auto; width: var(--progress-width, 0%); background: #fff; box-shadow: 0 0 18px rgba(255,255,255,.45); transition: width .25s ease; }
.progress-step { gap: .55rem; }
.step-indicator { width: 44px; height: 44px; border: 2px solid rgba(255,255,255,.72); color: #fff; background: rgba(255,255,255,.16); backdrop-filter: blur(10px); }
.progress-step.active .step-indicator,
.progress-step.completed .step-indicator { background: #fff; color: var(--brand-primary); transform: translateY(-1px); }

.step-title { letter-spacing: -0.03em; line-height: 1.12; }
.step-subtitle, .help-text { line-height: 1.6; }
.form-step { padding: clamp(1.25rem, 4vw, 2.25rem); }
.form-row { gap: 1rem; }
.form-group { margin-bottom: 1.15rem; }
.form-label, .c4uq-label { font-weight: 700; color: var(--text-primary); margin-bottom: .45rem; }

.form-input,
.form-select,
.form-textarea,
.service-dropdown-input {
  min-height: 48px;
  border-radius: var(--radius);
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: #fff;
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease, background-color .16s ease;
}
.form-input:hover,
.form-select:hover,
.form-textarea:hover { border-color: color-mix(in srgb, var(--brand-primary) 45%, var(--border)); }
.form-input:focus,
.form-select:focus,
.form-textarea:focus,
button:focus-visible,
a:focus-visible,
.c4u-time-chip:focus-visible,
.summary-range-info:focus-visible {
  outline: 0;
  border-color: var(--brand-primary);
  box-shadow: var(--focus-ring);
}

.btn,
.stepper-btn,
.c4u-time-chip,
.radio-option label,
.checkbox-option label,
.multi-select-option label { min-height: 44px; }
.btn { border-radius: 999px; font-weight: 800; box-shadow: 0 10px 24px rgba(15,23,42,.10); transition: transform .16s ease, box-shadow .16s ease, opacity .16s ease; }
.btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:disabled, .btn.is-loading { opacity: .58; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--brand-gradient); color: #fff; border: 0; }
.btn-secondary { background: #fff; color: var(--text-primary); border: 1px solid var(--border); }

.field--stepper { border-radius: var(--radius); background: var(--bg-light); padding: .25rem; border: 1px solid var(--border); }
.field--stepper .form-input { border: 0; box-shadow: none; background: transparent; text-align: center; }
.stepper-btn { border-radius: 12px; color: var(--brand-primary); background: #fff; border: 1px solid rgba(148,163,184,.35); }
.stepper-btn:hover { background: var(--brand-primary-10); }

.radio-option,
.checkbox-option,
.multi-select-option,
.extras-card {
  border-radius: var(--radius);
  border: 1px solid rgba(148,163,184,.30);
  background: #fff;
  box-shadow: 0 8px 24px rgba(15,23,42,.04);
}
.radio-option:has(input:checked),
.checkbox-option:has(input:checked),
.multi-select-option:has(input:checked),
.extras-card:has(.extras-card__header input:checked) {
  border-color: var(--brand-primary);
  background: linear-gradient(180deg, #fff, var(--brand-primary-10));
  box-shadow: 0 14px 34px rgba(15,23,42,.08);
}
.extras-card__header label { display: inline-flex; align-items: center; gap: .65rem; font-weight: 800; }
.c4u-svg-icon { width: 1.15em; height: 1.15em; flex: 0 0 auto; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.section-icon, .summary-empty-icon, .inclusion-icon { display: inline-flex; align-items: center; justify-content: center; color: var(--brand-primary); }

.error-message,
.terms-error,
[data-c4u-help],
.form-group.error .help-text {
  border-radius: 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  padding: .75rem .9rem;
  line-height: 1.45;
  box-shadow: 0 8px 20px rgba(220,38,38,.08);
}
.error-message::before,
.terms-error::before { content: "!"; display: inline-flex; align-items: center; justify-content: center; width: 1.25rem; height: 1.25rem; border-radius: 999px; margin-right: .45rem; background: #dc2626; color: #fff; font-weight: 900; }

.c4u-calendar-container { border-radius: var(--radius-lg); box-shadow: var(--shadow); border-color: rgba(148,163,184,.28); }
.c4u-calendar-day, .c4u-time-chip { border-radius: 14px; min-height: 44px; }
.c4u-time-chips { gap: .75rem; }
.c4u-time-chip { display: inline-flex; align-items: center; justify-content: center; padding: .75rem 1rem; border: 1px solid var(--border); background: #fff; }
.c4u-time-chip:hover { border-color: var(--brand-primary); background: var(--brand-primary-10); }
.c4u-time-chip.selected, .c4u-time-chip.is-selected { background: var(--brand-gradient); color: #fff; border-color: transparent; }

.c4u-address-status { border-radius: var(--radius); line-height: 1.5; }
.c4u-address-status:not(:empty) { padding: 1rem 1rem 1rem 3rem; position: relative; }
.c4u-address-status:not(:empty)::before { position: absolute; left: 1rem; top: 1rem; font-weight: 900; }
.c4u-address-status.is-loading::before { content: ""; width: 1rem; height: 1rem; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: c4u-spin .8s linear infinite; }
.c4u-address-status.is-found::before { content: "✓"; }
.c4u-address-status.is-not-found::before,
.c4u-address-status.is-error::before { content: "!"; }
@keyframes c4u-spin { to { transform: rotate(360deg); } }

.summary-panel { top: 1.25rem; overflow: hidden; }
.summary-header, .summary-drawer__header { background: var(--brand-gradient); color: #fff; }
.summary-section { border-radius: var(--radius); }
.summary-empty { border: 1px dashed rgba(148,163,184,.55); border-radius: var(--radius); padding: 1rem; background: var(--bg-light); }
.summary-empty-icon { font-size: 1.5rem; margin-bottom: .45rem; }
.summary-includes { gap: .55rem; }
.inclusion-icon { width: 1.35rem; height: 1.35rem; border-radius: 999px; background: #ecfdf5; color: #047857; }
.inclusion-icon .c4u-svg-icon { width: .95rem; height: .95rem; }
.summary-trigger { border-radius: 999px; box-shadow: var(--shadow-lg); background: var(--brand-gradient); }
.summary-drawer__close { min-width: 44px; min-height: 44px; border-radius: 999px; }

@media (max-width: 767px) {
  .quote-container { padding: .75rem .75rem 7.5rem; }
  .progress-info { text-align: left; }
  .progress-title { font-size: 1.15rem; }
  .form-navigation { position: sticky; bottom: 0; z-index: 40; margin: 1rem -1.25rem -1.25rem; padding: .85rem 1rem max(.85rem, env(safe-area-inset-bottom)); background: rgba(255,255,255,.92); backdrop-filter: blur(14px); border-top: 1px solid var(--border); box-shadow: 0 -12px 30px rgba(15,23,42,.10); }
  .form-navigation > div { width: 100%; margin-left: 0 !important; }
  .form-navigation .btn { flex: 1 1 auto; justify-content: center; padding-inline: 1rem; }
  #prev-btn { flex: 0 0 auto; }
  .radio-group, .checkbox-group, .multi-select { grid-template-columns: 1fr; }
  .summary-drawer { border-radius: 24px 24px 0 0; max-height: 86vh; }
  .summary-drawer__body { padding: 1rem; }
}

/* CLEAN4U-QUOTE-UX-POLISH: ensure enhanced service dropdown wins scoped legacy overrides */
#service-group .service-dropdown-wrapper .service-dropdown-input.form-input {
  border: 1px solid rgba(148, 163, 184, 0.45) !important;
  border-radius: var(--radius) !important;
  padding: 13px 48px 13px 14px !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
}

#service-group .service-dropdown-wrapper .service-dropdown-input.form-input:focus,
#service-group .service-dropdown-wrapper.is-open .service-dropdown-input.form-input {
  border-color: var(--brand-primary) !important;
  box-shadow: var(--focus-ring) !important;
}

#service-group .service-dropdown-wrapper .service-dropdown-icon {
  right: 14px;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--brand-primary-10);
  color: var(--brand-primary);
  opacity: 1;
  font-size: 0;
}

#service-group .service-dropdown-wrapper .service-dropdown-options {
  border: 1px solid color-mix(in srgb, var(--brand-primary) 55%, var(--border));
  border-radius: 18px;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.18);
  margin-top: 8px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(14px);
}

#service-group .service-dropdown-wrapper .service-dropdown-option {
  border: 0;
  border-radius: 14px;
  padding: 12px;
  transition: background-color .15s ease, color .15s ease;
}

#service-group .service-dropdown-wrapper .service-dropdown-option:hover,
#service-group .service-dropdown-wrapper .service-dropdown-option.highlighted {
  color: var(--text-primary) !important;
  transform: none;
}

/* Keep postcode manual fallback invisible until JS explicitly exposes it after lookup failure. */
[data-address-manual][hidden] {
  display: none !important;
}

/* Optional quote follow-up consent stays readable without a service-choice card. */
.quote-container .quote-consent-optional,
.quote-container .quote-consent-optional:hover,
.quote-container .quote-consent-optional:has(input:checked) {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: .75rem;
  margin-top: 1rem;
  padding: 1rem 0 0;
  min-height: auto;
  border: 0;
  border-top: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.quote-container .quote-consent-optional input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: .2rem;
}
.quote-container .quote-consent-optional .terms-label {
  color: var(--text-muted);
  font-size: .875rem;
  font-weight: 400;
  line-height: 1.6;
}
.quote-consent-optional__caption {
  display: block;
  margin-bottom: .2rem;
  font-size: .75rem;
  font-weight: 500;
}
.quote-container .quote-consent-optional:focus-within {
  outline: 2px solid var(--brand-primary);
  outline-offset: 4px;
}
