/* ClearBay Booking Flow Styles */

:root {
  --bg: #0c0c0e;
  --surface: #141416;
  --surface-2: #1c1c1f;
  --border: #2a2a2e;
  --text: #f0ede6;
  --text-muted: #8a8a8e;
  --accent: #d4a843;
  --accent-hover: #e8bc52;
  --success: #4ade80;
  --danger: #f87171;
  --font-display: 'Instrument Serif', Georgia, serif;
  --font-body: 'Satoshi', 'DM Sans', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.2; }

/* Progress bar */
.progress-bar {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 2rem 1.5rem 0;
  max-width: 640px;
  margin: 0 auto;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  position: relative;
}

.progress-step::before {
  content: '';
  position: absolute;
  top: 14px;
  left: calc(50% + 14px);
  right: calc(-50% + 14px);
  height: 1px;
  background: var(--border);
  transition: background 0.4s;
}

.progress-step:last-child::before { display: none; }

.progress-step.active::before,
.progress-step.done::before { background: var(--accent); }

.progress-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; font-weight: 600;
  color: var(--text-muted);
  transition: all 0.3s;
  position: relative; z-index: 1;
}

.progress-step.active .progress-dot {
  border-color: var(--accent);
  color: var(--accent);
}

.progress-step.done .progress-dot {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

.progress-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-align: center;
}

.progress-step.active .progress-label { color: var(--accent); }

/* Main container */
.wizard-container {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

/* Step header */
.step-header {
  margin: 2.5rem 0 2rem;
}

.step-header h2 {
  font-size: 1.9rem;
  margin-bottom: 0.5rem;
}

.step-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Photo upload zone */
.upload-zone {
  border: 1.5px dashed var(--border);
  border-radius: 12px;
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s;
  background: var(--surface);
  position: relative;
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--accent);
  background: var(--surface-2);
}

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

.upload-icon {
  width: 48px; height: 48px;
  margin: 0 auto 1rem;
  opacity: 0.5;
}

.upload-zone p { color: var(--text-muted); font-size: 0.9rem; }
.upload-zone .browse { color: var(--accent); font-weight: 600; }
.upload-zone small { display: block; margin-top: 0.5rem; color: var(--text-muted); font-size: 0.8rem; }

/* Photo preview */
.photo-preview-wrap {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.photo-preview-wrap img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
}

.photo-preview-wrap .remove-btn {
  position: absolute;
  top: 0.75rem; right: 0.75rem;
  background: rgba(0,0,0,0.7);
  border: none;
  border-radius: 8px;
  color: #fff;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.2s;
}

.photo-preview-wrap .remove-btn:hover { background: rgba(255,80,80,0.8); }

/* Sizing section */
.sizing-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.sizing-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.dimension-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.dim-field label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.dim-field input {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
  color: var(--text);
  font-size: 1.1rem;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.2s;
}

.dim-field input:focus { border-color: var(--accent); }

.sizing-source {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.sizing-source em { color: var(--accent); font-style: normal; }

/* Service type cards */
.service-cards {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.service-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.service-card:hover { border-color: var(--text-muted); }
.service-card.selected { border-color: var(--accent); background: var(--surface-2); }

.service-card input[type="radio"] { display: none; }

.service-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 1.2rem;
}

.service-card.selected .service-icon { background: rgba(212, 168, 67, 0.15); }

.service-info { flex: 1; }
.service-info h3 { font-size: 1rem; margin-bottom: 0.2rem; }
.service-info p { font-size: 0.82rem; color: var(--text-muted); }

.service-price {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--accent);
}

/* Primary button */
.btn-primary {
  width: 100%;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: 10px;
  padding: 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
  letter-spacing: 0.02em;
}

.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }

/* Secondary/back button */
.btn-secondary {
  background: none;
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  border-radius: 10px;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.btn-secondary:hover { border-color: var(--text-muted); color: var(--text); }

/* Nav buttons */
.step-nav {
  display: flex;
  gap: 0.75rem;
  margin-top: 2rem;
}

/* Bid cards */
.bids-grid {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 1.5rem;
}

.bid-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  transition: border-color 0.2s;
  cursor: pointer;
}

.bid-card:hover { border-color: var(--text-muted); }
.bid-card.selected { border-color: var(--accent); }

.bid-card input[type="radio"] { display: none; }

.bid-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.bid-provider { display: flex; align-items: center; gap: 0.6rem; }
.bid-provider h3 { font-size: 1rem; }

.badge {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-weight: 600;
}

.badge.top-rated { background: rgba(212, 168, 67, 0.15); color: var(--accent); }
.badge.local { background: rgba(74, 222, 128, 0.12); color: var(--success); }

.bid-price { font-family: var(--font-display); font-size: 1.6rem; color: var(--accent); }
.bid-price small { font-size: 0.75rem; color: var(--text-muted); font-family: var(--font-body); }

.bid-details {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.bid-stars { color: var(--accent); letter-spacing: 0.05em; }

.select-bid-btn {
  width: 100%;
  margin-top: 1rem;
  background: none;
  border: 1.5px solid var(--accent);
  color: var(--accent);
  border-radius: 8px;
  padding: 0.7rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

.select-bid-btn:hover,
.bid-card.selected .select-bid-btn {
  background: var(--accent);
  color: var(--bg);
}

/* Confirmation screen */
.confirm-container {
  max-width: 540px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
  text-align: center;
}

.confirm-icon {
  width: 80px; height: 80px;
  background: rgba(74, 222, 128, 0.12);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.75rem;
  font-size: 2.5rem;
}

.confirm-container h1 { font-size: 2.2rem; margin-bottom: 0.75rem; }
.confirm-container > p { color: var(--text-muted); margin-bottom: 2.5rem; }

.confirm-details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  text-align: left;
}

.confirm-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.confirm-row:last-child { border-bottom: none; }
.confirm-row .label { color: var(--text-muted); }
.confirm-row .value { font-weight: 600; }

.confirm-row .value.highlight { color: var(--accent); }

.next-steps {
  background: var(--surface-2);
  border-radius: 10px;
  padding: 1.25rem;
  text-align: left;
  margin-bottom: 2rem;
}

.next-steps h3 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); margin-bottom: 0.75rem; }

.step-list { list-style: none; }
.step-list li {
  display: flex; align-items: flex-start; gap: 0.75rem;
  font-size: 0.88rem; color: var(--text-muted); margin-bottom: 0.6rem;
}
.step-list li::before {
  content: attr(data-num);
  background: var(--surface);
  border-radius: 50%;
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; font-weight: 600; color: var(--accent);
  flex-shrink: 0; margin-top: 1px;
}

/* Loading overlay */
.loading-overlay {
  position: fixed; inset: 0;
  background: rgba(12, 12, 14, 0.85);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  z-index: 100;
  backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
}

.loading-overlay.visible { opacity: 1; pointer-events: all; }

.loading-spinner {
  width: 48px; height: 48px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 1rem;
}

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

.loading-text { font-size: 0.9rem; color: var(--text-muted); }

/* Toast notification */
.toast {
  position: fixed;
  bottom: 1.5rem; left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem 1.25rem;
  font-size: 0.85rem;
  color: var(--text);
  z-index: 200;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  white-space: nowrap;
}

.toast.show { transform: translateX(-50%) translateY(0); }
.toast.error { border-color: var(--danger); color: var(--danger); }

/* Mobile responsive */
@media (max-width: 480px) {
  .dimension-grid { grid-template-columns: 1fr; }
  .bid-details { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .step-header h2 { font-size: 1.5rem; }
}