/* Jamming.Live Discover: the public discovery / directory page. Builds on the jl-auth.css tokens and jl-fan.css heart. */
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.dc-main {
  flex: 1;
  padding: clamp(20px, 4vw, 48px) clamp(16px, 4vw, 56px) 56px;
  background:
    radial-gradient(900px 380px at 10% -10%, rgba(208, 22, 28, 0.22), transparent 70%),
    var(--bg);
}
.dc-wrap { width: 100%; max-width: 1240px; margin: 0 auto; }
.dc-head h1 { margin-bottom: 6px; }
.dc-head .lede { margin-bottom: 22px; }

/* Search row */
.dc-searchrow { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(220px, 0.9fr) auto; gap: 10px; align-items: start; }
.dc-field { min-width: 0; }
.dc-field label { font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 4px; }
.dc-location { position: relative; }
.dc-clear-location { display: inline-block; margin-top: 4px; font-size: 0.85rem; }
.dc-searchrow input[type="search"], .dc-searchrow input[type="text"] { min-height: 48px; }
input[type="search"] { background: var(--panel-2); color: var(--ink); border: 1px solid #3a3a45; border-radius: 8px; padding: 11px 14px; font: inherit; width: 100%; }
input[type="date"] { width: 100%; min-height: 44px; background: var(--panel-2); color: var(--ink); border: 1px solid #3a3a45; border-radius: 8px; padding: 9px 12px; font: inherit; color-scheme: dark; }
.dc-search-button { min-height: 48px; padding: 0 28px; }
.dc-error { margin: 8px 0 0; padding: 8px 12px; color: #ffb3b3; background: rgba(255, 42, 42, 0.1); border: 1px solid rgba(255, 42, 42, 0.5); border-radius: 8px; font-size: 0.92rem; }
input[aria-invalid="true"] { border-color: var(--accent-bright); }

/* Filters: inline bar on wide screens, a sheet on narrow ones (see jl-discover.js). */
.dc-filter-bar { margin-top: 14px; }
.dc-filters-open { display: none; }
.dc-panel { background: rgba(13, 13, 17, 0.92); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.dc-panel-title { display: none; font-size: 1.15rem; margin: 0 0 12px; }
.dc-panel-fields { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; }
.dc-panel-fields .dc-field { flex: 0 1 200px; min-width: 150px; }
.dc-panel-fields select { min-height: 44px; }
.dc-custom-dates { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; flex: 1 1 100%; }
.dc-custom-dates .dc-field { flex: 0 1 180px; }
.dc-custom-dates .dc-error { flex: 1 1 100%; margin: 0; }
.dc-panel-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 12px; }
.dc-panel-actions [data-dc-cancel] { display: none; }
.js .dc-panel-actions .dc-apply { display: none; }
.js .dc-panel-actions a.btn { display: none; }

/* Tabs (links with aria-current) */
.dc-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 22px 0 14px; overflow-x: auto; }
.dc-tabs a { padding: 12px 18px; color: var(--ink-soft); text-decoration: none; white-space: nowrap; border-bottom: 3px solid transparent; font-weight: 600; }
.dc-tabs a:hover { color: #fff; }
.dc-tabs a[aria-current="page"] { color: #fff; border-bottom-color: var(--accent); }

/* Chips */
.dc-chiprow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 16px; }
.dc-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.dc-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 4px 12px; border: 1px solid #3a3f47; border-radius: 18px; background: var(--panel-2); color: var(--ink); text-decoration: none; font-size: 0.88rem; }
.dc-chip:hover { border-color: #fff; color: #fff; }
.dc-clear-all { font-size: 0.9rem; }

/* Sections and grid */
.dc-results:focus { outline: none; }
.dc-results[aria-busy="true"] { opacity: 0.85; }
.dc-section { margin-top: 28px; }
.dc-section:first-child { margin-top: 0; }
.dc-section-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-bottom: 12px; }
.dc-section-head h2 { margin: 0; font-size: 1.4rem; }
.dc-count { color: var(--ink-soft); font-size: 0.95rem; }
.dc-viewall { margin-left: auto; font-size: 0.92rem; }
.dc-empty { margin: 0; padding: 18px; border: 1px dashed #454a52; border-radius: 10px; color: var(--ink-soft); background: rgba(13, 13, 17, 0.7); }
.dc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }

/* Cards: the title link (or the View Event cue) stretches over the whole card; the heart is a sibling above it. */
.dc-card { position: relative; display: flex; flex-direction: column; min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; transition: border-color 0.15s, transform 0.15s; }
.dc-card:hover { border-color: #565b64; transform: translateY(-2px); }
.dc-card:focus-within { border-color: var(--focus); }
.dc-media { position: relative; aspect-ratio: 16 / 9; background: #1b1d22; }
.dc-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.dc-fallback { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, #1a1a22, #26262f 55%, #1a1a22); }
.dc-heart { position: absolute; top: 8px; right: 8px; z-index: 3; }
.dc-heart .fan-heart { background: rgba(5, 5, 7, 0.72); border: 1px solid #5a2429; }
.dc-body { display: flex; flex-direction: column; gap: 3px; padding: 13px 14px 15px; min-width: 0; flex: 1; }
.dc-kicker { margin: 0; font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: #f0b4b4; overflow-wrap: anywhere; }
.dc-title { margin: 2px 0 0; font-size: 1.1rem; line-height: 1.25; font-weight: 800; color: var(--ink); overflow-wrap: anywhere; }
.dc-title .dc-link { color: inherit; text-decoration: none; }
.dc-meta { margin: 0; font-size: 0.92rem; color: var(--ink-soft); overflow-wrap: anywhere; }
.dc-rating { margin: 2px 0 0; font-size: 0.92rem; color: var(--ink); }
.dc-rating.is-none { color: var(--ink-soft); }
.dc-rating-star { color: #f5c04a; }
.dc-next { margin: 8px 0 0; padding-top: 8px; border-top: 1px solid var(--line); font-size: 0.86rem; color: #d7dae0; overflow-wrap: anywhere; }
.dc-next-label { color: var(--ink-faint); }
.dc-link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.dc-link:focus-visible { outline: none; }
.dc-card:has(.dc-link:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.dc-cue { color: #fff; font-weight: 700; text-decoration: none; }
.dc-cue:hover { text-decoration: underline; }

.dc-more { display: flex; justify-content: center; margin: 24px 0 0; }

/* Overall no-results */
.dc-noresults { max-width: 680px; margin: 40px auto; padding: 32px; text-align: center; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.dc-noresults h2 { margin: 0 0 10px; }
.dc-noresults p { margin: 0 0 8px; }
.dc-noresults .btn { margin-top: 14px; }

/* Loading skeleton: only the results region is replaced; the shell and controls stay usable. */
.dc-skel { height: 270px; border-radius: 12px; background: linear-gradient(90deg, #15151b 25%, #1e1e26 37%, #15151b 63%); background-size: 400% 100%; animation: dc-shimmer 1.4s ease infinite; }
@keyframes dc-shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
@media (prefers-reduced-motion: reduce) { .dc-skel { animation: none; } .dc-card { transition: none; } .dc-card:hover { transform: none; } }

.dc-search-button[aria-disabled="true"] { opacity: 0.6; cursor: progress; }

/* Tablet */
@media (max-width: 980px) {
  .dc-searchrow { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .dc-search-button { grid-column: 1 / -1; }
}

/* Phone: one column, and the filters become a sheet when the script is running (without the script they stay inline). */
@media (max-width: 760px) {
  .dc-searchrow { grid-template-columns: minmax(0, 1fr); }
  .dc-grid { grid-template-columns: minmax(0, 1fr); }
  .js .dc-filters-open { display: inline-flex; }
  .js .dc-panel { display: none; }
  .js .dc-panel.is-open { display: block; position: fixed; inset: 0; z-index: 60; overflow-y: auto; border-radius: 0; border: 0; padding: 18px 16px 24px; background: #0a0a0e; }
  .js .dc-panel.is-open .dc-panel-title { display: block; }
  .js .dc-panel.is-open .dc-panel-fields .dc-field { flex: 1 1 100%; }
  .js .dc-panel.is-open .dc-panel-actions { position: sticky; bottom: 0; padding: 12px 0 0; background: #0a0a0e; }
  .js .dc-panel.is-open .dc-panel-actions .dc-apply, .js .dc-panel.is-open .dc-panel-actions a.btn, .js .dc-panel.is-open .dc-panel-actions [data-dc-cancel] { display: inline-flex; }
  .dc-section-head .dc-viewall { margin-left: 0; flex: 1 1 100%; }
}
body.dc-sheet-open { overflow: hidden; }

/* Desktop with the script: dropdowns apply at once, so Apply Filters is only offered for a Custom date range. */
.js .dc-panel[data-custom-open] .dc-apply { display: inline-flex; }

/* Distance sits with the Location, on every tab. */
.dc-radius { margin-top: 10px; max-width: 220px; }
.dc-radius select { min-height: 44px; }

/* Buttons used on this page (the shared .btn comes from jl-auth.css). */
.btn-auto { width: auto; }
.btn-red { background: linear-gradient(180deg, var(--accent-bright), var(--accent)); color: #fff; border-color: var(--accent); }
.btn-red:hover { filter: brightness(1.1); color: #fff; }

/* The Custom date fields are always shown without the script; with it they follow the Date select. */
.js [data-dc-custom][data-collapsed] { display: none; }
