/* ================================================================
   COMPONENTS — Editorial Light v7
   Navbar, Buttons, Cards, Inputs, Chips, etc.
   ================================================================ */

/* ---- Scroll Progress Bar ---- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background: var(--acc);
  z-index: var(--z-progress);
  width: 0%;
  transition: none;
}

/* ---- Custom Cursor (disabled) ---- */
.cursor { display: none !important; }

/* ---- Grain Overlay (hidden in light mode) ---- */
.grain { display: none; }
[data-theme="dark"] .grain {
  display: block;
  position: fixed;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  z-index: var(--z-grain);
  pointer-events: none;
  opacity: .012;
}
[data-theme="dark"] .grain::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px;
  animation: grainShift 8s steps(10) infinite;
}

/* ---- Intro Loader ---- */
.loader-screen {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: var(--z-loader);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity .6s var(--expo), visibility .6s;
}
.loader-screen.done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.loader-bar {
  width: 120px;
  height: 2px;
  background: var(--bg4);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 24px;
}
.loader-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--acc);
  transition: width .3s var(--ease);
}
.loader-text {
  font-size: 11px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--g4);
  margin-top: 16px;
  font-weight: 500;
}

/* ---- Audience Switcher Bar ---- */
.audience-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 10001;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  letter-spacing: .04em;
}
.audience-tab {
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  cursor: pointer;
  color: var(--g4);
  transition: color .2s, border-color .2s;
  border-bottom: 2px solid transparent;
  font-weight: 500;
}
.audience-tab.active {
  color: var(--w);
  border-bottom-color: var(--acc);
}
.audience-tab:hover { color: var(--g2); }

/* ---- Navbar (clean, editorial) ---- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: var(--z-nav);
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--container-pad);
  background: rgba(255, 255, 255, 0);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: background var(--dur-normal), border-color var(--dur-normal);
}
.nav.scrolled {
  background: rgba(255, 255, 255, .92);
  border-bottom-color: var(--border);
}
[data-theme="dark"] .nav.scrolled {
  background: rgba(0, 0, 0, .85);
}
.nav-inner {
  max-width: 1120px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--w);
}
.nav-brand i { font-style: normal; color: var(--g4); font-weight: 400; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links.nav-hidden { display: none !important; }
.nav-hidden { display: none !important; }
.nav-links a {
  font-size: 14px;
  color: var(--g2);
  transition: color .2s;
  letter-spacing: -.01em;
  font-weight: 500;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--acc);
  transition: width .3s var(--spring);
}
.nav-links a:hover { color: var(--w); }
.nav-links a:hover::after,
.nav-links a.on::after { width: 100%; }
.nav-links a.on { color: var(--w); }
.nav-cta {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--acc);
  padding: 8px 20px;
  border-radius: var(--rpill);
  transition: all .3s var(--spring);
  letter-spacing: -.01em;
}
.nav-cta:hover { opacity: .88; }

/* ---- Theme Toggle ---- */
.theme-toggle {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg2);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background .3s, border-color .3s, transform .2s;
  padding: 0; margin-left: 8px;
  flex-shrink: 0;
}
.theme-toggle:hover {
  background: var(--bg3);
  border-color: var(--g5);
  transform: scale(1.08);
}
.theme-toggle svg { width: 16px; height: 16px; transition: opacity .3s, transform .3s; }
.theme-toggle .icon-sun { display: var(--theme-icon-sun, block); color: var(--ylw); }
.theme-toggle .icon-moon { display: var(--theme-icon-moon, none); color: var(--g2); }

