/* ═══════════════════════════════════════════
   Memoroam — Discovery Sheet + Day Builder
   Bottom sheet overlay, Search/Browse/Suggest
   tabs, and Day Builder empty state / toolbar.
   ═══════════════════════════════════════════ */

/* ── Bottom sheet overlay ────────────────── */

.disc-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 9000;
  display: none;
  align-items: flex-end;
  justify-content: center;
  animation: discFadeIn 0.2s ease;
}

@keyframes discFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.disc-sheet {
  width: 100%;
  max-width: 500px;
  max-height: 80vh;
  background: var(--card, #FFFFFF);
  border-radius: 20px 20px 0 0;
  padding: 12px 16px 24px;
  display: flex;
  flex-direction: column;
  animation: discSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.15);
}

@keyframes discSlideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.disc-handle {
  width: 36px;
  height: 4px;
  background: var(--border, #E0DFD9);
  border-radius: 2px;
  margin: 0 auto 14px;
}

/* ── Tab bar ─────────────────────────────── */

.disc-tabs {
  display: flex;
  gap: 0;
  background: var(--bg, #F4F3EE);
  border-radius: 10px;
  padding: 3px;
  margin-bottom: 14px;
}

.disc-tab {
  flex: 1;
  padding: 8px 0;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted, #B5B3AC);
  border: none;
  background: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.disc-tab.active {
  background: #1A1A1A;
  color: #F4F3EE;
}

/* ── Scrollable content area ─────────────── */

.disc-content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  min-height: 200px;
  max-height: 55vh;
}

/* ── Search input ────────────────────────── */

.disc-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg, #F4F3EE);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 12px;
}

.disc-search-input {
  flex: 1;
  border: none;
  background: none;
  outline: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--text, #1A1A1A);
}

.disc-search-input::placeholder {
  color: var(--muted, #B5B3AC);
}

/* ── Category grid ───────────────────────── */

.disc-cat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

.disc-cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  background: var(--bg, #F4F3EE);
  border: 1px solid var(--border, #E0DFD9);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.disc-cat-card:active {
  transform: scale(0.96);
  background: #E8E7E2;
}

.disc-cat-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: color-mix(in srgb, var(--cat-color, #4A8C8A) 10%, transparent);
}

.disc-cat-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 500;
  color: var(--text, #1A1A1A);
}

/* ── Results list ────────────────────────── */

.disc-results {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.disc-result {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px;
  border-radius: 12px;
  transition: background 0.15s;
}

.disc-result:active {
  background: var(--bg, #F4F3EE);
}

.disc-result--added {
  opacity: 0.5;
}

.disc-result-icon {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.disc-result-info {
  flex: 1;
  min-width: 0;
}

.disc-result-name {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--text, #1A1A1A);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.disc-result-meta {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  color: var(--muted, #B5B3AC);
  line-height: 1.4;
}

.disc-result-add {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 50%;
  border: none;
  background: #4A8C8A;
  color: #FFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s, opacity 0.15s;
}

.disc-result-add:active {
  transform: scale(0.9);
}

.disc-result-add:disabled {
  opacity: 0.5;
  cursor: default;
}

.disc-result-added-badge {
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  font-weight: 600;
  color: #4A8C8A;
  background: rgba(74, 140, 138, 0.1);
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

.disc-result-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #FFF;
  border-radius: 50%;
  animation: discSpin 0.6s linear infinite;
}

@keyframes discSpin {
  to { transform: rotate(360deg); }
}

/* ── Empty/loading states ────────────────── */

.disc-empty-hint,
.disc-loading {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: var(--muted, #B5B3AC);
  text-align: center;
  padding: 32px 16px;
}

/* ── AI Suggest header ───────────────────── */

.disc-suggest-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  color: var(--muted, #B5B3AC);
  padding: 6px 0 10px;
}

.disc-suggest-sparkle {
  font-size: 14px;
  color: #4A8C8A;
}


/* ═══════════════════════════════════════════
   DAY BUILDER — Empty state, Add button, Toolbar
   ═══════════════════════════════════════════ */

/* ── Empty state ─────────────────────────── */

.idb-empty {
  text-align: center;
  padding: 48px 24px 32px;
}

.idb-empty-icon {
  margin-bottom: 16px;
}

.idb-empty-title {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--text, #1A1A1A);
  margin-bottom: 8px;
}

.idb-empty-text {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: var(--muted, #B5B3AC);
  line-height: 1.5;
  margin-bottom: 20px;
}

.idb-empty-cats {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.idb-cat-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
  background: var(--bg, #F4F3EE);
  border: 1px solid var(--border, #E0DFD9);
  border-radius: 20px;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: var(--text, #1A1A1A);
  cursor: pointer;
  transition: all 0.2s;
}

.idb-cat-chip:active {
  transform: scale(0.95);
  background: #E8E7E2;
}

/* ── Add a stop button ───────────────────── */

#ideAddStopArea {
  padding: 8px 0 4px;
}

.idb-add-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  background: var(--bg, #F4F3EE);
  border: 2px dashed var(--border, #D0CEC6);
  border-radius: 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #4A8C8A;
  cursor: pointer;
  transition: all 0.2s;
}

.idb-add-btn:active {
  transform: scale(0.98);
  background: #E8E7E2;
}

/* ── Builder toolbar ─────────────────────── */

#ideBuilderToolbar {
  padding: 4px 0 16px;
}

.idb-toolbar {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.idb-suggest-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 16px;
  background: none;
  border: 1px solid var(--border, #E0DFD9);
  border-radius: 20px;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted, #B5B3AC);
  cursor: pointer;
  transition: all 0.2s;
}

.idb-suggest-btn:active {
  background: var(--bg, #F4F3EE);
  color: #4A8C8A;
}

.idb-suggest-icon {
  font-size: 13px;
  color: #4A8C8A;
}

/* ── Settings chip in summary ────────────── */

.ide-chip--settings {
  cursor: pointer;
  border: none;
  padding: 4px 8px;
  background: none;
  opacity: 0.5;
  transition: opacity 0.2s;
}

.ide-chip--settings:active {
  opacity: 1;
}

/* ── Remove button in expanded card ──────── */

.ic-ex-btn--remove {
  opacity: 0.6;
}

.ic-ex-btn--remove:active {
  opacity: 1;
  color: #D45050;
}

/* ── Contact info in expanded card ───────── */

.ic-ex-contact {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  padding: 2px 0;
}
