/* --------------------------------------------------------------------------
   FILE: booking.css
   DEPENDENCY: styles/main.css must be loaded before this file.
   --------------------------------------------------------------------------
*/

/* --- 1. THEME VARIABLES & ANIMATIONS --- */
:root {
  /* Overriding or inheriting from main.css */
  /* secondary is green from main */
  --primary: #0284c7;       /* Professional Deep Sky Blue */
  --primary-light: #e0f2fe; /* Very light blue for backgrounds */
  --ink: #0f172a;     /* Dark Slate */
  --accent: #f59e0b;        /* Amber for money/attention */
  --surface: #ffffff;
  --bg-body: #f8fafc;       /* Light Grey/Blue Tint */
  --text-main: #334155;
  --text-muted: #64748b;
  --border: #e2e8f0;
  
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
  
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Animations */
@keyframes slideUpFade {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulseCheck {
  0% { transform: scale(0); }
  80% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

/* --- 2. MAIN LAYOUT WRAPPERS --- */
body {
  background-color: var(--bg-body);
  color: var(--text-main);
  /* Ensure header fixed positioning doesn't break flow */
  position: relative; 
}

.app-wrapper {
  /* Spacing for Fixed Header (top) and Mobile Bar (bottom) */
  padding-top: 110px; 
  padding-bottom: 100px; 
  padding-left: 1rem;
  padding-right: 1rem;
  
  max-width: 1280px;
  margin: 0 auto;
  min-height: 100vh;
  
  display: grid;
  grid-template-columns: 1fr; /* Default mobile: stack */
  gap: 2rem;
  align-items: start;
}

@media (min-width: 1024px) {
  .app-wrapper {
    /* Desktop: 2 Columns [Main Content | Sidebar] */
    grid-template-columns: 1fr 380px;
    padding-left: 2rem;
    padding-right: 2rem;
    padding-bottom: 4rem; /* Less bottom padding needed on desktop */
  }
}

/* The White Card Container for the Form */
.wizard-container {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden; /* Contains child margins */
}

@media (min-width: 768px) {
  .wizard-container { padding: 2.5rem; }
}

/* --- 3. WIZARD HEADER (Title & Navigation) --- */
.quote-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.5rem;
}

.quote-title { text-align: right; }
.quote-title h1 { 
  font-size: 1.5rem; 
  font-weight: 800; 
  color: var(--ink); 
  letter-spacing: -0.02em;
  margin: 0;
}
.quote-title p { 
  font-size: 0.85rem; 
  color: var(--text-muted); 
  margin: 2px 0 0 0; 
}

/* Back Button (Circular) */
.top-back-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-main);
  display: none; /* Hidden by default (Step 1) */
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 1.1rem;
}

.top-back-btn.visible { display: flex; animation: slideUpFade 0.3s; }

.top-back-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
  transform: translateX(-3px);
}

/* Book Call Button (Pill) */
.book-call-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.6rem 1.25rem;
  border: 1px solid var(--primary);
  border-radius: 50px;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
  background: var(--surface);
  text-decoration: none;
  transition: var(--transition);
  margin-right: auto; /* Pushes title to the right */
  margin-left: 1rem;
}

.book-call-btn:hover {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
}

@media (max-width: 600px) {
  .book-call-btn .book-call-text { display: none; } /* Show icon only on small mobile */
  .book-call-btn { padding: 0.6rem; border-radius: 50%; aspect-ratio: 1; justify-content: center; }
  .quote-title h1 { font-size: 1.25rem; }
}

/* --- 4. PROGRESS STEPS --- */
.progress-track {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin: 0 auto 3rem;
  max-width: 400px;
}

/* The Grey Line Behind */
.progress-track::before {
  content: '';
  position: absolute;
  top: 14px;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--border);
  z-index: 0;
  border-radius: 2px;
}

.step-item {
  position: relative;
  z-index: 1;
  background: var(--surface); /* Masks the line behind text */
  padding: 0 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--border);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.step-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

/* Active Step */
.step-item.active .step-circle {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
  box-shadow: 0 0 0 4px var(--primary-light);
  transform: scale(1.1);
}
.step-item.active .step-label { color: var(--primary); }