/* ---- Dark mode component overrides ---- */
[data-theme="dark"] .nav-cta { background: var(--w); color: var(--bg); }
[data-theme="dark"] .search-result-card { background: var(--bg3); }
[data-theme="dark"] .loader-screen { background: #000; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 500;
  font-size: 15px;
  border-radius: var(--rpill);
  transition: all var(--dur-normal) var(--spring);
  white-space: nowrap;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.btn::before { display: none; }

.btn-primary { background: var(--acc); color: #fff; padding: 14px 32px; }
.btn-primary:hover { opacity: .88; }
.btn-white { background: var(--w); color: var(--bg); padding: 14px 32px; font-weight: 600; }
.btn-white:hover { opacity: .88; }
.btn-link { color: var(--acc); padding: 16px 4px; font-size: 17px; gap: 4px; }
.btn-link .arrow {
  display: inline-block;
  transition: transform var(--dur-normal) var(--spring);
  font-weight: 300;
  font-size: 20px;
}
.btn-link:hover .arrow { transform: translateX(6px); }
.btn-ghost {
  background: var(--bg2);
  color: var(--w2);
  padding: 14px 28px;
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--bg3); border-color: var(--g5); }
.btn-sm { padding: 9px 20px; font-size: 13px; }
.btn-xs { padding: 6px 14px; font-size: 12px; }
.btn-lg { padding: 18px 44px; font-size: 17px; }

/* ---- Magnetic Button Wrapper (disabled) ---- */
.magnetic { display: inline-block; transition: none; }

/* ---- Cards (clean, editorial) ---- */
.card {
  background: var(--bg);
  border-radius: var(--r);
  overflow: hidden;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
  border: 1px solid var(--border);
}
.card:hover {
  border-color: var(--g5);
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
}

/* ---- Bento Cards (editorial) ---- */
.bento {
  background: var(--bg1);
  border-radius: var(--r2);
  padding: clamp(28px, 4vw, 44px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 280px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: border-color .3s, box-shadow .3s;
}
.bento:hover {
  border-color: var(--g5);
  box-shadow: 0 4px 24px rgba(0,0,0,.05);
}
.bento-glow { display: none; }

/* ---- Gradient Border Card ---- */
.gradient-card {
  position: relative;
  border-radius: var(--r2);
  padding: 1px;
  background: linear-gradient(135deg, rgba(0, 102, 204, .2), rgba(79, 70, 229, .12));
}
.gradient-card-inner {
  background: var(--bg);
  border-radius: calc(var(--r2) - 1px);
  padding: clamp(28px, 4vw, 44px);
  height: 100%;
}

/* ---- Inputs ---- */
.input {
  width: 100%;
  padding: 14px 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 15px;
  color: var(--w);
  transition: all .3s var(--spring);
}
.input:focus {
  outline: none;
  border-color: var(--acc);
  box-shadow: 0 0 0 3px var(--accG);
}
.input::placeholder { color: var(--g4); }
.input-lg { padding: 16px 22px; font-size: 16px; border-radius: 14px; }

/* ---- Chips ---- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: var(--rpill);
  background: var(--bg2);
  color: var(--g1);
  letter-spacing: .02em;
}
.chip-accent  { background: var(--accG); color: var(--acc); }
.chip-success { background: rgba(36, 138, 61, .08); color: var(--grn); }
.chip-warning { background: rgba(178, 80, 0, .08); color: var(--ylw); }
.chip-white   { background: var(--bg2); color: var(--w); border: 1px solid var(--border); }

/* ---- Marquee ---- */
.marquee {
  overflow: hidden;
  padding: 40px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.marquee-track {
  display: flex;
  gap: clamp(32px, 5vw, 64px);
  animation: marq 25s linear infinite;
  width: max-content;
  will-change: transform;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform-style: preserve-3d;
}
.marquee-track span {
  font-size: clamp(32px, 4.5vw, 48px);
  font-weight: 700;
  letter-spacing: -.03em;
  white-space: nowrap;
}
.marquee-track .country { color: var(--g5); transition: color .3s; }
.marquee-track .country:hover { color: var(--g2); }
.marquee-track .dot { color: var(--g5); font-weight: 300; }

/* ---- Counter ---- */
.count { display: inline-block; font-variant-numeric: tabular-nums; }

/* ---- Tilt Card (disabled) ---- */
.tilt { transition: none; will-change: auto; }

/* ---- Parallax ---- */
[data-speed] { will-change: transform; transition: transform .1s linear; }

/* ---- Search Dropdown ---- */
.search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  max-height: 360px;
  overflow-y: auto;
  z-index: 200;
  display: none;
  box-shadow: 0 12px 40px rgba(0,0,0,.08);
}
.search-dropdown.open { display: block; animation: ddFadeIn .2s var(--ease); }
@keyframes ddFadeIn { from { opacity:0; transform:translateY(-8px); } to { opacity:1; transform:translateY(0); } }
.search-dd-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  cursor: pointer;
  transition: background .2s;
  border-bottom: 1px solid var(--border-subtle);
}
.search-dd-item:last-child { border-bottom: none; }
.search-dd-item:hover { background: var(--bg1); }
.search-dd-item .dd-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--accG);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: var(--acc);
  flex-shrink: 0;
}
.search-dd-item .dd-info { flex: 1; min-width: 0; }
.search-dd-item .dd-name { font-size: 14px; font-weight: 600; color: var(--w); }
.search-dd-item .dd-meta { font-size: 12px; color: var(--g3); margin-top: 2px; }
.search-dd-item .dd-rating { font-size: 12px; color: #f59e0b; flex-shrink: 0; }

/* ---- Search Result Cards (clean, editorial) ---- */
.search-result-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: 24px;
  display: flex;
  gap: 20px;
  transition: all .3s var(--ease);
  cursor: pointer;
}
.search-result-card:hover {
  border-color: var(--g5);
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
}
.src-avatar {
  width: 64px; height: 64px;
  border-radius: 12px;
  background: var(--bg2);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700; color: var(--acc);
  flex-shrink: 0;
}
.src-body { flex: 1; min-width: 0; }
.src-name { font-size: 17px; font-weight: 700; color: var(--w); margin-bottom: 4px; }
.src-location { font-size: 13px; color: var(--g3); margin-bottom: 10px; }
.src-specs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.src-bottom { display: flex; align-items: center; justify-content: space-between; }
.src-stars { color: #f59e0b; font-size: 13px; }
.src-reviews { font-size: 12px; color: var(--g3); margin-left: 6px; }
.src-badge {
  font-size: 11px; font-weight: 600;
  padding: 4px 12px; border-radius: var(--rpill);
}
.src-badge.verified { background: rgba(36,138,61,.08); color: var(--grn); }
.src-badge.premium { background: rgba(178,80,0,.08); color: var(--ylw); }
.src-badge.basic { background: var(--bg2); color: var(--g3); }

/* ---- Modal Overlay ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: modalFadeIn .3s var(--ease);
}
@keyframes modalFadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px;
  max-width: 520px;
  width: 90%;
  position: relative;
  animation: modalSlideUp .4s var(--spring);
  box-shadow: 0 24px 80px rgba(0,0,0,.12);
}
@keyframes modalSlideUp { from { opacity:0; transform:translateY(24px); } to { opacity:1; transform:translateY(0); } }
.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--bg2);
  border: none;
  color: var(--g3);
  font-size: 18px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
.modal-close:hover { background: var(--bg3); color: var(--w); }

/* ---- Dashboard Stat Cards ---- */
.dash-stat {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: 24px 28px;
}
.dash-stat-label { font-size: 12px; color: var(--g3); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 8px; }
.dash-stat-value { font-size: 32px; font-weight: 700; color: var(--w); letter-spacing: -.02em; }
.dash-stat-change { font-size: 12px; margin-top: 4px; }
.dash-stat-change.up { color: var(--grn); }
.dash-stat-change.down { color: var(--red); }

/* ---- Dashboard Chart ---- */
.dash-chart-bar {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 120px;
  padding-top: 12px;
}
.dash-chart-bar div {
  flex: 1;
  background: linear-gradient(180deg, var(--acc), rgba(0,102,204,.3));
  border-radius: 6px 6px 0 0;
  min-height: 8px;
  transition: height .6s var(--spring);
  animation: barGrow .8s var(--spring) backwards;
}
@keyframes barGrow { from { transform: scaleY(0); transform-origin: bottom; } to { transform: scaleY(1); } }

/* ---- Dashboard Review Cards ---- */
.dash-review {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 20px;
}
.dash-review-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.dash-review-author { font-size: 14px; font-weight: 600; color: var(--w); }
.dash-review-date { font-size: 12px; color: var(--g4); }
.dash-review-text { font-size: 13px; color: var(--g2); line-height: 1.6; }

/* ---- Claim Flow Steps ---- */
.claim-step {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.claim-step:last-child { border-bottom: none; }
.claim-step-num {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--accG);
  color: var(--acc);
  font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.claim-step-text { font-size: 14px; color: var(--g2); }
.claim-step.done .claim-step-num { background: rgba(36,138,61,.1); color: var(--grn); }
.claim-step.done .claim-step-text { color: var(--g4); text-decoration: line-through; }

/* ---- Sidebar Nav (Dashboard) ---- */
.dash-sidebar-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 13px; color: var(--g2);
  transition: all .2s;
  cursor: pointer;
}
.dash-sidebar-link:hover { background: var(--bg2); color: var(--w); }
.dash-sidebar-link.active { background: var(--accG); color: var(--acc); font-weight: 600; }

/* ---- Loader Spinner ---- */
.loader-spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--acc);
  border-radius: 50%;
  animation: spinLoader .7s linear infinite;
  margin: 0 auto;
}
@keyframes spinLoader { to { transform: rotate(360deg); } }

