/* Events and jams: calendar list, event page, jam entries, index panel. Built on the Float tokens in float.css. */

/* date tile: a soft gradient card with month / day / weekday */
.ev-date { flex: none; display: grid; place-items: center; align-content: center; gap: 1px; width: 64px; height: 72px; border-radius: var(--r-md);
  color: #fff; text-align: center; box-shadow: var(--rim), var(--e-1);
  background: radial-gradient(120% 90% at 15% 10%, hsl(var(--h) 85% 62%), transparent 65%), hsl(calc(var(--h) + 25) 60% 38%); }
.ev-date span { font: 700 10px/1 var(--font-ui); letter-spacing: .1em; opacity: .9; }
.ev-date b { font: 800 1.65rem/1 var(--font-display); letter-spacing: var(--track-tight); }
.ev-date-lg { width: 88px; height: 98px; border-radius: var(--r-lg); }
.ev-date-lg b { font-size: 2.3rem; }
.ev-date-sm { width: 44px; height: 48px; border-radius: 10px; }
.ev-date-sm b { font-size: 1.1rem; }
.ev-date-sm span { font-size: 8px; }

/* chips */
.ev-kind-jam { background: color-mix(in oklab, #8b5cf6 16%, transparent); color: #7c3aed; }
.ev-ph { background: var(--surface-2); color: var(--text-muted); }
.ev-ph-live, .ev-ph-open { background: color-mix(in oklab, #22c55e 16%, transparent); color: #16a34a; }
.ev-ph-voting { background: color-mix(in oklab, #f59e0b 18%, transparent); color: #b45309; }
.ev-ph-results { background: color-mix(in oklab, #0ea5e9 16%, transparent); color: #0284c7; }
.ev-ph-cancelled { background: color-mix(in oklab, var(--neg) 14%, transparent); color: var(--neg); }
.ev-ph-live, .ev-ph-open { animation: ev-pulse 2.4s var(--ease-glide) infinite; }
@keyframes ev-pulse { 50% { box-shadow: 0 0 0 5px color-mix(in oklab, #22c55e 0%, transparent), 0 0 0 0 transparent; filter: brightness(1.08); } }
.ev-mine { font: 650 var(--fs-xs)/1 var(--font-ui); color: var(--accent); }
.ev-mine.maybe { color: var(--text-muted); }

/* list */
.ev-head { padding-bottom: var(--s-5); }
.ev-seg { flex-wrap: wrap; }
.ev-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-3); }
.ev-month { margin: var(--s-5) 0 var(--s-1); font: 650 var(--fs-xs)/1 var(--font-ui); letter-spacing: .09em; text-transform: uppercase; color: var(--text-faint); }
.ev-month:first-child { margin-top: 0; }
.ev-card { display: flex; gap: var(--s-4); align-items: center; padding: var(--s-4); color: inherit; text-decoration: none; }
.ev-card.ev-off { opacity: .6; }
.ev-card.ev-off h3 { text-decoration: line-through; text-decoration-thickness: 1.5px; }
.ev-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.ev-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ev-card h3 { margin: 2px 0 0; font: 700 var(--fs-lg, 1.15rem)/1.2 var(--font-display); letter-spacing: var(--track-tight); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.ev-when { font-size: var(--fs-sm); color: var(--text-muted); overflow-wrap: anywhere; }
.ev-foot { display: flex; align-items: center; gap: 8px; font-size: var(--fs-xs); color: var(--text-muted); }
.ev-by { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-nums { margin-left: auto; display: flex; gap: 12px; white-space: nowrap; }

/* event page hero */
.ev-hero { position: relative; overflow: hidden; margin: var(--s-5) 0 max(var(--gap-float, 10px), var(--s-4)); border-radius: var(--r-xl); color: #fff; }
.ev-hero-art { position: absolute; inset: 0;
  background: radial-gradient(90% 120% at 10% 0%, hsl(var(--h) 85% 60%), transparent 60%),
              radial-gradient(80% 100% at 100% 100%, hsl(calc(var(--h) + 70) 80% 55%), transparent 60%), hsl(calc(var(--h) + 30) 50% 22%); }
.ev-hero-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgb(8 10 20 / .45)); }
.ev-hero-in { position: relative; display: flex; gap: var(--s-5); align-items: flex-end; padding: var(--s-7) var(--s-6) var(--s-6); }
.ev-hero .ev-date { background: rgb(255 255 255 / .16); backdrop-filter: blur(10px); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .25); }
.ev-hero-main { min-width: 0; flex: 1; }
.ev-hero h1 { margin: 6px 0 0; font: 800 clamp(1.8rem, 4.5vw, 2.9rem)/1.05 var(--font-display); letter-spacing: var(--track-tight); text-shadow: 0 2px 20px rgb(0 0 0 / .25); }
.ev-hero .chip { background: rgb(255 255 255 / .9); backdrop-filter: blur(8px); }
.ev-hero-when { margin-top: 8px; font-size: var(--fs-md, 1.05rem); color: rgb(255 255 255 / .9); }
.ev-hero-when a { color: #fff; }
.ev-hero-by { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: var(--s-4); font-size: var(--fs-sm); color: rgb(255 255 255 / .86); }
.ev-hero-by .uname { text-shadow: 0 1px 8px rgb(0 0 0 / .35); }
.ev-edit { margin-left: auto; }
.ev-hero-rsvp { display: none; gap: 6px; }
.ev-hero-rsvp .btn:not(.primary) { background: rgb(255 255 255 / .9); color: #111; }
@media (max-width: 1079px) { .ev-hero-rsvp { display: flex; margin-left: auto; } .ev-hero-rsvp + .ev-edit { margin-left: 0; } }
.ev-count { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border-radius: var(--r-pill);
  font: 600 var(--fs-xs)/1 var(--font-ui); background: rgb(0 0 0 / .22); color: #fff; backdrop-filter: blur(8px); font-variant-numeric: tabular-nums; }
.ev-count b { font-weight: 750; }
@media (max-width: 640px) {
  .ev-hero-in { flex-direction: column; align-items: flex-start; padding: var(--s-6) var(--s-5) var(--s-5); }
  .ev-date-lg { width: 64px; height: 72px; } .ev-date-lg b { font-size: 1.65rem; }
  .ev-card { align-items: flex-start; } .ev-nums { display: none; }
}

/* side panels */
.ev-stats { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); margin-bottom: var(--s-4); }
.ev-rsvp { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ev-rsvp-b { width: 100%; transition: transform var(--t-med) var(--ease-spring), background-color var(--t-fast), color var(--t-fast); }
.ev-rsvp-b:active { transform: scale(.96); }
.ev-note { margin-top: 10px; }
.ev-when-big { font: 650 var(--fs-md, 1.05rem)/1.35 var(--font-display); margin-bottom: 4px; }
.ev-h3 { margin-top: var(--s-4) !important; }
.ev-where { font-size: var(--fs-sm); overflow-wrap: anywhere; }
.ev-cal { display: flex; flex-wrap: wrap; gap: 8px; margin-top: var(--s-4); }
.ev-faces { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ev-faces a { display: block; transition: transform var(--t-med) var(--ease-spring); }
.ev-faces a:hover { transform: translateY(-2px) scale(1.06); }
.ev-more { font: 650 var(--fs-xs)/1 var(--font-ui); color: var(--text-muted); padding-left: 4px; }
.ev-thread { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: var(--r-md); background: var(--surface-2); color: inherit; text-decoration: none; }

/* jam */
.ev-theme { display: flex; flex-direction: column; gap: 4px; padding: var(--s-4) var(--s-5); margin-bottom: var(--s-4); border-radius: var(--r-lg);
  background: linear-gradient(135deg, color-mix(in oklab, #8b5cf6 14%, transparent), color-mix(in oklab, var(--accent) 10%, transparent)); box-shadow: inset 0 0 0 1px var(--border); }
.ev-theme b { font: 800 clamp(1.3rem, 3.2vw, 1.9rem)/1.15 var(--font-display); letter-spacing: var(--track-tight); }
.ev-theme-hidden b { font-size: var(--fs-md, 1.05rem); color: var(--text-muted); }
.ev-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--s-3); counter-reset: st; }
.ev-steps li { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 10px 40px; border-radius: var(--r-md); background: var(--surface-2); font-size: var(--fs-sm); counter-increment: st; }
.ev-steps li::before { content: counter(st); position: absolute; left: 10px; top: 50%; translate: 0 -50%; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  font: 700 11px/1 var(--font-ui); background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); color: var(--text-muted); }
.ev-steps li.done::before { content: "✓"; background: var(--accent); color: var(--on-accent); box-shadow: none; }
.ev-steps li span { font-size: var(--fs-xs); color: var(--text-muted); }
.ev-entries { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: var(--gap-float); padding: var(--s-4); }
.ev-entry { display: flex; flex-direction: column; overflow: hidden; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--rim), var(--e-1); }
.ev-entry-art { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-2); }
.ev-entry-art img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-slow) var(--ease-liquid); }
@media (hover: hover) { .ev-entry:hover .ev-entry-art img { transform: scale(1.04); } }
.ev-blank { display: grid; place-items: center; color: rgb(255 255 255 / .9);
  background: radial-gradient(120% 90% at 15% 10%, hsl(var(--h) 85% 62%), transparent 60%), hsl(calc(var(--h) + 20) 55% 32%); }
.ev-blank span { font: 800 2rem/1 var(--font-display); }
.ev-entry-in { display: flex; flex-direction: column; gap: 6px; padding: var(--s-3) var(--s-4) var(--s-4); flex: 1; }
.ev-entry-top { display: flex; align-items: center; gap: 8px; }
.ev-entry h3 { margin: 0; font: 700 var(--fs-md, 1.05rem)/1.25 var(--font-display); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.ev-entry h3 a { color: inherit; text-decoration: none; }
.ev-entry p { margin: 0; color: var(--text-muted); font-size: var(--fs-sm); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ev-entry-foot { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 6px; font-size: var(--fs-xs); color: var(--text-muted); }
.ev-vote { margin-left: auto; }
.ev-vote .btn[aria-pressed="true"] { animation: ev-pop var(--t-med) var(--ease-spring); }
@keyframes ev-pop { 40% { transform: scale(1.12); } }
.ev-rank { font: 800 1.2rem/1 var(--font-display); }
.ev-votes { font: 700 var(--fs-xs)/1 var(--font-ui); color: #b45309; white-space: nowrap; }
.ev-withdraw { padding-top: 0; }

/* form */
.ev-kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: var(--s-4); }
.ev-kind-pick input { position: absolute; opacity: 0; pointer-events: none; }
.ev-kind-pick span { display: grid; place-items: center; height: 46px; border-radius: var(--r-md); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border);
  font-weight: 650; cursor: pointer; transition: background-color var(--t-fast), color var(--t-fast), box-shadow var(--t-med) var(--ease-liquid); }
.ev-kind-pick input:checked + span { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.ev-kind-pick input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.ev-form[data-kind="event"] .ev-jam-only { display: none; }
.ev-danger { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* forum index panel */
.ev-minis { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; }
.ev-mini { display: flex; align-items: center; gap: 12px; padding: 6px; border-radius: var(--r-md); color: inherit; text-decoration: none; min-width: 0; }
.ev-mini > :first-child { flex: none; }
.ev-mini:hover { background: var(--surface-2); }
.ev-mini-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 0; }
.ev-mini-main b { font-size: var(--fs-sm); line-height: 1.3; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.ev-more { margin-top: 8px; }

@media (prefers-reduced-motion: reduce) { .ev-ph-live, .ev-ph-open, .ev-vote .btn[aria-pressed="true"] { animation: none; } }

/* page head: the buttons and tabs sit on the title's centre line and the subtitle runs under the title;
   on phones the tools take their own row under the subtitle */
.ev-head { display: flex; flex-wrap: wrap; align-items: center; column-gap: var(--s-4); row-gap: 6px; }
.ev-head > div:first-child { display: contents; }
.ev-head h1 { flex: 1 1 auto; min-width: 0; margin: 0; }
.ev-head > div:first-child > :not(h1) { order: 2; flex-basis: 100%; min-width: 0; }
.ev-head > .greet-tools { order: 1; margin-left: auto; width: auto; min-width: 0; }
.ev-head > .greet-tools > * { max-width: 100%; }
@media (max-width: 600px) { .ev-head > .greet-tools { order: 3; flex-basis: 100%; margin-left: 0; margin-top: var(--s-2); } }