/* Completed Step */
.step-item.completed .step-circle {
  border-color: var(--primary); /* Keep it blue or change to green */
  background: var(--primary);
  color: white;
}
.step-item.completed .step-label { color: var(--primary); }

/* --- 5. FORM LAYOUT & CARDS --- */
.form-step { 
  display: none; 
}
.form-step.active { 
  display: block; 
  animation: slideUpFade 0.4s ease-out; 
}

.step-heading { 
  font-size: 1.5rem; 
  font-weight: 700;
  color: var(--ink); 
  margin-bottom: 0.5rem; 
}
.step-sub { 
  color: var(--text-muted); 
  margin-bottom: 2rem; 
  font-size: 1rem;
}

/* Grid for Cards */
.option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

/* -- The Selection Card -- */
.selection-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  cursor: pointer;
  text-align: center;
  position: relative;
  height: 100%;
  
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  
  transition: var(--transition);
}

.selection-card:hover {
  border-color: #cbd5e1;
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

/* Selected State */
.selection-card.selected {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 0 0 1px var(--primary);
}

/* Icon inside Card */
.card-icon {
  font-size: 2.2rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  transition: var(--transition);
}

.selection-card:hover .card-icon,
.selection-card.selected .card-icon {
  color: var(--primary);
  transform: scale(1.1);
}

/* Typography inside Card */
.card-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-main);
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.card-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Check Mark Badge */
.check-mark {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 26px;
  height: 26px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  
  opacity: 0;
  transform: scale(0);
  transition: var(--transition);
}

.selection-card.selected .check-mark {
  opacity: 1;
  transform: scale(1);
  animation: pulseCheck 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* --- 6. ITEM CALCULATOR (Step 3) --- */
.service-section-header {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
}

.service-section-header h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
}
.service-section-header h3 i { color: var(--primary); }

.item-group { margin-bottom: 2rem; }

.group-title {
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

/* Individual Item Row */
.item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-bottom: 0.75rem;
  transition: var(--transition);
}

.item-row:hover {
  border-color: var(--primary);
  background: #fdfdfd;
}

.item-info { display: flex; flex-direction: column; gap: 4px; }
.item-name { font-weight: 600; color: var(--text-main); font-size: 0.95rem; }
.item-price { font-size: 0.9rem; color: var(--text-muted); font-family: 'Inter', monospace; }

/* Quantity Buttons */
.item-controls { 
  display: flex;           
  align-items: center;    
  gap: 12px;               
  background: var(--bg-body);
  padding: 4px;
  border-radius: 50px;    
  border: 1px solid var(--border);
}

.qty-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--surface);
  color: var(--primary);
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  font-weight: bold;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  padding-bottom: 2px; /* Visual center adjustment */
  line-height: 1;
}

.qty-btn:hover {
  background: var(--primary);
  color: white;
  transform: scale(1.1);
}

.qty-btn:active { transform: scale(0.95); }

.qty-display {
  font-weight: 700;
  font-size: 1rem;
  min-width: 20px; 
  text-align: center;
  color: var(--ink);
}

/* --- 7. INPUT FIELDS (Step 4) --- */
.input-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
@media (min-width: 768px) { .input-row { grid-template-columns: 1fr 1fr; } }

.input-group { margin-bottom: 1.5rem; position: relative; }

.input-label {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  color: var(--ink);
}
/* --- Add this specific highlight class --- */
.input-label.label-highlight {
  font-size: 1.2rem;       /* Increase size (default is 0.85rem) */
  color: var(--primary);   /* Change to Deep Sky Blue */
  font-weight: 800;        /* Extra Bold */
  letter-spacing: -0.01em;
  margin-bottom: 1rem;     /* Add more space between label and cards */
  display: flex;           
  align-items: center;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  color: var(--text-main);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  font-family: inherit;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

/* --- 8. WIZARD NAVIGATION (Bottom Buttons) --- */
.wizard-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.btn {
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  font-size: 1rem;
}

.btn-secondary {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--bg-body); color: var(--text-main); }

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 6px rgba(2, 132, 199, 0.2);
}
.btn-primary:hover {
  background: #0369a1; /* Darker blue */
  transform: translateY(-1px);
  box-shadow: 0 6px 10px rgba(2, 132, 199, 0.3);
}

