/* Copyright 2026 AbilitySoft. All rights reserved. */
/* Developed for InstaFreight, Inc. under license agreement. */

/* InstaFreight Premium UI — light mode components */

/* ── Glassmorphism card ─────────────────────────────────────── */
.glass-card {
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(16px) saturate(1.6);
  -webkit-backdrop-filter: blur(16px) saturate(1.6);
  border: 1px solid rgba(255,255,255,0.85);
  box-shadow: 0 4px 24px rgba(0,0,0,0.06), 0 1px 4px rgba(0,0,0,0.04);
  border-radius: 1rem;
}
.glass-card-sm {
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.9);
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  border-radius: 0.75rem;
}

/* ── Fuzzy dropdown ─────────────────────────────────────────── */
.fuzzy-wrap { position: relative; }
.fuzzy-input {
  width: 100%;
  padding: 0.625rem 2.5rem 0.625rem 0.875rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 0.625rem;
  font-size: 0.875rem;
  background: #fff;
  color: #1e293b;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.fuzzy-input:focus {
  border-color: #c62828;
  box-shadow: 0 0 0 3px rgba(198,40,40,0.1);
}
.fuzzy-input-icon {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
  font-size: 0.75rem;
}
.fuzzy-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.625rem;
  box-shadow: 0 8px 30px rgba(0,0,0,0.1);
  max-height: 220px;
  overflow-y: auto;
  z-index: 500;
  display: none;
}
.fuzzy-list.open { display: block; }
.fuzzy-list::-webkit-scrollbar { width: 4px; }
.fuzzy-list::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
.fuzzy-item {
  padding: 0.5rem 0.875rem;
  font-size: 0.8125rem;
  color: #1e293b;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: background 0.1s;
}
.fuzzy-item:hover, .fuzzy-item.active { background: #fef2f2; color: #c62828; }
.fuzzy-item mark {
  background: transparent;
  color: #c62828;
  font-weight: 700;
}
.fuzzy-flag { font-size: 1rem; flex-shrink: 0; }
.fuzzy-phone { font-size: 0.7rem; color: #94a3b8; margin-left: auto; }

/* ── Range slider ───────────────────────────────────────────── */
.premium-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(to right, #c62828 var(--pct,0%), #e2e8f0 var(--pct,0%));
  outline: none;
  cursor: pointer;
}
.premium-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 2.5px solid #c62828;
  box-shadow: 0 2px 8px rgba(198,40,40,0.25);
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s;
}
.premium-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 3px 12px rgba(198,40,40,0.35);
}
.premium-slider::-moz-range-thumb {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 2.5px solid #c62828;
  box-shadow: 0 2px 8px rgba(198,40,40,0.25);
  cursor: pointer;
}
.slider-readout {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.125rem;
  color: #c62828;
  line-height: 1;
}
.slider-readout small { font-size: 0.7rem; font-weight: 600; color: #94a3b8; }

/* ── Spring modal ───────────────────────────────────────────── */
.spring-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(15,23,42,0.45);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.2s;
}
.spring-modal-backdrop.open { opacity: 1; }
.spring-modal {
  background: #fff;
  border-radius: 1.25rem;
  box-shadow: 0 24px 64px rgba(0,0,0,0.18), 0 4px 16px rgba(0,0,0,0.08);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px) scale(0.96);
  transition: transform 0.28s cubic-bezier(0.34,1.56,0.64,1), opacity 0.2s;
  opacity: 0;
}
.spring-modal.open { transform: translateY(0) scale(1); opacity: 1; }
.spring-modal-header {
  padding: 1.25rem 1.5rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 1rem;
}
.spring-modal-title { font-family: 'Outfit',sans-serif; font-weight: 800; font-size: 1.05rem; color: #0f172a; }
.spring-modal-close {
  width: 2rem; height: 2rem;
  border-radius: 50%;
  border: none;
  background: #f1f5f9;
  color: #64748b;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem;
  transition: background 0.15s, color 0.15s;
}
.spring-modal-close:hover { background: #fee2e2; color: #c62828; }
.spring-modal-body { padding: 1.25rem 1.5rem 1.5rem; }

/* ── Password strength meter ────────────────────────────────── */
.pw-meter { height: 4px; border-radius: 2px; background: #e2e8f0; overflow: hidden; margin-top: 6px; }
.pw-meter-bar { height: 100%; border-radius: 2px; width: 0; transition: width 0.35s, background-color 0.35s; }
.pw-meter-bar.s0 { width: 0; }
.pw-meter-bar.s1 { width: 25%; background: #ef4444; }
.pw-meter-bar.s2 { width: 50%; background: #f97316; }
.pw-meter-bar.s3 { width: 75%; background: #eab308; }
.pw-meter-bar.s4 { width: 100%; background: #22c55e; }
.pw-label { font-size: 0.7rem; font-weight: 600; margin-top: 4px; }
.pw-label.s0 { color: #94a3b8; }
.pw-label.s1 { color: #ef4444; }
.pw-label.s2 { color: #f97316; }
.pw-label.s3 { color: #eab308; }
.pw-label.s4 { color: #22c55e; }

/* ── Step wizard ────────────────────────────────────────────── */
.wizard-step { display: none; }
.wizard-step.active { display: block; animation: wiz-in 0.22s ease; }
@keyframes wiz-in { from { opacity:0; transform:translateX(16px); } to { opacity:1; transform:translateX(0); } }
.step-indicator {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 1.75rem;
}
.step-dot {
  width: 2rem; height: 2rem;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  border: 2px solid #e2e8f0;
  background: #fff;
  color: #94a3b8;
  transition: all 0.2s;
  flex-shrink: 0;
}
.step-dot.done { background: #c62828; border-color: #c62828; color: #fff; }
.step-dot.active { border-color: #c62828; color: #c62828; box-shadow: 0 0 0 3px rgba(198,40,40,0.12); }
.step-line { flex: 1; height: 2px; background: #e2e8f0; margin: 0 4px; }
.step-line.done { background: #c62828; }

/* ── Type card (signup step-1) ──────────────────────────────── */
.type-card {
  border: 2px solid #e2e8f0;
  border-radius: 1rem;
  padding: 1.5rem 1.25rem;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
  background: #fff;
  user-select: none;
}
.type-card:hover { border-color: #f87171; box-shadow: 0 4px 16px rgba(198,40,40,0.1); transform: translateY(-2px); }
.type-card.selected { border-color: #c62828; box-shadow: 0 4px 20px rgba(198,40,40,0.18); background: #fff1f1; }
.type-card-icon { width: 3rem; height: 3rem; margin: 0 auto 0.75rem; border-radius: 0.875rem; display: flex; align-items: center; justify-content: center; font-size: 1.375rem; }
.type-card-label { font-family: 'Outfit',sans-serif; font-weight: 700; font-size: 0.9375rem; color: #0f172a; }
.type-card-desc { font-size: 0.75rem; color: #64748b; margin-top: 0.25rem; line-height: 1.4; }

/* ── Floating action card ───────────────────────────────────── */
.float-action-card {
  position: sticky;
  bottom: 1.5rem;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.95);
  border-radius: 1rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
  z-index: 10;
}
.gold-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, #b45309, #d97706, #f59e0b);
  color: #fff;
  font-weight: 700;
  font-size: 0.875rem;
  font-family: 'Outfit', sans-serif;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(180,83,9,0.35);
  transition: transform 0.15s, box-shadow 0.15s;
  text-decoration: none;
}
.gold-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(180,83,9,0.45); }
.gold-btn:active { transform: translateY(0); }

/* ── Leaflet map container ──────────────────────────────────── */
.premium-map {
  width: 100%;
  height: 240px;
  border-radius: 0.875rem;
  overflow: hidden;
  border: 1.5px solid #e2e8f0;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.premium-map-lg { height: 340px; }

/* ── Bid slider card ────────────────────────────────────────── */
.bid-preset-btn {
  padding: 0.375rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  color: #475569;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s, color 0.12s;
}
.bid-preset-btn:hover, .bid-preset-btn.active { border-color: #c62828; background: #fef2f2; color: #c62828; }

/* ── Milestone timeline ─────────────────────────────────────── */
.milestone-line { position: relative; }
.milestone-line::before {
  content: '';
  position: absolute;
  left: 1rem;
  top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, #c62828, #e2e8f0);
}
.milestone-dot {
  width: 2rem; height: 2rem;
  border-radius: 50%;
  border: 2.5px solid #e2e8f0;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem;
  position: relative;
  z-index: 1;
  transition: all 0.2s;
  flex-shrink: 0;
  cursor: pointer;
}
.milestone-dot.done { background: #c62828; border-color: #c62828; color: #fff; }
.milestone-dot.active { border-color: #c62828; color: #c62828; box-shadow: 0 0 0 4px rgba(198,40,40,0.12); }
.milestone-dot:hover { transform: scale(1.12); }

/* ── Doc drawer slide-out ───────────────────────────────────── */
.doc-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 360px;
  max-width: 95vw;
  background: #fff;
  box-shadow: -8px 0 40px rgba(0,0,0,0.12);
  z-index: 8000;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
}
.doc-drawer.open { transform: translateX(0); }
.doc-drawer-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.doc-drawer-body { flex: 1; overflow-y: auto; padding: 1rem 1.5rem; }

/* ── Status chip ────────────────────────────────────────────── */
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* ── Progress bar ───────────────────────────────────────────── */
.progress-track { height: 6px; background: #f1f5f9; border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 3px; background: linear-gradient(to right, #c62828, #f44336); transition: width 0.5s ease; }

/* Card shimmer overlay effect */
.hover-shimmer {
  position: relative;
  overflow: hidden;
}
.hover-shimmer::after {
  content: '';
  position: absolute;
  top: 0; left: -150%; width: 50%; height: 100%;
  background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 100%);
  transform: skewX(-25deg);
  transition: 0.75s;
}
.hover-shimmer:hover::after {
  left: 150%;
}
