/* ═══════════════════════════════════════════
   Memoroam — Curated Discover (DEMO)
   Bottom sheet for pre-populated place picks.
   Pair with js/itinerary/curated-places-demo.js.
   Safe to remove as a unit.
   ═══════════════════════════════════════════ */

/* ── Overlay ──────────────────────────────── */

.cd-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  z-index: 9200;
  display: none;
  align-items: flex-end;
  justify-content: center;
  transition: background 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.cd-overlay.cd-open {
  background: rgba(0, 0, 0, 0.48);
}

/* ── Sheet ────────────────────────────────── */

.cd-sheet {
  position: relative;
  width: 100%;
  max-width: 520px;
  background: var(--card);
  border-radius: 28px 28px 0 0;
  padding: 20px 20px 24px;
  box-shadow: 0 -14px 44px rgba(0, 0, 0, 0.22);
  transform: translateY(100%);
  transition: transform 0.34s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 92vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.cd-overlay.cd-open .cd-sheet { transform: translateY(0); }

.cd-sheet::before {
  content: '';
  display: block;
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.12);
  margin: 0 auto 14px;
}
[data-theme="dark"] .cd-sheet::before { background: rgba(255, 255, 255, 0.15); }

.cd-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.05);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.55;
  transition: opacity 0.15s, background 0.15s;
  z-index: 2;
}
.cd-close:active { opacity: 1; background: rgba(0, 0, 0, 0.08); }
[data-theme="dark"] .cd-close { background: rgba(255, 255, 255, 0.06); }

/* ── Header ───────────────────────────────── */

.cd-header {
  text-align: left;
  padding: 4px 2px 16px;
}
.cd-eyebrow {
  font-family: 'DM Sans', sans-serif;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 7px;
  opacity: 0.72;
}
.cd-city {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--text);
  line-height: 1.08;
}
.cd-sub {
  margin-top: 6px;
  font-family: 'DM Sans', sans-serif;
  font-size: 12.5px;
  font-weight: 400;
  color: var(--muted);
}

/* ── Filter pills ─────────────────────────── */

.cd-pills {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 20px 16px;
  margin: 0 -20px 2px;
  scrollbar-width: none;
  position: sticky;
  top: 0;
  background: var(--card);
  z-index: 1;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}
[data-theme="dark"] .cd-pills { border-bottom-color: rgba(255, 255, 255, 0.06); }
.cd-pills::-webkit-scrollbar { display: none; }

.cd-pill {
  --cd-cat: #8A7D72;
  flex-shrink: 0;
  padding: 6px 13px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  background: transparent;
  font-family: 'DM Sans', sans-serif;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text);
  opacity: 0.65;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}
[data-theme="dark"] .cd-pill { border-color: rgba(255, 255, 255, 0.1); }
.cd-pill:active { transform: scale(0.97); }
.cd-pill.cd-pill-active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
  opacity: 1;
}

/* ── Place rows (editorial list) ──────────── */

.cd-list {
  display: flex;
  flex-direction: column;
  padding: 4px 0 2px;
}

.cd-card {
  --cd-cat: #8A7D72;
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 2px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  transition: opacity 0.18s;
}
[data-theme="dark"] .cd-card { border-top-color: rgba(255, 255, 255, 0.06); }
.cd-card:first-child {
  border-top: none;
  padding-top: 12px;
}
.cd-card:active { opacity: 0.85; }

/* Reuses .cd-card-bar element as a category dot */
.cd-card-bar {
  width: 6px;
  height: 6px;
  flex-shrink: 0;
  background: var(--cd-cat);
  border-radius: 50%;
  margin-top: 11px;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--cd-cat) 14%, transparent);
}

.cd-card-body {
  flex: 1;
  min-width: 0;
}

.cd-card-name {
  font-family: 'Playfair Display', serif;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text);
  line-height: 1.22;
  margin-bottom: 5px;
}

.cd-card-meta {
  font-family: 'DM Sans', sans-serif;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--cd-cat);
  margin-bottom: 7px;
}

.cd-card-blurb {
  font-family: 'DM Sans', sans-serif;
  font-size: 13.5px;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.5;
}

/* Hero treatment for the first visible row (skip if already added) */
.cd-card:not(.cd-card-added):first-child .cd-card-name {
  font-size: 22px;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.cd-card:not(.cd-card-added):first-child .cd-card-blurb {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-weight: 400;
  font-size: 14.5px;
  color: var(--text);
  opacity: 0.7;
  line-height: 1.45;
}
.cd-card:not(.cd-card-added):first-child .cd-card-bar {
  margin-top: 14px;
}

/* Add button — outlined, refined */
.cd-card-add {
  align-self: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  margin-right: 2px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.14);
  background: transparent;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.12s, background 0.15s, color 0.15s, border-color 0.15s;
}
[data-theme="dark"] .cd-card-add { border-color: rgba(255, 255, 255, 0.18); }
.cd-card-add:active {
  transform: scale(0.92);
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

/* Checkmark badge that replaces the add button once a place is in the day.
   Distinct class from .cd-card-added (which is a row-state modifier) so the
   width/height/circle styling doesn't collapse the parent row. */
.cd-card-check {
  align-self: center;
  flex-shrink: 0;
  margin-right: 2px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--cd-cat) 14%, transparent);
  color: var(--cd-cat);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cd-card.cd-card-added { opacity: 0.45; }

.cd-empty {
  padding: 48px 20px;
  text-align: center;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: var(--muted);
  opacity: 0.75;
}

/* ── Manual fallback footer ───────────────── */

.cd-manual {
  width: 100%;
  margin-top: 18px;
  padding: 16px 8px 4px;
  border: none;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-family: 'DM Sans', sans-serif;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  opacity: 0.85;
  transition: opacity 0.15s, color 0.15s;
}
.cd-manual:active {
  opacity: 1;
  color: var(--text);
}
[data-theme="dark"] .cd-manual { border-top-color: rgba(255, 255, 255, 0.06); }


/* ═══════════════════════════════════════════
   Day-view Discover CTA (empty state variant)
   ═══════════════════════════════════════════ */

.ide-discover-cta {
  width: 100%;
  padding: 16px 18px;
  margin: 6px 0 10px;
  border: none;
  border-radius: 16px;
  background: linear-gradient(135deg,
    rgba(74, 120, 201, 0.08),
    rgba(201, 107, 114, 0.06),
    rgba(107, 143, 107, 0.05));
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  position: relative;
  overflow: hidden;
  transition: transform 0.12s, box-shadow 0.2s;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}
.ide-discover-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  pointer-events: none;
}
[data-theme="dark"] .ide-discover-cta::before {
  border-color: rgba(255, 255, 255, 0.08);
}
.ide-discover-cta:active {
  transform: scale(0.992);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
}

.ide-discover-cta-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--card);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.ide-discover-cta-body {
  flex: 1;
  min-width: 0;
}
.ide-discover-cta-title {
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--text);
  line-height: 1.2;
}
.ide-discover-cta-sub {
  margin-top: 2px;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}
.ide-discover-cta-arrow {
  flex-shrink: 0;
  opacity: 0.5;
}

/* Manual "add custom" fallback button inside empty state */
.ide-manual-alt {
  display: block;
  margin: 10px auto 0;
  padding: 9px 18px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: 'DM Sans', sans-serif;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.15s;
}
.ide-manual-alt:active { opacity: 1; }
