/* PA-1405: Pelaa's Liity tapahtumiin tab (app/join_events.js), from the "Liity tapahtumiin" canvas. A desktop: the filter
   panel at the left, the list at the right. A phone (760 px and below): chips over the list, the panel as a sheet from the
   bottom. Nothing scrolls sideways at 360 px. */
.je { display: flex; gap: 24px; align-items: flex-start; }
.je-panel { flex: 0 0 300px; display: flex; flex-direction: column; gap: 18px; padding: 18px 18px 20px; background: var(--sp-card);
  border: 1px solid var(--sp-line); border-radius: 14px; }
.je-list { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.je-back, .je-shh, .je-show, .je-phone { display: none; }
.je-h { margin: 0; font: 800 21px/1 var(--sp-cond); font-stretch: condensed; text-transform: uppercase; }
.je-ey { font: 700 13px/1.2 var(--sp-cond); font-stretch: condensed; letter-spacing: .08em; text-transform: uppercase; color: var(--sp-y); }
.je-grp { display: flex; flex-direction: column; gap: 10px; }
.je-mu { color: var(--sp-mute); font-size: 13px; }
.je-mu a, .je-panel a.je-lk { color: #6cb8ff; text-decoration: underline; }
.je-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.je-chip { min-height: 38px; padding: 0 12px; border-radius: 999px; border: 1px solid #4a5160; background: #222733; color: var(--sp-text);
  font: inherit; font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; text-decoration: none; }
.je-chip svg { width: 16px; height: 16px; }
.je-chip.on { border-color: var(--sp-y); background: rgba(243, 228, 45, .14); color: #fff7a8; }
.je-chip.x { color: #8a909c; background: transparent; text-decoration: line-through; }
.je-stale { color: #ffc14d; font-size: 11px; font-weight: 700; }
.je-badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--sp-y); color: #15170a; font-size: 11px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center; }
.je-sel { min-height: 42px; padding: 0 10px; border-radius: 10px; border: 1px solid #4a5160; background: var(--sp-bg); color: var(--sp-text); font: inherit; width: 100%; }
.je-sw { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 6px 0; background: none; border: 0;
  border-top: 1px solid var(--sp-line); color: var(--sp-text); font: inherit; text-align: left; cursor: pointer; }
.je-sw:first-child { border-top: 0; }
.je-sw > span:first-child { flex: 1; }
.je-knob { flex: none; width: 38px; height: 22px; border-radius: 999px; background: #3a4150; position: relative; }
.je-knob i { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #a3a9b6; }
.je-sw.on .je-knob { background: var(--sp-y); }
.je-sw.on .je-knob i { left: 19px; background: #15170a; }
.je-cbs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.je-cb { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0; background: none; border: 0; color: var(--sp-text); font: inherit;
  text-align: left; cursor: pointer; }
.je-box { flex: none; width: 20px; height: 20px; border: 2px solid #5a6273; border-radius: 5px; display: grid; place-items: center; }
.je-box i { display: none; width: 10px; height: 5px; margin-top: -3px; border-left: 2px solid #15170a; border-bottom: 2px solid #15170a; transform: rotate(-45deg); }
.je-cb.on .je-box { background: var(--sp-y); border-color: var(--sp-y); }
.je-cb.on .je-box i { display: block; }
.je-reset, .je-reset2 { align-self: flex-start; background: none; border: 0; padding: 4px 0; color: #6cb8ff; font: inherit; font-size: 13px;
  text-decoration: underline; cursor: pointer; }
.je-sw:focus-visible, .je-cb:focus-visible, .je-chip:focus-visible, .je-cell:focus-visible { outline: 2px solid var(--sp-y); outline-offset: 2px; }

.je-sum { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; font-weight: 600; }
.je-upd { color: var(--sp-mute); font-size: 13px; font-weight: 400; }
.je-upd.old { color: #ffc14d; }
.je-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.je-cell { min-width: 0; padding: 8px 2px 6px; border-radius: 6px; border: 1px solid #5a6273; background: var(--sp-card); color: var(--sp-text);
  font: inherit; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 1px; }
.je-cell.on { border-color: var(--sp-y); box-shadow: inset 0 0 0 1px var(--sp-y); }
.je-cell[disabled] { opacity: .32; cursor: default; }
.je-wd { font: 700 13px/1.1 var(--sp-cond); text-transform: uppercase; letter-spacing: .06em; color: var(--sp-mute); }
.je-dm { font: 800 18px/1.1 var(--sp-cond); }
.je-n { font-size: 12px; color: var(--sp-mute); }
.je-bot { display: flex; flex-direction: column; align-items: center; gap: 3px; padding-top: 4px; }
.je-ics { display: flex; gap: 2px; }
.je-ic { display: inline-flex; color: var(--sp-text); }
.je-ic svg { width: 24px; height: 24px; }
.je-ic.je-rest { color: #ff9a6e; }
.je-tg { font-size: 11px; font-weight: 700; line-height: 1.25; text-align: center; padding: 2px 6px; border-radius: 6px; background: rgba(243, 228, 45, .16); color: var(--sp-y); white-space: nowrap; }

.je-day { display: flex; flex-direction: column; gap: 8px; }
.je-dh { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.je-tagF, .je-tagB { font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; }
.je-tagF { background: rgba(243, 228, 45, .16); color: var(--sp-y); }
.je-tagB { background: rgba(235, 104, 52, .2); color: #ff9a6e; }
.je-card { background: var(--sp-card); border: 1px solid var(--sp-line); border-radius: 14px; overflow: hidden; }
.je-ev { display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--sp-line); }
.je-ev:first-child { border-top: 0; }
.je-ev.off { opacity: .45; }
.je-tm { font: 800 19px/1 var(--sp-cond); font-variant-numeric: tabular-nums; }
.je-what { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.je-t { font: 700 17px/1.15 var(--sp-cond); overflow-wrap: anywhere; }
.je-hot { display: inline-flex; align-items: center; gap: 3px; margin-left: 8px; padding: 1px 7px 1px 5px; border-radius: 999px;
  background: rgba(235, 104, 52, .2); color: #ff9a6e; font: 700 11px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif; vertical-align: 2px; white-space: nowrap; }
.je-hot svg { width: 11px; height: 11px; }
.je-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; color: var(--sp-mute); }
.je-pill { font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 999px; border: 1px solid #4a5160; color: #d6dae2; white-space: nowrap; }
.je-note { font-size: 12px; color: var(--sp-mute); }
.je-side { display: flex; align-items: center; gap: 14px; }
.je-spots { width: 150px; display: flex; flex-direction: column; gap: 4px; font-variant-numeric: tabular-nums; }
.je-nn { font-weight: 700; font-size: 14px; }
.je-nn.ok { color: #5fd38a; } .je-nn.warn { color: #ffc14d; } .je-nn.full { color: #ff8a80; }
.je-of { color: var(--sp-mute); font-weight: 400; }
.je-bar { height: 5px; border-radius: 3px; background: var(--sp-line); overflow: hidden; }
.je-bar i { display: block; height: 100%; background: #a3a9b6; }
.je-lw { font-size: 12px; color: var(--sp-mute); }
.je-pr { min-width: 64px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.je-pr small { display: block; font-weight: 400; font-size: 12px; color: var(--sp-mute); }
.je-join { min-height: 40px; min-width: 76px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px;
  background: var(--sp-y); color: #15170a; font: 800 16px/1 var(--sp-cond); text-transform: uppercase; letter-spacing: .03em; text-decoration: none; }
.je-join:hover { background: #fff066; }
.je-empty { padding: 22px 20px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }

@media (max-width: 1000px) {
  .je-ev { grid-template-columns: 54px minmax(0, 1fr); row-gap: 8px; }
  .je-side { grid-column: 2; }
  .je-spots { flex: 1; width: auto; min-width: 0; flex-flow: row wrap; align-items: baseline; gap: 4px 10px; }
  /* The count and last week's count stay whole: side by side when they fit, else one under the other; the bar goes last. */
  .je-nn, .je-lw, .je-pr small { white-space: nowrap; }
  .je-bar { order: 1; flex: 0 0 100%; }
}
@media (max-width: 760px) {
  .je { display: block; }
  .je-desk { display: none; }
  .je-phone { display: flex; }
  .je-quick { flex-wrap: wrap; gap: 6px; }
  .je-panel { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1002; max-height: 85vh; overflow-y: auto; scrollbar-gutter: stable;
    border-radius: 18px 18px 0 0; border-width: 1px 0 0; padding: 12px 16px calc(20px + env(safe-area-inset-bottom)); gap: 16px; }
  .je-open .je-panel { display: flex; }
  .je-open .je-back { display: block; position: fixed; inset: 0; z-index: 1001; background: rgba(5, 7, 10, .62); }
  .je-shh { display: flex; justify-content: space-between; align-items: center; }
  .je-x { width: 44px; height: 44px; border-radius: 10px; border: 1px solid #4a5160; background: #222733; color: var(--sp-text); font-size: 22px; cursor: pointer; }
  .je-show { display: block; min-height: 48px; border-radius: 12px; border: 0; background: var(--sp-y); color: #15170a;
    font: 800 18px/1 var(--sp-cond); text-transform: uppercase; letter-spacing: .03em; cursor: pointer; }
  .je-reset { align-self: center; }
  .je-sw { min-height: 48px; }
  .je-strip { gap: 4px; }
  .je-cell { padding: 7px 0 6px; }
  .je-wd { font-size: 12px; }
  .je-dm { font-size: 16px; }
  .je-ic svg { width: 22px; height: 22px; }
  .je-tg { font-size: 10px; padding: 1px 4px; }
  .je-ev { padding: 12px 14px; gap: 4px 12px; grid-template-columns: 50px minmax(0, 1fr); }
  .je-tm { grid-row: span 2; align-self: start; padding-top: 2px; font-size: 18px; }
  /* The spots go beside the price and Join when they fit on one line, else on a line of their own above them. */
  .je-side { gap: 8px 10px; margin-top: 4px; flex-wrap: wrap; }
  .je-spots { flex: 1 1 auto; }
  .je-pr { min-width: 0; font-size: 13px; margin-left: auto; }
}
