/**
 * Shared premium profile tokens for Vehicle / Pooling / Share detail pages.
 * CSL blues (#172a74 / #21a9af) — not purple-first. Inter matches the site.
 */
:root {
  --csl-profile-accent: #172a74;
  --csl-profile-teal: #21a9af;
  --csl-profile-green: #10b981;
  --csl-profile-dark: #1f2937;
  --csl-profile-mid: #374151;
  --csl-profile-muted: #6b7280;
  --csl-profile-light: #f8fafc;
  --csl-profile-border: #e5e7eb;
  --csl-profile-surface: #ffffff;
  --csl-profile-soft: #eef6f8;
  --csl-profile-radius: 1rem;
  --csl-profile-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
  --csl-profile-font: "Inter", sans-serif;
}

body.vehicle-profile-page,
body.pool-detail-page,
body.cshare-detail-page,
.csl-category-profile {
  --csl-profile-accent: #172a74;
  --csl-profile-teal: #21a9af;
  font-family: var(--csl-profile-font);
}

/* ── Breadcrumbs ─────────────────────────────────────────── */
.csl-profile-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.55rem;
  max-width: 1100px;
  margin: 0.85rem auto 0.35rem;
  padding: 0 1.5rem;
  font-size: 0.82rem;
  color: var(--csl-profile-muted);
}

.csl-profile-breadcrumbs a {
  color: var(--csl-profile-accent);
  font-weight: 600;
  text-decoration: none;
}

.csl-profile-breadcrumbs a:hover {
  text-decoration: underline;
}

.csl-profile-breadcrumbs .sep {
  color: #94a3b8;
  font-weight: 500;
}

/* ── Sticky section nav (clears site header) ─────────────── */
.csl-profile-section-nav,
.provider-section-tabs.csl-profile-section-nav,
nav.provider-section-tabs {
  position: sticky;
  top: calc(var(--csl-nav-h, 72px) + 0.15rem);
  z-index: 30;
  background: rgba(248, 250, 252, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--csl-profile-border);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.04);
}

/* Vehicle profile tab strip can opt in with the same sticky helper */
.vehicle-profile .tab-nav.csl-profile-section-nav,
.vehicle-profile .tab-nav {
  position: sticky;
  top: calc(var(--csl-nav-h, 72px) + 0.15rem);
  z-index: 28;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(8px);
}

/* ── CTA panel ───────────────────────────────────────────── */
.csl-profile-cta-panel {
  background: var(--csl-profile-surface);
  border: 1px solid var(--csl-profile-border);
  border-radius: var(--csl-profile-radius);
  box-shadow: var(--csl-profile-shadow);
  padding: 1.1rem 1.2rem;
}

.csl-profile-cta-panel .csl-profile-cta-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--csl-profile-dark);
  margin: 0 0 0.35rem;
}

.csl-profile-cta-panel .csl-profile-cta-hint {
  font-size: 0.82rem;
  color: var(--csl-profile-muted);
  margin: 0 0 0.85rem;
}

.csl-profile-cta-panel .csl-profile-cta-actions {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.csl-profile-cta-panel .csl-profile-edit-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1rem;
  border-radius: 50px;
  background: #fef3c7;
  color: #92400e !important;
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none !important;
  border: 1px solid #fcd34d;
}

.csl-profile-cta-panel .csl-profile-edit-cta:hover {
  background: #fde68a;
  color: #78350f !important;
  text-decoration: none !important;
}

/* ── Trust chips ─────────────────────────────────────────── */
.csl-profile-trust-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.55rem 0;
}

.csl-profile-trust-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: var(--csl-profile-soft);
  color: var(--csl-profile-accent);
  border: 1px solid #cfe8ec;
}

.csl-profile-trust-chip.is-verified {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
  border-color: rgba(16, 185, 129, 0.28);
}

.csl-profile-trust-chip.is-muted {
  background: #f1f5f9;
  color: #475569;
  border-color: #e2e8f0;
}

.csl-profile-trust-chip.is-owner {
  background: #fef3c7;
  color: #92400e;
  border-color: #fcd34d;
}

/* ── Empty states ────────────────────────────────────────── */
.csl-profile-empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  padding: 1rem 1.1rem;
  border-radius: 0.85rem;
  background: var(--csl-profile-light);
  border: 1px dashed #cbd5e1;
  color: var(--csl-profile-muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.csl-profile-empty strong {
  color: var(--csl-profile-mid);
  font-size: 0.92rem;
}

.csl-profile-empty i {
  color: var(--csl-profile-teal);
  margin-right: 0.35rem;
}

/* ── Responsive gallery helpers ──────────────────────────── */
.csl-profile-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
}

.csl-profile-gallery-item {
  border-radius: 0.75rem;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--csl-profile-soft);
  min-height: 110px;
}

.csl-profile-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.csl-profile-gallery--dense {
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 0.55rem;
}

@media (max-width: 900px) {
  .csl-profile-breadcrumbs {
    padding: 0 1rem;
    margin-top: 0.65rem;
  }

  .csl-profile-gallery {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
}

@media (max-width: 575.98px) {
  .csl-profile-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .csl-profile-section-nav,
  nav.provider-section-tabs,
  .vehicle-profile .tab-nav {
    top: calc(var(--csl-nav-h, 64px));
  }
}
