/* FDAS front-end events calendar (vanilla). Uses the --fo-* vars from ordering.css. */
#fdas-cal{max-width:980px;margin:0 auto;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;color:var(--fo-ink,#23303f)}
.cal-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 16px;flex-wrap:wrap}
.cal-title{font-size:22px;font-weight:800;color:var(--fo-navy,#1a2b49);margin:0}
.cal-nav{display:flex;gap:8px}
.cal-btn{background:#fff;border:1px solid var(--fo-line,#e3e7ec);color:var(--fo-navy,#1a2b49);border-radius:999px;padding:8px 15px;font-size:14px;font-weight:600;cursor:pointer;line-height:1;font-family:inherit}
.cal-btn:hover{background:var(--fo-bg,#f6f7f9)}

.cal-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:6px}
.cal-dow{text-align:center;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:var(--fo-muted,#6b7480);padding:6px 0}
.cal-cell{min-height:104px;background:#fff;border:1px solid var(--fo-line,#e3e7ec);border-radius:10px;padding:6px;display:flex;flex-direction:column;gap:4px;overflow:hidden}
.cal-cell.is-other{background:#f7f8fa}
.cal-cell.is-today{border-color:var(--fo-blue,#2c6ecb);box-shadow:inset 0 0 0 1px var(--fo-blue,#2c6ecb)}
.cal-cell.has-events{cursor:pointer}
.cal-daynum{font-size:13px;font-weight:700;color:var(--fo-navy,#1a2b49)}
.cal-cell.is-other .cal-daynum{color:#aab2bd}
.cal-dot{display:none;width:6px;height:6px;border-radius:50%;background:var(--fo-blue,#2c6ecb)}
.cal-ev{display:block;width:100%;text-align:left;border:none;background:var(--fo-navy,#1a2b49);color:#fff;border-radius:6px;padding:3px 7px;font-size:12px;font-weight:600;line-height:1.3;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-family:inherit}
.cal-ev:hover{background:var(--fo-blue,#2c6ecb)}
.cal-more{font-size:11px;font-weight:700;color:var(--fo-blue,#2c6ecb);cursor:pointer;padding:1px 4px}

/* Event-detail sheet: centred dialog on desktop, bottom iOS sheet on mobile.
   Animates via rAF (.show added after the element is laid out) so the slide
   actually plays - NOT a display:none toggle (which kills the transition). */
.evs[hidden]{display:none}
.evs{position:fixed;inset:0;z-index:2000}
.evs-bd{position:absolute;inset:0;background:rgba(15,22,38,.55);opacity:0;transition:opacity .28s ease}
.evs.show .evs-bd{opacity:1}
.evs-panel{position:absolute;top:50%;left:50%;transform:translate(-50%,-46%);opacity:0;
  width:560px;max-width:calc(100vw - 28px);max-height:calc(100vh - 56px);overflow:auto;
  background:#fff;border-radius:16px;box-shadow:0 24px 60px rgba(0,0,0,.3);
  transition:opacity .28s ease,transform .3s cubic-bezier(.2,.7,.2,1);will-change:transform}
.evs.show .evs-panel{transform:translate(-50%,-50%);opacity:1}
.evs-grab{display:none}
.evs-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 20px;border-bottom:1px solid var(--fo-line,#e3e7ec)}
.evs-head h3{margin:0;font-size:18px;font-weight:800;color:var(--fo-navy,#1a2b49);text-align:left;flex:1;min-width:0}
.evs-x{flex:0 0 auto;background:none;border:none;font-size:28px;line-height:1;color:var(--fo-muted,#6b7480);cursor:pointer;padding:0 4px}
.evs-x:hover{color:var(--fo-ink,#23303f)}
.evs-body{padding:16px 20px}
body.evs-lock{overflow:hidden}
@media(max-width:600px){
  .evs-panel{top:auto;bottom:0;left:0;transform:translateY(100%);width:100%;max-width:100%;border-radius:18px 18px 0 0;max-height:88vh}
  .evs.show .evs-panel{transform:translateY(0)}
  .evs-grab{display:block;width:42px;height:5px;border-radius:3px;background:#d7dce3;margin:8px auto 0}
}

/* Event-detail sheet body */
.ev-thumb{width:100%;max-height:220px;object-fit:cover;border-radius:10px;margin:0 0 14px;display:block}
.ev-meta{display:flex;flex-direction:column;gap:12px;margin:0 0 14px}
.ev-row{display:flex;gap:10px;align-items:flex-start}
.ev-ico{flex:0 0 auto;width:18px;height:18px;color:var(--fo-blue,#2c6ecb);margin-top:1px}
.ev-row > div{min-width:0}
.ev-row b{display:block;font-size:11px;text-transform:uppercase;letter-spacing:.04em;color:var(--fo-muted,#6b7480);font-weight:700;margin-bottom:1px}
.ev-desc{line-height:1.55;white-space:pre-wrap;word-break:break-word;color:var(--fo-ink,#23303f)}
.ev-daylist{display:flex;flex-direction:column;gap:8px}
.ev-daylist button{display:flex;justify-content:space-between;gap:10px;align-items:center;text-align:left;background:var(--fo-bg,#f6f7f9);border:1px solid var(--fo-line,#e3e7ec);border-radius:10px;padding:11px 13px;cursor:pointer;font:inherit}
.ev-daylist button:hover{border-color:var(--fo-blue,#2c6ecb)}
.ev-daylist .t{font-weight:700;color:var(--fo-navy,#1a2b49)}
.ev-daylist .m{font-size:12px;color:var(--fo-muted,#6b7480);white-space:nowrap}

@media(max-width:680px){
  .cal-grid{gap:4px}
  .cal-cell{min-height:58px;padding:4px;gap:3px}
  .cal-ev,.cal-more{display:none}                 /* hide chips; show a dot, tap the day */
  .cal-cell.has-events .cal-dot{display:block}
}