/* ---- Feature Locked / Upgrade Prompt ---- */
.feature-locked {
  text-align: center;
  padding: 48px 28px;
  background: var(--bg1);
  border: 1px dashed var(--border);
  border-radius: var(--r2);
}

/* ---- Toggle Switch ---- */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px; height: 24px;
  cursor: pointer;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0;
  background: var(--bg4);
  border-radius: 24px;
  transition: background .3s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  left: 3px; bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform .3s;
  box-shadow: 0 1px 3px rgba(0,0,0,.1);
}
.toggle-switch input:checked + .toggle-slider { background: var(--acc); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

/* ---- Select Dropdown ---- */
.select {
  width: 100%;
  padding: 14px 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 15px;
  color: var(--w);
  transition: all .3s var(--spring);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2386868b' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}
.select:focus {
  outline: none;
  border-color: var(--acc);
  box-shadow: 0 0 0 3px var(--accG);
}

/* ---- Textarea ---- */
textarea.input {
  min-height: 100px;
  resize: vertical;
  font-family: inherit;
}

/* ---- Table (Dashboard) ---- */
.dash-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.dash-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--g3);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}
.dash-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--g1);
}
.dash-table tr:hover td { background: var(--bg1); }

/* ---- No Results ---- */
.no-results {
  text-align: center;
  padding: 80px 20px;
}
.no-results-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: .3;
}
.no-results-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--w);
  margin-bottom: 8px;
}
.no-results-text {
  font-size: 14px;
  color: var(--g3);
}

