/* Events directory, redesigned interface. Pairs with events-directory.js; tokens come from the theme's app.css. */
.edx{--blue:#2f74d6; --blue-deep:#2563eb; --soft:rgba(47,116,214,.08); --land:#dcdfe5; --mapbg:#f5f5f7; --amber:#c47a00;
  display:grid; gap:0; margin:0 0 40px; font-feature-settings:normal; line-height:normal; color:var(--ink)}
@media (prefers-color-scheme:dark){.edx,.edx-dlg{--blue:#5b9bff; --blue-deep:#7fb1ff; --soft:rgba(91,155,255,.12); --land:#2a2f39; --mapbg:#16181d; --amber:#ffb547}}
#dcd-event-directory-ui.edx-on > :not(.edx){display:none !important}
.edx *{box-sizing:border-box}
.edx > *{min-width:0}
.edx a{color:var(--blue); text-decoration:none; font-weight:600}
.edx a:hover{color:var(--blue-deep)}
.edx h2,.edx h3,.edx p{margin:0}
.edx-card{background:var(--surface); border:1px solid var(--line); border-radius:12px}
.edx-kick{font-size:12px; letter-spacing:.08em; text-transform:uppercase; font-weight:600; color:var(--ink2)}
.edx-amber{color:var(--amber) !important}
.edx-meta{color:var(--ink2); font-size:14px; font-weight:400}
.edx-push{margin-left:auto}
.edx-link{all:unset; cursor:pointer; color:var(--blue); font-weight:600}
.edx-link:hover{color:var(--blue-deep)}
.edx-btn{display:inline-flex; align-items:center; justify-content:center; min-height:44px; padding:0 18px; border-radius:8px; background:#2f74d6; color:#fff !important; font-weight:600; font-size:15px; justify-self:start}
.edx-btn:hover{background:#2563eb}
.edx button:focus-visible,.edx a:focus-visible,.edx input:focus-visible,.edx-dlg button:focus-visible{outline:2px solid var(--blue); outline-offset:2px}

/* hero */
.edx-hero{display:flex; flex-wrap:wrap; gap:16px 40px; align-items:flex-end; justify-content:space-between; margin-bottom:24px}
.edx-stats{display:flex; flex-wrap:wrap; gap:8px 28px; color:var(--ink2); font-size:16px}
.edx-stats strong{font-size:24px; color:var(--ink); margin-right:2px}
.edx-next{all:unset; cursor:pointer; box-sizing:border-box; flex:0 1 340px; display:grid; gap:6px; padding:18px 20px; border:1px solid rgba(245,156,26,.5); border-radius:12px; background:var(--surface)}
.edx-next:hover{border-color:#F59C1A}
.edx-next strong{font-size:18px; line-height:1.25}
.edx-next span:last-child{color:var(--ink2); font-size:14px}

/* filters */
.edx-filters{padding:18px; display:grid; gap:14px}
.edx-qwrap{position:relative}
.edx-qwrap svg{position:absolute; left:15px; top:15px; color:var(--ink2)}
.edx-q{width:100%; min-height:48px; padding:0 16px 0 44px; border:1px solid var(--line); border-radius:10px; background:var(--surface2); color:var(--ink); font:inherit; font-size:16px}
.edx-q:focus{outline:2px solid var(--blue); outline-offset:0; background:var(--surface)}
.edx-reading{font-size:14px; color:var(--ink2)}
.edx-fwrap{display:grid; gap:12px}
.edx-filters > *,.edx-fwrap > *{min-width:0}
.edx-frow{display:flex; flex-wrap:wrap; align-items:center; gap:8px}
.edx-frow > .edx-kick{margin-right:4px}
.edx-chip{all:unset; cursor:pointer; box-sizing:border-box; display:inline-flex; align-items:center; gap:6px; min-height:34px; padding:0 13px; border:1px solid var(--line); border-radius:999px; font-size:14px; font-weight:500; color:var(--ink); background:var(--surface); white-space:nowrap}
.edx-chip:hover{border-color:var(--blue)}
.edx-chip.on{background:var(--ink); border-color:var(--ink); color:var(--bg)}
.edx-chip[disabled]{opacity:.35; cursor:default}
.edx-n{opacity:.6}
.edx-sep{width:1px; height:24px; background:var(--line); margin:0 6px}
.edx-seg{display:inline-flex; padding:3px; border-radius:10px; background:var(--surface2); border:1px solid var(--line); max-width:100%; overflow-x:auto}
.edx-seg button{all:unset; cursor:pointer; padding:7px 14px; border-radius:7px; font-size:14px; font-weight:600; color:var(--ink2); white-space:nowrap}
.edx-seg button.on{background:var(--surface); color:var(--ink); box-shadow:0 1px 3px rgba(15,17,21,.12)}
.edx-range{display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-left:8px}
.edx-range label{display:flex; align-items:center; gap:6px; font-size:14px; color:var(--ink2)}
.edx-date{min-height:38px; padding:0 10px; border:1px solid var(--line); border-radius:8px; background:var(--surface2); color:var(--ink); font:inherit; font-size:14px; color-scheme:light dark}

/* results head */
.edx-head{display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px; margin:28px 0 14px}
.edx-head-l{display:flex; flex-wrap:wrap; align-items:center; gap:8px 14px}
.edx-head h2{font-size:22px; font-weight:700}

/* list view */
.edx-split{display:flex; flex-wrap:wrap; gap:24px; align-items:flex-start}
.edx-main{flex:999 1 560px; min-width:0; display:grid; gap:22px}
.edx-side{flex:1 1 340px; min-width:0; display:grid; gap:14px; position:sticky; top:calc(var(--dcd-mast,118px) + 20px)}
.edx-month{display:grid; gap:6px}
.edx-month > .edx-kick{margin-left:16px; font-size:13px}
.edx-rows{padding:6px}
.edx-row{all:unset; cursor:pointer; box-sizing:border-box; width:100%; display:grid; grid-template-columns:64px minmax(0,1fr) auto; gap:16px; align-items:start; padding:14px; border-radius:10px}
.edx-row:hover{background:var(--surface2)}
.edx-item.open .edx-row{background:var(--soft)}
.edx-date-tile{display:grid; justify-items:center; padding:8px 0 9px; border:1px solid var(--line); border-radius:10px; background:var(--surface); line-height:1; opacity:.65}
.edx-date-tile.up{border-color:rgba(245,156,26,.55); opacity:1}
.edx-date-tile b{font-size:22px}
.edx-date-tile i{font-style:normal; font-size:11px; font-weight:600; letter-spacing:.06em; text-transform:uppercase; color:var(--ink2); margin-top:4px}
.edx-row-m{display:grid; gap:5px; min-width:0}
.edx-name{font-size:17px; font-weight:600; line-height:1.3}
.edx-badges{display:flex; flex-wrap:wrap; gap:6px; margin-top:2px}
.edx-badge{display:inline-flex; align-items:center; font-size:12px; font-weight:600; padding:3px 8px; border-radius:999px; border:1px solid var(--line); color:var(--ink2); white-space:nowrap}
.edx-badge.expo{color:var(--amber); border-color:rgba(245,156,26,.45); background:rgba(245,156,26,.08)}
.edx-status{color:var(--ink2); font-size:13px; font-weight:600; white-space:nowrap; padding-top:3px}
.edx-detail{margin:0 14px 14px 94px; display:grid; gap:10px; font-size:14px}
.edx-detail p{line-height:1.55; max-width:72ch}
.edx-facts{display:flex; flex-wrap:wrap; gap:4px 18px; color:var(--ink2)}
.edx-links{display:flex; flex-wrap:wrap; align-items:center; gap:8px 18px; font-size:14px}
.edx-more{padding:4px 16px; justify-self:start}
.edx-empty{padding:28px; text-align:center; color:var(--ink2)}
.edx-cta{padding:18px; display:grid; gap:10px}
.edx-cta span{color:var(--ink2); font-size:14px; line-height:1.5}
.edx-fine{color:var(--ink2); font-size:13px; line-height:1.5}

/* map */
.edx-mapcard{overflow:hidden}
.edx-map{position:relative; aspect-ratio:1000/364; background:var(--mapbg)}
.edx-map svg{position:absolute; inset:0; width:100%; height:100%; fill:var(--land)}
.edx-pin{all:unset; cursor:pointer; position:absolute; transform:translate(-50%,-50%); border-radius:50%; border:2px solid var(--mapbg); box-sizing:border-box; display:grid; place-items:center; background:#3d83e4; color:#10131a; font:700 10px/1 var(--font,sans-serif)}
.edx-pin.up{background:#F59C1A}
.edx-pin:hover{box-shadow:0 0 0 3px rgba(31,36,48,.25)}
.edx-pin.sel{box-shadow:0 0 0 4px rgba(47,116,214,.4); z-index:2}
.edx-legend{padding:12px 16px; display:flex; flex-wrap:wrap; gap:6px 16px; align-items:center; font-size:13px; color:var(--ink2); border-top:1px solid var(--line)}
.edx-legend span{display:inline-flex; align-items:center; gap:6px}
.edx-legend i{width:10px; height:10px; border-radius:50%; background:#3d83e4}
.edx-legend i.up{background:#F59C1A}
.edx-top{margin-top:16px}
.edx-cityrows{margin-top:16px}
.edx-cityrow{display:flex; flex-wrap:wrap; align-items:center; gap:6px 16px; padding:12px 14px}
.edx-cityrow > span:first-child{flex:1 1 320px; display:grid; gap:3px}

/* boxes */
.edx-boxes{display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:16px}
.edx-box{display:grid; grid-template-rows:auto auto 1fr auto; gap:10px; padding:18px}
.edx-box.past{opacity:.7}
.edx-box-top{display:flex; align-items:center; gap:12px}
.edx-box-top .edx-date-tile{min-width:58px}
.edx-box-top .edx-meta{font-size:13px; line-height:1.4}
.edx-box-top .edx-status{margin-left:auto; color:var(--amber)}
.edx-box h3{font-size:18px; line-height:1.3}
.edx-clamp{display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; font-size:14px; line-height:1.5; color:var(--ink2)}
.edx-box-foot{display:grid; gap:10px}
.edx-box-foot .edx-links{padding-top:10px; border-top:1px solid var(--line)}

/* table */
.edx-table-wrap{overflow-x:auto}
.edx-table{width:100%; min-width:860px; border-collapse:collapse; font-size:14px}
.edx-table th{background:var(--surface2); text-align:left; font-size:12px; font-weight:600; letter-spacing:.04em; text-transform:uppercase; color:var(--ink2); padding:12px 16px; position:static}
.edx-table th button{all:unset; cursor:pointer}
.edx-table th button:hover{color:var(--ink)}
.edx-table td{padding:12px 16px; border-top:1px solid var(--line); vertical-align:middle}
.edx-table td.num{text-align:right; font-variant-numeric:tabular-nums}
.edx-table tr.past td{color:var(--ink2)}
.edx-tname{all:unset; cursor:pointer; font-weight:600; color:var(--ink)}
.edx-tname:hover{color:var(--blue)}

/* calendar: the original panel, moved in; filtered bars are hidden by attribute */
.edx [data-event-anchor][hidden]{display:none !important}
.edx #calendar-view{display:block}
/* The original calendar only has light pastel bars; in dark mode derive a deep tint from each bar's own accent. */
@media (prefers-color-scheme:dark){
  #dcd-event-directory-ui [class*="calendar-color-"]{--calendar-bg:color-mix(in srgb, var(--calendar-border) 28%, #16181d); --calendar-text:color-mix(in srgb, var(--calendar-border) 30%, #ffffff)}
}
/* fallback calendar (only when the original panel is missing) */
.edx-cal{overflow:hidden}
.edx-cal-bar{display:flex; align-items:center; gap:10px; padding:14px 16px}
.edx-cal-bar strong{font-size:18px; min-width:150px; text-align:center}
.edx-grid{display:grid; grid-template-columns:repeat(7,minmax(0,1fr))}
.edx-dow{background:var(--surface2); font-size:12px; font-weight:600; color:var(--ink2); text-transform:uppercase; letter-spacing:.06em}
.edx-dow span{padding:8px}
.edx-day{min-height:108px; border-top:1px solid var(--line); border-left:1px solid var(--line); padding:6px; display:grid; align-content:start; gap:4px; min-width:0}
.edx-day:nth-child(7n+1){border-left:0}
.edx-day.out{background:var(--surface2)}
.edx-day.out .edx-dnum{opacity:.4}
.edx-dnum{justify-self:start; font-size:12px; font-weight:600; min-width:22px; height:22px; display:grid; place-items:center; border-radius:6px; padding:0 4px}
.edx-day.today .edx-dnum{background:var(--blue); color:#fff}
.edx-cev{all:unset; cursor:pointer; display:block; font-size:12px; font-weight:600; line-height:1.25; padding:3px 6px; border-radius:5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; background:rgba(245,156,26,.16); color:#8a5200}
.edx-cev.past{background:rgba(61,131,228,.12); color:#2a5ea8}
.edx-cev.sel{outline:2px solid var(--blue)}
@media (prefers-color-scheme:dark){.edx-cev{color:#ffc874}.edx-cev.past{color:#9cc2ff}}
.edx-calsel{margin-top:14px; padding:18px 20px; display:flex; flex-wrap:wrap; align-items:center; gap:10px 22px}
.edx-calsel > span:first-child{display:grid; gap:4px; flex:1 1 320px}

/* profile dialog */
.edx-dlg{--blue:#2f74d6; border:1px solid var(--line); border-radius:14px; padding:0; width:min(860px,calc(100% - 32px)); max-height:min(88vh,1000px); background:var(--surface); color:var(--ink); box-shadow:0 30px 80px rgba(0,0,0,.35)}
.edx-dlg::backdrop{background:rgba(8,10,14,.6); backdrop-filter:blur(3px)}
.edx-dlg-top{position:sticky; top:0; z-index:1; display:flex; align-items:center; gap:16px; padding:18px 22px; background:var(--surface); border-bottom:1px solid var(--line)}
.edx-dlg-top h2{margin:0; font-size:22px; line-height:1.25}
.edx-x{all:unset; cursor:pointer; margin-left:auto; flex:none; width:40px; height:40px; display:grid; place-items:center; border-radius:50%; background:var(--surface2); font-size:22px}
.edx-dlg-body{padding:18px 22px 26px; display:grid; gap:14px}
.edx-dlg-body a{color:var(--blue)}
.edx-dlg-body .edx-links a,.edx-dlg-body .edx-links .edx-link{font-weight:600; font-size:15px; text-decoration:none}
.edx-dlg .event-profile h4{font-size:15px; margin:18px 0 6px}
.edx-dlg .event-profile ul{padding-left:18px}

/* phone */
@media (max-width:640px){
  /* each chip group becomes one swipeable row instead of wrapping into a tall stack */
  .edx-filters{padding:14px; gap:12px}
  .edx-frow{flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none; margin:0 -14px; padding:0 14px 2px;
    -webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 28px),transparent); mask-image:linear-gradient(90deg,#000 calc(100% - 28px),transparent)}
  .edx-frow::-webkit-scrollbar{display:none}
  .edx-frow > *{flex:none}
  .edx-frow:first-child{flex-wrap:wrap; overflow:visible; -webkit-mask-image:none; mask-image:none; row-gap:10px}
  .edx-range{flex:1 1 100%; min-width:0; flex-wrap:wrap; margin-left:0}
  .edx-range label{flex:1 1 130px; min-width:0}
  .edx-range .edx-date{flex:1; min-width:0; width:100%}
  .edx-range .edx-chip{flex:none}
  .edx-seg{overflow:visible}
  .edx-side{position:static}
  .edx-row{grid-template-columns:52px minmax(0,1fr); gap:12px; padding:12px 10px}
  .edx-status{grid-column:2; padding-top:0}
  .edx-detail{margin:0 10px 12px 10px}
  .edx-range{margin-left:0}
  .edx-day{min-height:64px; padding:3px}
  .edx-cev{font-size:0; height:6px; padding:0}
  .edx-cal-bar strong{min-width:0; font-size:16px}
}
