/* ══════════════════════════════════════════
   VETSY  –  dash-redesign.css  (facelift v2)
   Premium visual facelift — structure & functionality unchanged.
   DO NOT change layout, navigation, or section order.
══════════════════════════════════════════ */

/* ── Touch performance — eliminate 300ms tap delay everywhere ─── */
a, button, [role="button"], [onclick],
.booking-item, .mobile-nav__item, .sidebar__link,
.pet-card, .slot-btn, .date-chip, .vet-item,
#location-bar, .modal__close, .btn {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* ── Base ─────────────────────────────────────────────────────── */
.app-body  { background: #F7F8FA; }
.app-main  { background: #F7F8FA; }
.app-content { padding: 0; }
.view { padding: 2.5rem clamp(1.25rem,4vw,2.5rem) 5rem; }

/* ── Top nav ──────────────────────────────────────────────────── */
.app-nav {
  height: 64px;
  background: rgba(255,255,255,0.97);
  /* Reduced blur — heavy blur causes input latency on mobile */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,.07);
  box-shadow: 0 1px 0 rgba(255,255,255,.9), 0 2px 12px rgba(0,0,0,.04);
  touch-action: manipulation;
}

/* ── Location bar (nav) ───────────────────────────────────────── */
#location-bar {
  background: #F1F4F8;
  border-radius: 12px;
  padding: .375rem .75rem .375rem .625rem;
  border: 1px solid rgba(0,0,0,.07);
  transition: background .15s, border-color .15s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
#location-bar:hover { background: #E8ECF2; border-color: rgba(0,0,0,.1); }
#location-bar-label {
  font-weight: 700;
  font-size: .8125rem;
  color: #0d1b2a;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}
#location-bar-address {
  font-size: .7rem;
  color: #7B90A8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
  display: flex;
  align-items: center;
  gap: .25rem;
  margin-top: 1px;
}

/* ── Sidebar (desktop) ────────────────────────────────────────── */
.sidebar {
  width: 256px;
  background: #0d1b2a;
  border-right: none;
  padding: 1.75rem 0;
  box-shadow: 4px 0 32px rgba(0,0,0,.12);
}
.sidebar__section { padding: 0 1rem; }
.sidebar__link {
  color: #64748b;
  font-size: .875rem;
  font-weight: 500;
  padding: .7rem .875rem;
  border-radius: 10px;
  gap: .75rem;
  letter-spacing: -.01em;
  transition: background 140ms, color 140ms;
  border: 1px solid transparent;
}
.sidebar__link svg { width: 17px; height: 17px; }
.sidebar__link:hover {
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.8);
}
.sidebar__link.active {
  background: rgba(255,255,255,.08);
  color: #f1f5f9;
  border-color: rgba(255,255,255,.09);
  box-shadow: 0 1px 4px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.05);
}
.app-topbar { display: none !important; }

/* ── View hero — REMOVE giant ghost text ─────────────────────── */
.view-hero {
  position: relative;
  margin-bottom: 2rem;
  overflow: visible;
  min-height: unset;
}
/* Nuclear removal of all ghost/faded background text */
.view-hero__ghost  { display: none !important; }
.empty-billboard__ghost { display: none !important; }

.view-hero__inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ── Section pill ─────────────────────────────────────────────── */
.section-pill {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .625rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: #7B90A8;
  background: #fff;
  border: 1px solid rgba(0,0,0,.07);
  border-radius: 999px;
  padding: .275rem .75rem .275rem .5rem;
  margin-bottom: .75rem;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.section-pill__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #1B5638;
  flex-shrink: 0;
}

