/* Galilean Baptist Church — "Coming up": the church's events as cards, side
 * by side, scrolled left and right (assets/home-events.js), and the "Add to
 * calendar" choices (assets/add-to-calendar.js).
 *
 * The same cards on the home page (in the hero), in the phone app's home
 * screen and on the members' Dashboard. Colours are the palette's tokens
 * (classical.css), so the light and dark appearances look after themselves.
 */

.upcoming[hidden],.upcoming [hidden],.upcoming .up-over{display:none}
.upcoming{position:relative;width:100%}

/* The padding is room for the cards' shadow, which the scroller would clip;
   the negative margin gives it back to the layout. */
.up-strip{position:relative;display:flex;gap:16px;overflow-x:auto;overscroll-behavior-x:contain;
  scroll-snap-type:x mandatory;scrollbar-width:none;padding:4px 4px 30px;margin:-4px -4px -30px;outline:none;
  --fl:0px;--fr:0px}
.up-strip::-webkit-scrollbar{display:none}
.up-strip:focus-visible{outline:2px solid var(--clay);outline-offset:2px;border-radius:20px}
/* Where there is more to scroll to, the edge fades out rather than cutting
   the next card off with a hard line. */
.up-strip.fade-l{--fl:44px}
.up-strip.fade-r{--fr:72px}
.up-strip.fade-l,.up-strip.fade-r{
  -webkit-mask-image:linear-gradient(90deg,transparent 0,#000 var(--fl),#000 calc(100% - var(--fr)),transparent 100%);
          mask-image:linear-gradient(90deg,transparent 0,#000 var(--fl),#000 calc(100% - var(--fr)),transparent 100%)}

.up-card{flex:0 0 100%;scroll-snap-align:start;display:flex;align-items:center;gap:20px;
  padding:18px 20px 18px 18px;text-align:left;color:var(--ink);
  background:var(--paper);border:1px solid var(--line);border-radius:18px;
  box-shadow:0 18px 44px -28px rgba(90,60,30,.5)}
/* More than one: the next card shows at the edge, so it is plain there is more. */
.up-strip.many .up-card{flex-basis:calc(100% - 64px)}

.sp-date{flex:0 0 auto;width:74px;padding:11px 0 10px;text-align:center;border-radius:var(--r-ctl);
  background:linear-gradient(160deg,var(--clay),var(--clay-deeper));color:var(--on-accent)}
.sp-mon{display:block;font-size:11.5px;font-weight:700;letter-spacing:.16em;text-transform:uppercase}
.sp-day{display:block;font-family:var(--font-heading);font-size:2.1rem;line-height:1.02}
/* A run of days: "26–28" in the space of one number. */
.sp-date.range .sp-day{font-size:1.32rem;line-height:1.35;white-space:nowrap}
.sp-date.range .sp-mon{letter-spacing:.08em}
.sp-body{flex:1;min-width:0}
.sp-eyebrow{font-size:11.5px;font-weight:700;letter-spacing:.18em;text-transform:uppercase;color:var(--clay-deep)}
.sp-title{font-family:var(--font-heading);font-weight:500;font-size:clamp(1.3rem,2.5vw,1.7rem);line-height:1.15;margin:3px 0 0;overflow-wrap:anywhere;color:var(--ink)}
.sp-when{font-weight:600;font-size:15px;margin:5px 0 0;color:var(--ink)}
.sp-acts{flex:0 0 auto;display:flex;flex-direction:column;gap:8px}
.sp-acts .btn{justify-content:center;gap:9px;padding:11px 18px;font-size:14px;white-space:nowrap;cursor:pointer}
.sp-acts svg{width:17px;height:17px;flex:none}

.up-nav{display:flex;align-items:center;justify-content:center;gap:10px;margin-top:14px}
.up-arrow{width:40px;height:40px;flex:none;display:grid;place-items:center;cursor:pointer;padding:0;
  color:var(--ink);background:var(--paper);border:1px solid var(--line);border-radius:50%;transition:background .2s,opacity .2s}
.up-arrow:hover:not(:disabled){background:var(--cream-2)}
.up-arrow:disabled{opacity:.35;cursor:default}
.up-arrow svg{width:18px;height:18px}
.up-dots{display:flex;align-items:center}
.up-dot{width:24px;height:24px;display:grid;place-items:center;padding:0;border:0;background:none;cursor:pointer}
.up-dot::before{content:"";width:8px;height:8px;border-radius:4px;background:var(--line);transition:width .25s ease,background .25s}
.up-dot[aria-current="true"]::before{width:20px;background:var(--clay)}

@media(max-width:760px){
  .up-card{flex-wrap:wrap;align-items:flex-start;gap:14px 16px;padding:16px}
  .up-strip.many .up-card{flex-basis:calc(100% - 36px)}
  .up-strip.fade-r{--fr:40px}
  .up-strip.fade-l{--fl:28px}
  .sp-date{width:62px;padding:9px 0 8px}
  .sp-day{font-size:1.75rem}
  .sp-date.range .sp-day{font-size:1.1rem}
  .sp-acts{flex:1 1 100%;flex-direction:row;flex-wrap:wrap}
  .sp-acts .btn{flex:1 1 200px;padding:13px 16px}   /* 46px tall: a thumb's worth */
}

/* ── Add to calendar: which calendar ─────────────────────────────────── */
.addcal-menu{position:fixed;z-index:500;min-width:236px;padding:6px;
  background:var(--paper);color:var(--ink);border:1px solid var(--line);border-radius:14px;
  box-shadow:0 22px 50px -22px rgba(40,25,15,.55)}
.addcal-item{display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:10px;
  color:inherit;text-decoration:none;font-family:var(--font-body);font-size:14.5px;line-height:1.25}
.addcal-item:hover,.addcal-item:focus-visible{background:var(--cream-2);outline:none}
.addcal-item svg{width:20px;height:20px;flex:none;color:var(--clay-deep)}
.addcal-item b{display:block;font-weight:600}
.addcal-item small{display:block;font-size:12px;color:var(--muted)}
