/* The list of places: status line, cards, opened details, timetable, empty states. */

.list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  padding: 12px 24px 6px;
}
.status { flex: 1; min-width: 0; font-size: 13px; color: var(--muted); }

/* "♡ Saved" button */
.saved-btn {
  flex: none;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-left: 10px;
  padding: 5px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.saved-heart::before { content: "♡"; }
.saved-count { color: var(--muted); font-variant-numeric: tabular-nums; }
.saved-count:empty { display: none; }
.saved-btn[aria-pressed="true"] {
  color: var(--heart);
  border-color: var(--heart);
  background: color-mix(in srgb, var(--heart) 12%, var(--panel));
}
.saved-btn[aria-pressed="true"] .saved-heart::before { content: "❤️"; }
.app.saved-mode .filter-block:has(#radius) { opacity: .4; pointer-events: none; } /* distance doesn't apply to saved places */
.status b { color: var(--text); font-weight: 700; }
.status .note { color: var(--muted); }

.results {
  list-style: none;
  margin: 0;
  padding: 4px 14px 24px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

/* Cards */
.card {
  display: flex;
  gap: 14px;
  padding: 12px;
  margin-bottom: 4px;
  border-radius: var(--radius);
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: background .15s, border-color .15s;
}
.card:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.card.selected {
  background: color-mix(in srgb, var(--cat) 9%, var(--panel));
  border-color: color-mix(in srgb, var(--cat) 55%, transparent);
}
.card-icon {
  flex: none;
  width: 52px; height: 52px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--cat, var(--accent)) 16%, var(--panel));
  display: grid; place-items: center;
  font-size: 25px;
}
.card-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.card-top { display: flex; align-items: center; gap: 8px; }
.name {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  flex: 1; min-width: 0;
}
.subtitle {
  font-size: 13px;
  font-weight: 500;
  color: var(--cat);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.meta { display: flex; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.meta span:not(:last-child)::after { content: "·"; margin: 0 6px; opacity: .7; }

/* Open / closed badges */
.badge {
  flex: none;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.badge.open { color: var(--open); background: color-mix(in srgb, var(--open) 14%, transparent); }
.badge.closed { color: var(--closed); background: color-mix(in srgb, var(--closed) 14%, transparent); }
.badge.likely-open { color: var(--open); border: 1px dashed color-mix(in srgb, var(--open) 60%, transparent); padding: 2px 7px; }
.badge.likely-closed { color: var(--muted); border: 1px dashed var(--border); padding: 2px 7px; }

/* Details shown when a card is opened */
.details { display: none; margin-top: 6px; }
.card.selected .details { display: block; }
.card.selected .card-chips { display: none; } /* the full list is shown inside */
.details .chips { margin-top: 8px; }

.info { display: flex; flex-direction: column; gap: 6px; margin: 10px 0 4px; }
.info-row { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; line-height: 1.4; }
.info-icon { flex: none; width: 18px; text-align: center; }
.info-value { min-width: 0; overflow-wrap: anywhere; color: var(--text); }
.info-value a { color: var(--cat, var(--accent)); font-weight: 600; text-decoration: none; }
.info-value a:active { opacity: .7; }

/* Weekly timetable */
.week-wrap { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--border); }
.week { width: 100%; border-collapse: collapse; margin: 8px 0 2px; font-size: 12.5px; }
.week th { text-align: left; font-weight: 500; color: var(--muted); padding: 3px 10px 3px 0; white-space: nowrap; width: 1%; }
.week td { padding: 3px 0; font-variant-numeric: tabular-nums; }
.week tr.today th, .week tr.today td { color: var(--text); font-weight: 700; }
.hours-note { margin: 4px 0; font-size: 11.5px; line-height: 1.45; color: var(--muted); }
.hours-note a { color: var(--cat, var(--accent)); font-weight: 600; }

.actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.btn.fav[aria-pressed="true"] { border-color: var(--heart); color: var(--heart); }

/* Small round buttons on a card (📞 call, ♡ save) */
.icon-btn {
  flex: none;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 17px;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: transform .12s, background .15s;
}
.icon-btn:active { transform: scale(.88); background: var(--surface-2); }
.icon-btn.fav[aria-pressed="true"] { color: var(--heart); }

/* "Likely open" divider */
.divider {
  margin: 14px 10px 8px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.divider:first-child { margin-top: 4px; padding-top: 0; border-top: none; }

/* Loading placeholders */
.skeleton { pointer-events: none; }
.skeleton .card-icon, .skeleton .line {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
}
.skeleton .line { height: 11px; border-radius: 6px; margin: 4px 0; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Empty states */
.empty { text-align: center; padding: 48px 24px; color: var(--muted); }
.empty-icon { font-size: 40px; margin-bottom: 8px; }
.empty h3 { margin: 0 0 6px; color: var(--text); font-size: 16px; }
.empty p { margin: 0; font-size: 13.5px; line-height: 1.5; }
.wide-btn { margin-top: 16px; display: inline-block; }

@media (max-width: 760px) {
  .list-head { padding: 10px 16px 4px; }
  .results { overflow: visible; flex: none; padding: 4px 6px 24px; }
}
