/* =============================================================================
   LibParl v3 — events-style.css
   ============================================================================= */

.lp-events-hero { background: #fff; padding: 48px 24px 30px; border-bottom: 1px solid #eeecea; }
.lp-events-hero__inner { max-width: 1200px; margin: 0 auto; }
.lp-events-hero__eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--lp-accent); margin-bottom: 10px; }
.lp-events-hero__title { font-family: 'Nunito Sans', sans-serif; font-size: clamp(28px, 4.5vw, 44px); font-weight: 900; color: #16181d; letter-spacing: -.03em; line-height: 1.05; margin: 0; }
.lp-events-hero__title::after { content: ''; display: block; width: 34px; height: 4px; background: var(--lp-accent); border-radius: 2px; margin-top: 14px; }

.lp-events-empty { text-align: center; padding: 64px 24px; color: #787c82; }
.lp-events-empty__icon { font-size: 40px; margin-bottom: 12px; }
.lp-events-empty__title { font-size: 16px; font-weight: 600; color: #1d2327; margin-bottom: 6px; }
.lp-events-empty__desc { font-size: 14px; margin-bottom: 4px; }
.lp-events-empty__link { display: inline-block; margin-top: 16px; padding: 10px 20px; background: var(--lp-accent); color: #fff; border-radius: 6px; text-decoration: none; font-size: 13px; font-weight: 600; }
.lp-events-empty__link:hover { opacity: .9; }

.lp-events { max-width: 1200px; margin: 0 auto; padding: 48px 24px 72px; }
.lp-events__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 48px; }
@media (max-width: 900px) { .lp-events__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .lp-events__grid { grid-template-columns: 1fr; } }

.lp-event-card { display: block; text-decoration: none; background: #fff; border: 1px solid #e8e8e8; border-radius: 12px; overflow: hidden; transition: transform .15s, box-shadow .15s; }
.lp-event-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.09); text-decoration: none; }
.lp-event-card__img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; background: #f0f0f1; }
.lp-event-card__img--placeholder { aspect-ratio: 16/9; background: linear-gradient(135deg, rgba(var(--lp-accent-rgb),.13), rgba(var(--lp-accent-rgb),.05)); display: flex; align-items: center; justify-content: center; font-size: 28px; }
.lp-event-card__body { padding: 16px 18px 20px; }
.lp-event-card__date { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--lp-accent); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 8px; }
.lp-event-card__title { font-size: 15px; font-weight: 600; color: #1d2327; line-height: 1.4; margin-bottom: 8px; }
.lp-event-card__excerpt { font-size: 13px; color: #555; line-height: 1.5; margin-bottom: 10px; }
.lp-event-card__read { font-size: 12px; font-weight: 600; color: var(--lp-accent); text-transform: uppercase; letter-spacing: .05em; }

/* =============================================================================
   "Ticket" cards — ported from libparl-v2's page-events.php, which pulls
   live events from the VAN/EveryAction CRM instead of WordPress posts.
   Class names kept identical to v2 on purpose (same design the offices
   already know), only var(--ev-accent) swapped for v3's var(--lp-accent).
   ============================================================================= */

.event-main {
  display: flex;
  align-items: stretch;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.10);
  margin-bottom: 20px;
  overflow: hidden;
  position: relative;
  border: 1px solid #e8e8e8;
}

.event-left {
  width: 28%;
  flex-shrink: 0;
  background: #f7f7f7;
  border-right: 2px dashed #ddd;
  padding: 20px 12px 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  position: relative;
}

.event-left::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 5px;
  background: var(--lp-accent);
}

.event-stub-day {
  font-size: 2.4em;
  font-weight: 900;
  color: #111;
  line-height: 1;
  text-align: center;
  letter-spacing: -0.02em;
}

.event-stub-month {
  font-size: 0.78em;
  font-weight: 800;
  color: #111;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 2px;
}

.event-stub-year {
  font-size: 0.72em;
  font-weight: 600;
  color: #888;
  text-align: center;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}

.event-stub-multiday {
  font-size: 0.72em;
  font-weight: 700;
  color: #555;
  text-align: center;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 10px;
  line-height: 1.4;
}

.event-stub-divider {
  width: 60%;
  height: 1px;
  background: #ddd;
  margin: 6px auto 10px;
}

.event-stub-time {
  font-size: 0.9em;
  font-weight: 700;
  color: var(--lp-accent);
  text-align: center;
  letter-spacing: 0.03em;
}

.event-location {
  font-size: 0.72em;
  color: #888;
  line-height: 1.5;
  margin-top: auto;
  padding-top: 14px;
  text-align: center;
}

.event-right {
  flex: 1;
  padding: 24px 24px 20px 28px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.event-title {
  color: var(--lp-accent);
  font-weight: 800;
  font-size: 1.05em;
  letter-spacing: 0.01em;
  line-height: 1.4;
  margin-bottom: 10px;
}

.event-description-wrap { margin-bottom: 16px; }
.event-description { font-size: 0.88em; color: #444; line-height: 1.65; }

.event-desc-more-btn {
  display: inline;
  background: none;
  border: none;
  padding: 0 0 0 4px;
  color: var(--lp-accent);
  font-size: 0.88em;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}
.event-desc-more-btn:hover { opacity: 0.75; }

.event-rsvp-btn {
  display: inline-block;
  margin-top: 12px;
  background: var(--lp-accent);
  color: #fff !important;
  font-size: 0.78em;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 9px 22px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  align-self: flex-start;
  text-decoration: none;
  transition: opacity 0.15s;
}
.event-rsvp-btn:hover { opacity: 0.85; }

/* RSVP iframe modal */
.rsvp-modal { display: none !important; position: fixed !important; inset: 0 !important; width: 100vw !important; height: 100vh !important; z-index: 200000 !important; background: rgba(0,0,0,.45) !important; align-items: center !important; justify-content: center !important; padding: 24px !important; }
.rsvp-modal[style*="display: block"], .rsvp-modal[style*="display:block"] { display: flex !important; }
.rsvp-modal__content { position: relative !important; width: min(820px,100%) !important; height: min(520px,85vh) !important; border-radius: 14px !important; overflow: hidden !important; background: #fff !important; box-shadow: 0 20px 50px rgba(0,0,0,.25) !important; display: flex !important; flex-direction: column !important; }
.rsvp-modal__header { background: var(--lp-accent); color: #fff; font-weight: 700; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; padding: 10px 16px; }
.rsvp-modal__close { position: absolute !important; top: 8px !important; right: 12px !important; z-index: 5 !important; color: #fff !important; font-size: 22px !important; line-height: 1 !important; background: transparent !important; border: none !important; padding: 0 !important; width: auto !important; height: auto !important; cursor: pointer !important; }
.rsvp-modal__close:hover { opacity: .75; }
.rsvp-modal__iframe { flex: 1 1 auto !important; width: 100% !important; border: 0 !important; }

/* Desktop tooltip for "Read more" — appended to <body> by JS */
.ev-tooltip-global { display: none; position: fixed; width: 380px; max-width: 90vw; background: #fff; border: 1px solid #e0e0e0; border-radius: 8px; box-shadow: 0 8px 32px rgba(0,0,0,0.18); z-index: 99999; overflow: hidden; }
.ev-tooltip-global.is-open { display: block; }
.ev-tooltip-global__header { background: var(--lp-accent); color: #fff; font-size: 0.75em; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; padding: 9px 14px; display: flex; justify-content: space-between; align-items: center; }
.ev-tooltip-global__close { background: none; border: none; color: #fff; font-size: 1.3em; line-height: 1; cursor: pointer; padding: 0; opacity: 0.85; }
.ev-tooltip-global__close:hover { opacity: 1; }
.ev-tooltip-global__body { max-height: 260px; overflow-y: auto; padding: 14px 16px; font-size: 0.88em; color: #333; line-height: 1.7; }
.ev-tooltip-global::after { content: ''; position: absolute; bottom: -7px; left: 20px; width: 13px; height: 13px; background: #fff; border-right: 1px solid #e0e0e0; border-bottom: 1px solid #e0e0e0; transform: rotate(45deg); }

/* Mobile bottom sheet for "Read more" */
.event-sheet-overlay { display: none; }
.event-sheet-overlay.is-open { display: block; position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 90000; }
.event-sheet { display: none; }
.event-sheet.is-open { display: flex; flex-direction: column; position: fixed; left: 0; right: 0; bottom: 0; top: auto; background: #fff; border-radius: 16px 16px 0 0; z-index: 90001; max-height: 65vh; overflow: hidden; animation: lp-sheet-up 0.28s cubic-bezier(0.32,0.72,0,1) both; }
@keyframes lp-sheet-up { from { transform: translateY(100%); } to { transform: translateY(0); } }
.event-sheet__handle { width: 36px; height: 4px; background: #ddd; border-radius: 2px; margin: 10px auto 4px; flex-shrink: 0; }
.event-sheet__header { background: var(--lp-accent); color: #fff; font-size: 0.82em; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; padding: 12px 44px 12px 16px; line-height: 1.3; flex-shrink: 0; position: relative; }
.event-sheet__close { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); background: none; border: none; color: #fff; font-size: 1.5em; line-height: 1; cursor: pointer; padding: 0; }
.event-sheet__body { overflow-y: auto; padding: 18px 16px 32px; font-size: 0.9em; color: #333; line-height: 1.7; -webkit-overflow-scrolling: touch; flex: 1; }

@media (max-width: 600px) {
  .event-main { flex-direction: column; border-radius: 8px; }
  .event-left { width: 100%; border-right: none; border-bottom: 2px dashed #ddd; padding: 16px 16px 14px 16px; flex-direction: row; flex-wrap: nowrap; justify-content: center; gap: 0 24px; align-items: center; }
  .event-stub-day { font-size: 1.8em; }
  .event-stub-year, .event-stub-divider { display: none; }
  .event-stub-month { font-size: 0.7em; margin-bottom: 0; }
  .event-stub-time { font-size: 0.85em; }
  .event-location { width: 100%; margin-top: 6px; padding-top: 4px; font-size: 0.72em; text-align: center; }
  .event-left::before { width: 100%; height: 4px; top: 0; left: 0; bottom: auto; }
  .event-right { padding: 14px 16px 18px; }
}