.btn-submit {
  background: var(--accent); /* Orange/Gold for action */
  color: white;
}
.btn-submit:hover { background: #d97706; }

/* --- 9. SIDEBAR SUMMARY (Desktop) --- */
.summary-sidebar {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 2rem;
  height: fit-content;
  position: sticky;
  top: 110px;
  border: 1px solid var(--border);
  display: none;
}

@media (min-width: 1024px) {
  .summary-sidebar { display: block; }
}

.summary-header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}
.summary-header h2 { font-size: 1.25rem; margin: 0; color: var(--ink); }
.ref-num { font-size: 0.8rem; color: var(--text-muted); display: block; margin-top: 4px; font-family: monospace; }

.summary-list {
  max-height: 50vh;
  overflow-y: auto;
  margin-bottom: 1rem;
  padding-right: 5px; /* Space for scrollbar */
}
/* Scrollbar styling */
.summary-list::-webkit-scrollbar { width: 4px; }
.summary-list::-webkit-scrollbar-track { background: #f1f1f1; }
.summary-list::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }

.summary-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
  color: var(--text-muted);
}
.summary-item span:last-child { font-weight: 600; color: var(--text-main); }

.summary-total {
  background: var(--ink);
  color: white;
  padding: 1.25rem;
  border-radius: var(--radius-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.total-label { font-size: 0.9rem; opacity: 0.9; }
.total-amount { font-size: 1.5rem; font-weight: 800; color: #fbbf24; }

.min-charge-notice {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fcd34d;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  margin-bottom: 1rem;
  display: none;
  line-height: 1.4;
}
.min-charge-notice.active { display: block; animation: slideUpFade 0.3s; }

/* --- 10. MOBILE SUMMARY BAR (Fixed Bottom) --- */
.mobile-summary-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  padding: 1rem 1.5rem;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
  z-index: 1000; /* High z-index to stay on top of footer */
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border);
}

@media (min-width: 1024px) {
  .mobile-summary-bar { display: none; }
}

.mobile-summary-bar .total {
  display: block;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

/* --- MOBILE SUMMARY MODAL --- */
.mobile-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0,0,0,0.5); /* Dimmed background */
  z-index: 999;
  display: flex;
  flex-direction: column;
  justify-content: flex-end; /* Slides up from bottom */
  
  /* Hidden state */
  opacity: 0; 
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-modal.open {
  opacity: 1;
  pointer-events: all;
}

.modal-content {
  background: #f1f5f9;
  height: 85vh; /* Takes up 85% of screen height */
  border-radius: 20px 20px 0 0;
  overflow-y: auto;
  padding: 1.5rem;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-modal.open .modal-content {
  transform: translateY(0);
}

.modal-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  color: white; /* Invisible header area just for the close button placement */
}
.modal-header h3 { display: none; } /* Hide title, keep close button */

.close-modal-btn {
  background: white;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #333;
  font-size: 1.2rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.2);
  cursor: pointer;
  margin-left: auto; /* Push to right */
}

/* --- RECEIPT STYLE --- */
.receipt-card {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  margin-top: 2rem; /* Space for close button */
}

.receipt-header {
  text-align: center;
  border-bottom: 2px dashed #e2e8f0;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

.receipt-items .summary-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  color: #475569;
}

.receipt-total-row {
  border-top: 2px dashed #e2e8f0;
  padding-top: 1rem;
  margin-top: 1rem;
  display: flex;
  justify-content: space-between;
  font-weight: 800;
  font-size: 1.2rem;
  color: #0f172a;
}

/* --- BANK DETAILS CARD --- */
.bank-details-card {
  margin-top: 1.5rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1rem;
}

.bank-details-card h4 {
  font-size: 0.95rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
  display: flex; 
  align-items: center; 
  gap: 8px;
}
.bank-details-card p { font-size: 0.75rem; color: #64748b; margin-bottom: 10px; }

.bank-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-bottom: 6px;
  border-bottom: 1px solid #eee;
  padding-bottom: 4px;
}

.screenshot-hint {
  text-align: center;
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 1.5rem;
  font-style: italic;
}

/* Adjust Desktop: Hide this modal on large screens */
@media (min-width: 1024px) {
  #mobile-summary-modal { display: none !important; }
  .mobile-summary-bar { display: none !important; }
}