/* ── View hero typography ─────────────────────────────────────── */
.view-hero h1 {
  font-family: 'Inter', sans-serif;
  font-size: clamp(1.625rem, 4vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -.045em;
  color: #0d1b2a;
  line-height: 1.08;
  margin-bottom: .3rem;
}
.view-hero p {
  font-size: .875rem;
  color: #9BAEC1;
  font-weight: 400;
  margin: 0;
  letter-spacing: -.01em;
  line-height: 1.5;
}

/* ── Primary CTA button — premium ────────────────────────────── */
.btn--primary {
  height: 44px;
  padding: 0 1.375rem;
  background: #0d1b2a;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: .875rem;
  font-weight: 700;
  letter-spacing: -.01em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .375rem;
  box-shadow:
    0 1px 2px rgba(0,0,0,.14),
    0 4px 16px rgba(13,27,42,.22);
  transition: background .15s, box-shadow .15s, transform .12s;
  white-space: nowrap;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.btn--primary:hover {
  background: #162740;
  box-shadow:
    0 2px 4px rgba(0,0,0,.14),
    0 8px 24px rgba(13,27,42,.3);
  transform: translateY(-1px);
}
.btn--primary:active {
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(0,0,0,.12);
}

/* ── Booking items ────────────────────────────────────────────── */
.booking-item {
  background: #fff;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(0,0,0,.03), 0 3px 14px rgba(0,0,0,.05);
  transition: box-shadow .2s ease, transform .2s ease;
  overflow: hidden;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.booking-item + .booking-item { margin-top: .625rem; }
.booking-item:hover {
  box-shadow: 0 4px 24px rgba(0,0,0,.09);
  transform: translateY(-1px);
}
.booking-item__icon {
  width: 44px;
  height: 44px;
  background: #F1F4F8;
  border-radius: 10px;
  border: none;
}
.booking-item__vet { font-weight: 700; letter-spacing: -.02em; }

/* ── Section dividers ─────────────────────────────────────────── */
.past-label {
  font-size: .625rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #C5D0DE;
  margin: 2.5rem 0 1rem;
  display: flex;
  align-items: center;
  gap: .875rem;
}
.past-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, #E2E8F0 60%, transparent);
}
.month-divider {
  font-size: .625rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #94a3b8;
  margin: 1.5rem 0 .625rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(226,232,240,.7);
}

/* ── Empty state card ─────────────────────────────────────────── */
.empty-billboard {
  background: #fff;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 24px;
  padding: 3.5rem 2rem 2.75rem;
  text-align: center;
  box-shadow: 0 1px 2px rgba(0,0,0,.03), 0 8px 32px rgba(0,0,0,.05);
  position: relative;
  overflow: hidden;
}
/* Hide the old SVG calendar icon — replaced by image */
.empty-billboard > svg { display: none !important; }

/* Dashboard illustration */
.empty-billboard__img {
  width: 148px;
  height: 148px;
  object-fit: contain;
  margin: 0 auto 1.75rem;
  display: block;
  position: relative;
  z-index: 1;
  user-select: none;
  pointer-events: none;
}
.empty-billboard h3 {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -.035em;
  color: #0d1b2a;
  margin-bottom: .375rem;
  position: relative;
  z-index: 1;
  line-height: 1.2;
}
.empty-billboard p {
  font-size: .9rem;
  color: #9BAEC1;
  margin-bottom: 1.625rem;
  position: relative;
  z-index: 1;
  line-height: 1.6;
  max-width: 280px;
  margin-left: auto;
  margin-right: auto;
}
.empty-billboard .btn {
  position: relative;
  z-index: 1;
  margin-bottom: 0;
}

/* Trust indicators row */
.empty-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
  margin-top: 1.75rem;
  padding-top: 1.375rem;
  border-top: 1px solid #F1F5F9;
}
.empty-trust__item {
  display: flex;
  align-items: center;
  gap: .3rem;
  font-size: .675rem;
  font-weight: 600;
  color: #B0BFCC;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.empty-trust__item svg {
  width: 12px;
  height: 12px;
  color: #C5D0DE;
  flex-shrink: 0;
}

/* ── General card ─────────────────────────────────────────────── */
.card {
  background: #fff;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(0,0,0,.03), 0 4px 20px rgba(0,0,0,.05);
}

/* ── Mobile bottom nav ────────────────────────────────────────── */
@media (max-width: 1023px) {
  .sidebar { display: none; }
  .view { padding: 1.5rem 1.125rem 6rem; }
  .view-hero h1 { font-size: clamp(1.375rem, 5vw, 1.875rem); }

  .mobile-nav {
    background: #fff;
    /* No blur on mobile nav — single biggest source of touch lag */
    border-top: 1px solid rgba(0,0,0,.08);
    box-shadow: 0 -2px 16px rgba(0,0,0,.06);
  }
  .mobile-nav__item {
    color: #B8C8D8;
    font-size: .625rem;
    font-weight: 500;
    letter-spacing: .02em;
    /* Larger tap target — was .25rem sides (4px), now .5rem (8px) */
    padding: .625rem .5rem .5rem;
    gap: .25rem;
    /* Remove 300ms tap delay */
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    /* Instant color response on tap */
    transition: color .08s;
  }
  .mobile-nav__item svg {
    width: 22px;
    height: 22px;
    stroke-width: 1.75;
    opacity: .5;
    transition: opacity .08s;
  }
  .mobile-nav__item.active {
    color: #0d1b2a;
    font-weight: 700;
  }
  .mobile-nav__item.active svg {
    opacity: 1;
    color: #0d1b2a;
  }
  .pet-grid { grid-template-columns: 1fr; }
}

/* ── Scrollbar ────────────────────────────────────────────────── */
.sidebar::-webkit-scrollbar-track { background: #1e293b; }
.sidebar::-webkit-scrollbar-thumb { background: #334155; }

/* ══════════════════════════════════════════════════════
   Location picker modal — bottom sheet (premium)
══════════════════════════════════════════════════════ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(13,27,42,.52);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s;
  padding: 0;
}
.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: #fff;
  border-radius: 24px 24px 0 0;
  width: 100%;
  max-width: 560px;
  /* cap height so map + controls fit without overflowing the screen */
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.5rem 1.25rem calc(1.5rem + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -4px 40px rgba(0,0,0,.18);
  overscroll-behavior: contain;
  /* slide-up animation */
  animation: dash-sheet-up .22s ease both;
}
@keyframes dash-sheet-up {
  from { transform: translateY(40px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
/* drag handle */
.modal::before {
  content: '';
  display: block;
  width: 36px;
  height: 4px;
  border-radius: 999px;
  background: #E2E8F0;
  margin: -1rem auto 1.25rem;
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.modal__title {
  font-size: 1.0625rem;
  font-weight: 800;
  color: #0d1b2a;
  letter-spacing: -.03em;
}
.modal__close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #F1F4F8;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7B90A8;
  transition: background .15s;
  flex-shrink: 0;
}
.modal__close:hover { background: #E2E8F0; color: #0d1b2a; }
.modal__close svg   { width: 14px; height: 14px; }

/* GPS / current-location button */
#loc-gps-btn {
  width: 100%;
  height: 44px;
  background: #F1F4F8;
  border: 1.5px solid rgba(0,0,0,.07);
  border-radius: 12px;
  color: #0d1b2a;
  font-size: .875rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  margin-bottom: 1rem;
  transition: background .15s;
}
#loc-gps-btn:hover { background: #E8ECF2; }
#loc-gps-btn svg   { width: 16px; height: 16px; color: #1B5638; }

/* Map container — responsive height */
#loc-map {
  height: clamp(190px, 42vw, 240px) !important;
  border-radius: 14px !important;
  overflow: hidden;
  border: 1px solid #E2E8F0 !important;
  margin-bottom: .75rem;
}

/* Hint text under map */
#location-modal p,
.modal > p[style*="color:#64748b"] {
  font-size: .8rem !important;
  color: #9BAEC1 !important;
  margin-bottom: .75rem;
}

/* Address preview bubble */
#loc-address-preview {
  background: #F7F8FA !important;
  border: 1px solid #E2E8F0 !important;
  border-radius: 12px !important;
  padding: .75rem 1rem !important;
  font-size: .875rem !important;
  color: #334155 !important;
  margin-bottom: 1rem !important;
  line-height: 1.5;
}

/* Error text */
#loc-error {
  color: #dc2626;
  font-size: .8125rem;
  margin-bottom: .5rem;
}

/* Footer confirm button */
.modal__footer { padding-top: .25rem; }
.modal__footer .btn,
#loc-confirm-btn {
  width: 100%;
  height: 48px;
  background: #0d1b2a;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 2px rgba(0,0,0,.14), 0 4px 16px rgba(13,27,42,.22);
  transition: background .15s, box-shadow .15s, transform .12s;
}
#loc-confirm-btn:hover {
  background: #162740;
  box-shadow: 0 2px 4px rgba(0,0,0,.14), 0 8px 24px rgba(13,27,42,.3);
  transform: translateY(-1px);
}
#loc-confirm-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ── Mobile: tighten up ───────────────────────────── */
@media (max-width: 600px) {
  .modal {
    border-radius: 20px 20px 0 0;
    padding: 1.25rem 1rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
  }
  #loc-map {
    height: clamp(170px, 46vw, 210px) !important;
  }
}