/* ---- FAQ Accordion ---- */
.faq-q {
  cursor: pointer;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color .2s;
}
.faq-q:hover { color: var(--acc); }
.faq-q::after {
  content: '+';
  font-size: 20px;
  color: var(--g4);
  transition: transform .3s;
}
.faq-q.faq-open::after {
  content: '\2212';
  color: var(--acc);
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease;
}
.faq-answer-inner {
  padding: 16px 0 24px;
}

/* ---- Hamburger Button ---- */
.burger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  z-index: 10;
}
.burger-btn span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--w);
  border-radius: 2px;
  transition: transform .3s, opacity .3s;
}
.burger-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger-btn.open span:nth-child(2) { opacity: 0; }
.burger-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---- Mobile Menu ---- */
#mobile-menu a {
  display: block;
  padding: 16px 0;
  font-size: 22px;
  font-weight: 600;
  color: var(--w);
  letter-spacing: -.02em;
  border-bottom: 1px solid var(--border-subtle);
  text-decoration: none;
  transition: color .2s;
}
#mobile-menu a:hover { color: var(--acc); }

/* ---- Cookie Consent ---- */
#cookie-banner {
  animation: slideUpBanner .4s ease;
}
@keyframes slideUpBanner {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ---- Photo Upload Grid ---- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}
.photo-thumb {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg2);
}
.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo-thumb .photo-delete {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0,0,0,.6);
  color: #ff453a;
  border: none;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .2s;
}
.photo-thumb:hover .photo-delete { opacity: 1; }

/* ---- Upload Drop Zone ---- */
.upload-zone {
  padding: 40px 20px;
  border: 2px dashed var(--border);
  border-radius: var(--r2);
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--acc);
  background: var(--accG);
}
.upload-zone input[type="file"] {
  display: none;
}

