/* Plan card (components/_plan_card.html) — the brand's Open Circle card, used for every plan.
   Cover: the event photo, or dot art on a category ground. Body: kind, title, when, where,
   counts, money. People above the poster: counts sit in the body, never hidden. */
.plan-grid { display: grid; gap: var(--space-4); grid-template-columns: 1fr; }
@media (min-width: 576px) { .plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 992px) { .plan-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .plan-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.plan-card { position: relative; display: grid; grid-template-rows: auto 1fr; background: var(--surface);
  border: 1px solid var(--line); border-radius: 18px; overflow: hidden; color: var(--text);
  transition: transform var(--dur-base) var(--ease-standard), border-color var(--dur-base) var(--ease-standard); }
.plan-card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.plan-card .cv { position: relative; aspect-ratio: 16 / 9; overflow: hidden; display: grid; place-items: center;
  background: var(--tint); color: var(--cmu-ink); }
.plan-card .cv img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0;
  transition: opacity var(--dur-base) var(--ease-standard); }
.plan-card .cv img.is-loaded, .plan-card .cv noscript + img, .plan-card .cv img:not([data-lazy-src]):not(.lazy-img) { opacity: 1; }
.plan-card .cv .dots { width: 46%; max-width: 140px; }
.plan-card .cv .tags { position: absolute; top: 10px; left: 10px; right: 56px; z-index: 2; }
.plan-card .cv .tags .tag { background: var(--cmu-paper); color: var(--cmu-ink); }
.plan-card .cv .cover-icon { width: 40px; height: 40px; opacity: .55; }
.plan-card .bd { display: grid; align-content: start; gap: 4px; padding: 14px 16px 16px; }
.plan-card .kind { font-size: 12px; line-height: 16px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--text-muted); }
.plan-card h3 { font-size: 19px; line-height: 23px; margin: 2px 0 4px; }
.plan-card h3 a { color: inherit; text-decoration: none; }
.plan-card h3 a::after { content: ""; position: absolute; inset: 0; z-index: 1; }  /* whole card is the link */
.plan-card .when, .plan-card .where { font-size: 14px; line-height: 20px; color: var(--text-muted); }
.plan-card .foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.plan-card .price { font-family: var(--font-display); font-weight: 800; font-size: 16px; }
.plan-card .source { font-size: 12.5px; color: var(--text-muted); }
.maybe-btn { width: 44px; height: 44px; min-height: 44px; flex: none; border-radius: 50%; display: inline-grid; place-items: center;
  background: var(--surface); color: var(--text); border: 1.5px solid var(--line-strong); padding: 0; }
.maybe-btn:hover { background: var(--tint); color: var(--text); }
.maybe-btn[aria-pressed="true"] { background: var(--cmu-marigold); color: var(--cmu-ink); border-color: var(--cmu-marigold); }
.maybe-btn .icon { width: 18px; height: 18px; vertical-align: 0; }
.plan-card .maybe-btn { position: absolute; top: 8px; right: 8px; z-index: 3; width: 40px; height: 40px; min-height: 40px;
  background: var(--cmu-paper); color: var(--cmu-ink); border: 0; box-shadow: 0 2px 8px rgba(28, 24, 40, .14); }
.plan-card .maybe-btn[aria-pressed="true"] { background: var(--cmu-marigold); }
.plan-card.is-past { opacity: .7; }

/* Phones: grid cards turn into compact rows (cover on the left) so a list is quick to scan.
   Cards in a sideways rail keep the tall shape. */
@media (max-width: 575.98px) {
  .plan-grid .plan-card { grid-template-columns: 116px 1fr; grid-template-rows: none; border-radius: var(--radius-md); }
  .plan-grid .plan-card .cv { aspect-ratio: auto; height: 100%; min-height: 132px; }
  .plan-grid .plan-card .cv .dots { width: 74%; }
  .plan-grid .plan-card .cv .tags { display: none; }
  .plan-grid .plan-card .bd { padding: 12px 52px 12px 14px; gap: 2px; }
  .plan-grid .plan-card h3 { font-size: 16.5px; line-height: 20px; }
  .plan-grid .plan-card .where { display: none; }
  .plan-grid .plan-card .maybe-btn { top: 8px; right: 8px; left: auto; background: var(--tint); color: var(--text); box-shadow: none; }
  .plan-grid .plan-card .maybe-btn[aria-pressed="true"] { background: var(--cmu-marigold); color: var(--cmu-ink); }
}

/* Covers by category (Guidelines §3: lagoon for outdoors/wellness, petal for arts/play/nights). */
.cv-food-drink, .cv-community { background: var(--cmu-marigold-light) !important; }
.cv-arts-crafts, .cv-music-stage { background: var(--cmu-petal-light) !important; }
.cv-outdoors, .cv-wellness { background: var(--cmu-lagoon-light) !important; }
.cv-other { background: #E9E4F3 !important; }
[data-bs-theme="dark"] .cv-other { background: var(--tint) !important; color: var(--text); }

/* Compact row (Maybe list, sitemap, search results on small screens) */
.plan-row { position: relative; display: grid; grid-template-columns: 88px 1fr auto; gap: 12px; align-items: center;
  padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); }
.plan-row .cv { width: 88px; height: 88px; border-radius: 10px; overflow: hidden; display: grid; place-items: center; background: var(--tint); color: var(--cmu-ink); }
.plan-row .cv img { width: 100%; height: 100%; object-fit: cover; }
.plan-row .cv .dots { width: 70%; }
.plan-row h3 { font-size: 16px; line-height: 20px; margin: 0 0 2px; }
.plan-row h3 a { color: inherit; text-decoration: none; }
.plan-row h3 a::after { content: ""; position: absolute; inset: 0; }
.plan-row .when { font-size: 13.5px; color: var(--text-muted); }
.plan-row > .btn, .plan-row > form { position: relative; z-index: 2; }
.list-stack { display: grid; gap: 10px; }