/* ---- Toast Notifications ---- */
.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 280px;
  max-width: 400px;
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--w);
  background: var(--bg);
  border: 1px solid var(--border);
  box-shadow: 0 8px 32px rgba(0,0,0,.1);
  animation: toastIn .35s cubic-bezier(.21,1.02,.73,1) forwards;
}
.toast.toast-out {
  animation: toastOut .25s ease-in forwards;
}
.toast-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}
.toast-success .toast-icon { background: var(--grn); color: #fff; }
.toast-error .toast-icon   { background: var(--red); color: #fff; }
.toast-info .toast-icon    { background: var(--acc); color: #fff; }
.toast-success { border-color: rgba(36,138,61,.2); }
.toast-error   { border-color: rgba(215,0,21,.2); }
.toast-info    { border-color: rgba(0,102,204,.2); }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(40px); }
}

/* ================================================================
   MAP — Leaflet overrides
   ================================================================ */

.dp-map-pin {
  background: transparent !important;
  border: none !important;
}

.dp-map-cluster-wrapper {
  background: transparent !important;
  border: none !important;
}
.dp-map-cluster {
  background: var(--acc);
  color: #fff;
  border-radius: 50%;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
  border: 2px solid rgba(255,255,255,.5);
}

/* Custom popup — light theme */
.dp-map-popup-container .leaflet-popup-content-wrapper {
  background: var(--bg);
  color: var(--g1);
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 8px 32px rgba(0,0,0,.1);
  padding: 0;
}
.dp-map-popup-container .leaflet-popup-content {
  margin: 14px 18px;
  font-size: 13px;
  line-height: 1.6;
  font-family: inherit;
}
.dp-map-popup-container .leaflet-popup-tip {
  background: var(--bg);
  border: 1px solid var(--border);
  border-top: none;
  border-left: none;
}
.dp-map-popup-container .leaflet-popup-close-button {
  color: var(--g3) !important;
  font-size: 18px;
  padding: 6px 10px 0 0 !important;
}
.dp-map-popup-container .leaflet-popup-close-button:hover {
  color: var(--w) !important;
}
.dp-map-popup a {
  color: var(--acc);
  text-decoration: none;
}
.dp-map-popup a:hover {
  text-decoration: underline;
}
.dp-map-popup strong {
  color: var(--w);
  font-size: 14px;
  display: block;
  margin-bottom: 2px;
}

/* Override Leaflet zoom controls */
.leaflet-control-zoom a {
  background: var(--bg) !important;
  color: var(--g1) !important;
  border-color: var(--border) !important;
}
.leaflet-control-zoom a:hover {
  background: var(--bg2) !important;
  color: var(--w) !important;
}

/* Override attribution */
.leaflet-control-attribution {
  background: rgba(255,255,255,.85) !important;
  color: var(--g4) !important;
  font-size: 9px !important;
  border-radius: 4px;
}
.leaflet-control-attribution a {
  color: var(--g3) !important;
}

/* Clinic sidebar layout */
.clinic-sidebar {
  min-width: 0;
}

/* Smooth map container transitions */
#clinic-map,
#search-map {
  transition: opacity .3s ease;
}

/* Leaflet tile — no filter for light theme */
.leaflet-tile {
  filter: none;
}
[data-theme="dark"] .leaflet-tile {
  filter: brightness(.95) contrast(1.05);
}

/* =============================================================
   BREADCRUMBS
   ============================================================= */
.dp-breadcrumbs {
  position: fixed;
  top: 84px;
  left: 0;
  right: 0;
  z-index: 998;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 40px;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
[data-theme="dark"] .dp-breadcrumbs {
  background: rgba(18, 18, 18, .85);
}
.breadcrumb-link {
  color: var(--acc);
  text-decoration: none;
  transition: opacity .2s;
}
.breadcrumb-link:hover { opacity: .7; }
.breadcrumb-sep {
  color: var(--g4);
  font-size: 14px;
  margin: 0 2px;
}
.breadcrumb-current { color: var(--g3); }

/* =============================================================
   USE MY LOCATION BUTTON
   ============================================================= */
.use-location-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--g3);
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color .2s, background .2s;
}
.use-location-btn:hover {
  color: var(--acc);
  background: var(--accG);
}
.use-location-btn.locating {
  color: var(--acc);
  animation: pulse-location 1.2s infinite;
}
@keyframes pulse-location {
  0%, 100% { opacity: 1; }
  50% { opacity: .4; }
}

/* Nearby clinics distance badge */
.nearby-distance {
  font-size: 11px;
  color: var(--g3);
  padding: 2px 8px;
  border-radius: 12px;
  background: var(--bg2);
}

/* =============================================================
   SEARCH SPLIT VIEW — Map + List side-by-side on desktop
   ============================================================= */
.search-split-view {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}
.search-split-list {
  min-width: 0;
  max-height: calc(100vh - 200px);
  overflow-y: auto;
  padding-right: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.search-split-list::-webkit-scrollbar {
  width: 6px;
}
.search-split-list::-webkit-scrollbar-track {
  background: transparent;
}
.search-split-list::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}
.search-split-map {
  position: sticky;
  top: 130px;
  height: calc(100vh - 200px);
  min-height: 400px;
}
#search-map-sticky {
  width: 100%;
  height: 100%;
}

/* Mobile: stack map above list */
@media (max-width: 1024px) {
  .search-split-view {
    grid-template-columns: 1fr;
  }
  .search-split-map {
    position: relative;
    top: 0;
    height: 350px;
    min-height: 280px;
    order: -1;
  }
  .search-split-list {
    max-height: none;
    overflow-y: visible;
    padding-right: 0;
  }
}
@media (max-width: 640px) {
  .search-split-map {
    height: 280px;
    min-height: 240px;
  }
}
