/*
 * Project Semicolon Chapter Events — public event presentation
 * Scoped aggressively so chapter themes/page builders cannot restyle controls.
 */
:root{
  --ps-event-ink:#182234;
  --ps-event-muted:#697487;
  --ps-event-soft:#f4f6f8;
  --ps-event-border:#e4e8ee;
  --ps-event-surface:#fff;
  --ps-event-accent:#ff856d;
  --ps-event-accent-strong:#f36e56;
  --ps-event-danger:#a84037;
  --ps-event-danger-bg:#fff1ef;
  --ps-event-blue:#36a4df;
  --ps-event-shadow:0 8px 26px rgba(25,37,56,.055);
}

/* ---------- Public single event ---------- */
.ps-public-event-page,
.ps-public-event-page *{box-sizing:border-box}
.ps-public-event-page{background:#f8f9fb;color:var(--ps-event-ink);font-family:inherit;line-height:1.45}
.ps-public-event-page img{max-width:100%}
.ps-public-event-page h1,
.ps-public-event-page h2,
.ps-public-event-page h3,
.ps-public-event-page p{margin-top:0}
.ps-public-event-page form{margin:0;padding:0}

.ps-public-event-shell{width:min(1168px,100%);margin:0 auto;padding:20px 22px 72px}
.ps-public-event-hero{position:relative;min-height:350px;overflow:hidden;border-radius:18px;background:#e9edf2;border:1px solid rgba(26,35,50,.05)}
.ps-public-event-hero img{display:block;width:100%;height:350px;object-fit:cover}
.ps-public-event-hero--empty{display:grid;place-items:center;background:linear-gradient(135deg,#edf2f6,#e3e8ee)}
.ps-public-event-hero-brand{position:absolute;left:18px;top:18px;display:inline-flex;align-items:center;min-height:34px;padding:7px 12px;border-radius:999px;background:rgba(255,255,255,.93);color:var(--ps-event-ink);font-size:12px;font-weight:800;letter-spacing:.01em;box-shadow:0 3px 12px rgba(16,28,44,.08)}

.ps-public-event-layout{display:grid;grid-template-columns:minmax(0,1fr) 318px;gap:20px;margin-top:18px;align-items:start}
.ps-public-event-main{min-width:0}
.ps-public-event-side{position:sticky;top:24px;display:grid;gap:16px}

.ps-public-event-summary,
.ps-public-event-content-card,
.ps-public-event-card{background:var(--ps-event-surface);border:1px solid var(--ps-event-border);border-radius:16px;box-shadow:var(--ps-event-shadow)}

.ps-public-event-summary{padding:26px 28px}
.ps-public-event-summary-copy{min-width:0}
.ps-public-event-live-badge{display:inline-flex;align-items:center;gap:7px;min-height:27px;padding:5px 10px;border-radius:999px;background:#eaf7f1;color:#287c59;font-size:12px;font-weight:850;margin-bottom:10px}
.ps-public-event-live-badge::before{content:"";width:7px;height:7px;border-radius:50%;background:#33b57d;box-shadow:0 0 0 3px rgba(51,181,125,.12)}
.ps-public-event-live-badge--danger{background:var(--ps-event-danger-bg);color:var(--ps-event-danger)}
.ps-public-event-live-badge--danger::before{background:#d65b50;box-shadow:0 0 0 3px rgba(214,91,80,.12)}
.ps-public-event-kicker{margin:0 0 5px!important;color:#7a8492;font-size:11px;font-weight:850;letter-spacing:.11em;text-transform:uppercase}
.ps-public-event-title{margin:0!important;color:var(--ps-event-ink)!important;font-size:clamp(30px,4vw,43px)!important;line-height:1.06!important;letter-spacing:-.035em!important;font-weight:800!important}
.ps-public-event-lede{margin:10px 0 0!important;color:#657184!important;font-size:15px!important;line-height:1.55!important}
.ps-public-event-timezone{white-space:nowrap;color:#8590a0}
.ps-public-event-summary-description{max-width:780px;margin-top:12px;color:#697487;font-size:15px;line-height:1.58}
.ps-public-event-summary-description p{margin:0!important;color:inherit;font-size:inherit;line-height:inherit}
.ps-public-event-summary-footer{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin-top:17px}
.ps-public-event-attendance-pill{display:inline-flex;align-items:center;gap:7px;min-height:34px;padding:7px 11px;border-radius:999px;background:#f4f6f8;color:#5b6879;font-size:13px}
.ps-public-event-attendance-dot{width:8px;height:8px;border-radius:50%;background:#37a7de;box-shadow:0 0 0 3px rgba(55,167,222,.12)}
.ps-public-event-attendance-pill strong{color:var(--ps-event-ink);font-size:13px}
.ps-public-event-chip{display:inline-flex!important;align-items:center;min-height:34px!important;padding:7px 11px!important;border-radius:999px!important;background:#f5f7f9!important;color:#566477!important;font-size:12px!important;font-weight:800!important}

.ps-public-event-content-card{margin-top:18px;overflow:hidden}
.ps-public-event-tabs{display:flex!important;align-items:center!important;gap:20px!important;padding:0 20px!important;margin:0!important;border:0!important;border-bottom:1px solid var(--ps-event-border)!important;border-radius:0!important;background:#fff!important;box-shadow:none!important;position:static!important;overflow:auto!important;min-height:58px!important}
.ps-public-event-page .ps-public-event-tabs a,
.ps-public-event-page .ps-public-event-tabs a:visited{display:inline-flex!important;align-items:center!important;min-height:58px!important;padding:0 2px!important;position:relative!important;border:0!important;border-radius:0!important;background:transparent!important;color:#6b7481!important;text-decoration:none!important;font-family:inherit!important;font-size:13px!important;font-weight:700!important;line-height:1!important;white-space:nowrap!important;box-shadow:none!important}
.ps-public-event-page .ps-public-event-tabs a:hover,
.ps-public-event-page .ps-public-event-tabs a:focus-visible{background:transparent!important;color:var(--ps-event-ink)!important;text-decoration:none!important;box-shadow:none!important}
.ps-public-event-page .ps-public-event-tabs a:first-child{color:var(--ps-event-blue)!important}
.ps-public-event-page .ps-public-event-tabs a:first-child::after{content:"";position:absolute!important;left:0!important;right:0!important;bottom:0!important;height:2px!important;background:var(--ps-event-blue)!important}

.ps-public-event-section{padding:26px 24px 28px;scroll-margin-top:24px}
.ps-public-event-section + .ps-public-event-section{padding-top:0}
.ps-public-event-section h2{margin:0 0 14px!important;color:var(--ps-event-ink)!important;font-size:22px!important;line-height:1.15!important;letter-spacing:-.02em!important;font-weight:800!important}
.ps-public-event-description--large{color:#515e70;font-size:15px;line-height:1.75}
.ps-public-event-description--large p,.ps-public-event-description--large li{color:inherit;font-size:inherit;line-height:inherit}
.ps-public-event-description--large p:last-child{margin-bottom:0}

.ps-public-event-side .ps-public-event-card{padding:22px}
.ps-public-event-side-title{margin:0!important;color:var(--ps-event-ink)!important;font-size:18px!important;line-height:1.25!important;font-weight:800!important;letter-spacing:-.015em!important}
.ps-public-event-rsvp-count{display:flex;align-items:baseline;gap:7px;margin-top:12px}
.ps-public-event-rsvp-count strong{font-size:34px;line-height:1;font-weight:850;letter-spacing:-.035em;color:var(--ps-event-ink)}
.ps-public-event-rsvp-count span{font-size:13px;color:#7a8594}
.ps-public-event-rsvp-confirmed{margin-top:13px;padding:11px 12px;border-radius:11px;background:#eef8f3;color:#287c59;font-size:13px;font-weight:800}
.ps-public-event-help-text{margin:11px 0 0!important}
.ps-public-event-cancelled{margin-top:13px;padding:12px 13px;border-radius:11px;background:var(--ps-event-danger-bg);color:var(--ps-event-danger);font-size:13px;line-height:1.55;font-weight:700}
.ps-public-event-action-form{margin-top:0!important}

/* Strong theme guards: buttons and links owned by the Events template win over theme/page-builder control styles. */
.ps-public-event-page .ps-public-event-button,
.ps-public-event-page .ps-public-event-button:visited,
.ps-public-event-page .ps-public-event-button:hover,
.ps-public-event-page .ps-public-event-button:focus,
.ps-public-event-page .ps-public-event-button:active,
.ps-public-event-page button.ps-public-event-button{display:flex!important;align-items:center!important;justify-content:center!important;width:100%!important;min-height:48px!important;margin:15px 0 0!important;padding:12px 16px!important;border:1px solid transparent!important;border-radius:12px!important;background:var(--ps-event-accent)!important;color:#fff!important;text-decoration:none!important;font-family:inherit!important;font-size:14px!important;font-weight:800!important;line-height:1.2!important;text-align:center!important;cursor:pointer!important;appearance:none!important;-webkit-appearance:none!important;box-shadow:none!important;outline:none!important;transform:none!important;transition:background .16s ease,transform .16s ease,box-shadow .16s ease!important}
.ps-public-event-page .ps-public-event-button:hover,
.ps-public-event-page button.ps-public-event-button:hover{background:var(--ps-event-accent-strong)!important;color:#fff!important;transform:translateY(-1px)!important;box-shadow:0 8px 20px rgba(243,110,86,.18)!important}
.ps-public-event-page .ps-public-event-button:focus-visible,
.ps-public-event-page button.ps-public-event-button:focus-visible{outline:3px solid rgba(54,164,223,.26)!important;outline-offset:2px!important;box-shadow:none!important}
.ps-public-event-page .ps-public-event-button--secondary,
.ps-public-event-page .ps-public-event-button--secondary:visited{background:#f0f3f6!important;color:var(--ps-event-ink)!important;border-color:#e1e6ec!important}
.ps-public-event-page .ps-public-event-button--secondary:hover{background:#e6ebf0!important;color:var(--ps-event-ink)!important;box-shadow:none!important}

.ps-public-event-facts{display:grid;gap:15px;margin-top:16px}
.ps-public-event-fact{display:grid;grid-template-columns:34px minmax(0,1fr);gap:10px;align-items:start}
.ps-public-event-fact-icon{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:#f4f6f8;color:#5f6d7f;font-size:14px}
.ps-public-event-fact strong{display:block;color:var(--ps-event-ink);font-size:12px;line-height:1.4;font-weight:800}
.ps-public-event-fact span,.ps-public-event-fact a{display:block;margin-top:3px;color:#6c7787;font-size:12px;line-height:1.55;overflow-wrap:anywhere}
.ps-public-event-map{height:225px;margin-top:14px;overflow:hidden;border-radius:12px;background:#edf1f4}
.ps-public-event-card h3{margin:0!important;color:var(--ps-event-ink)!important;font-size:16px!important;line-height:1.3!important;font-weight:800!important}
.ps-public-event-muted{margin:6px 0 0!important;color:var(--ps-event-muted)!important;font-size:13px!important;line-height:1.55!important}
.ps-public-event-online{margin-top:15px;padding-top:16px;border-top:1px solid var(--ps-event-border)}
.ps-public-event-detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:8px}
.ps-public-event-detail{padding:14px;border:1px solid var(--ps-event-border);border-radius:12px;background:#fff}
.ps-public-event-detail strong{display:block;color:#768193;font-size:11px;text-transform:uppercase;letter-spacing:.08em;font-weight:800}
.ps-public-event-detail span{display:block;margin-top:6px;color:var(--ps-event-ink);font-size:14px;font-weight:750;line-height:1.45}

/* ---------- Public archive ---------- */
.ps-event-archive,
.ps-event-archive *{box-sizing:border-box}
.ps-event-archive{padding:28px 22px 76px;background:#f8f9fb;color:var(--ps-event-ink);font-family:inherit;line-height:1.45}
.ps-event-archive-shell{width:min(1168px,100%);margin:0 auto}
.ps-event-archive-header{display:flex;justify-content:space-between;align-items:flex-end;gap:28px;margin-bottom:24px}
.ps-event-kicker{margin:0 0 6px!important;color:#7a8492!important;font-size:11px!important;font-weight:850!important;letter-spacing:.11em!important;text-transform:uppercase!important}
.ps-event-archive-header h1{margin:0!important;color:var(--ps-event-ink)!important;font-size:38px!important;line-height:1.06!important;letter-spacing:-.035em!important;font-weight:800!important}
.ps-event-archive-intro{max-width:650px;margin:10px 0 0!important;color:#697487!important;font-size:15px!important;line-height:1.58!important}
.ps-event-archive-tabs{display:flex;gap:4px;padding:4px;border:1px solid var(--ps-event-border);border-radius:12px;background:#f0f3f6;white-space:nowrap}
.ps-event-archive .ps-event-archive-tabs a,
.ps-event-archive .ps-event-archive-tabs a:visited{display:inline-flex!important;align-items:center!important;justify-content:center!important;min-height:38px!important;padding:8px 12px!important;border:0!important;border-radius:9px!important;background:transparent!important;color:#687589!important;text-decoration:none!important;font-family:inherit!important;font-size:12px!important;font-weight:800!important;line-height:1!important;box-shadow:none!important}
.ps-event-archive .ps-event-archive-tabs a:hover{background:#e7ebef!important;color:var(--ps-event-ink)!important;text-decoration:none!important}
.ps-event-archive .ps-event-archive-tabs a.is-active{background:#fff!important;color:var(--ps-event-ink)!important;box-shadow:0 2px 8px rgba(22,35,53,.07)!important}
.ps-event-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.ps-event-card{overflow:hidden;border:1px solid var(--ps-event-border);border-radius:16px;background:#fff;box-shadow:var(--ps-event-shadow);transition:transform .18s ease,box-shadow .18s ease}
.ps-event-card:hover{transform:translateY(-2px);box-shadow:0 12px 30px rgba(25,37,56,.08)}
.ps-event-card-media{display:block!important;position:relative!important;aspect-ratio:16/9!important;overflow:hidden!important;background:#edf1f4!important;text-decoration:none!important}
.ps-event-archive .ps-event-card-media,
.ps-event-archive .ps-event-card-media:visited,
.ps-event-archive .ps-event-card-media:hover{color:inherit!important;text-decoration:none!important}
.ps-event-card-media img{display:block;width:100%;height:100%;object-fit:cover}
.ps-event-card-placeholder{display:grid;width:100%;height:100%;place-items:center;color:#9aa5b2;font-size:30px;font-weight:900}
.ps-event-card-body{padding:18px}
.ps-event-card-topline{display:flex;justify-content:space-between;align-items:center;gap:10px;min-height:19px;color:#778394;font-size:11px;font-weight:800}
.ps-event-card-status.is-cancelled{color:var(--ps-event-danger)}
.ps-event-card h2{margin:9px 0 7px!important;color:var(--ps-event-ink)!important;font-size:20px!important;line-height:1.1!important;letter-spacing:-.025em!important;font-weight:800!important}
.ps-event-archive .ps-event-card h2 a,
.ps-event-archive .ps-event-card h2 a:visited{color:var(--ps-event-ink)!important;text-decoration:none!important;font-family:inherit!important;font-weight:800!important}
.ps-event-archive .ps-event-card h2 a:hover{color:#30486d!important;text-decoration:none!important}
.ps-event-card-time,.ps-event-card-location{margin:0!important;color:#657184!important;font-size:13px!important;line-height:1.48!important}
.ps-event-card-location{margin-top:3px!important}
.ps-event-card-footer{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:16px;padding-top:14px;border-top:1px solid #edf0f4;color:#788392;font-size:11px;font-weight:750}
.ps-event-archive .ps-event-card-link,
.ps-event-archive .ps-event-card-link:visited{color:var(--ps-event-ink)!important;text-decoration:none!important;font-family:inherit!important;font-size:12px!important;font-weight:850!important;white-space:nowrap!important}
.ps-event-archive .ps-event-card-link:hover{color:#30486d!important;text-decoration:none!important}
.ps-event-card.is-cancelled{opacity:.92}
.ps-event-pagination{margin-top:28px}
.ps-event-pagination ul{display:flex;justify-content:center;gap:6px;list-style:none;margin:0!important;padding:0!important}
.ps-event-archive .ps-event-pagination a,
.ps-event-archive .ps-event-pagination a:visited,
.ps-event-archive .ps-event-pagination span{display:inline-flex!important;align-items:center!important;justify-content:center!important;min-width:38px!important;height:38px!important;padding:0 10px!important;border:1px solid var(--ps-event-border)!important;border-radius:10px!important;background:#fff!important;color:#3f536e!important;text-decoration:none!important;font-family:inherit!important;font-size:12px!important;font-weight:800!important;line-height:1!important;box-shadow:none!important}
.ps-event-archive .ps-event-pagination a:hover{background:#f0f3f6!important;color:var(--ps-event-ink)!important;text-decoration:none!important}
.ps-event-archive .ps-event-pagination .current{background:#293b58!important;color:#fff!important;border-color:#293b58!important}
.ps-event-archive-empty{padding:54px 26px;border:1px solid var(--ps-event-border);border-radius:16px;text-align:center;background:#fff}
.ps-event-archive-empty-mark{font-size:34px;font-weight:900;color:#a3acb8}
.ps-event-archive-empty h2{margin:10px 0 7px!important;color:var(--ps-event-ink)!important;font-size:24px!important;line-height:1.15!important;font-weight:800!important}
.ps-event-archive-empty p{max-width:520px;margin:0 auto 18px!important;color:#697487!important;font-size:14px!important;line-height:1.6!important}
.ps-event-archive .ps-event-button,
.ps-event-archive .ps-event-button:visited,
.ps-event-archive .ps-event-button:hover{display:inline-flex!important;align-items:center!important;justify-content:center!important;min-height:44px!important;padding:11px 15px!important;border:0!important;border-radius:11px!important;background:#293b58!important;color:#fff!important;text-decoration:none!important;font-family:inherit!important;font-size:13px!important;font-weight:800!important;line-height:1!important;box-shadow:none!important}
.ps-event-archive .ps-event-button:hover{background:#1f3049!important;color:#fff!important}

/* Event tabs and sharing */
.ps-public-event-page .ps-public-event-tabs button,.ps-public-event-page .ps-public-event-tabs button:hover,.ps-public-event-page .ps-public-event-tabs button:focus,.ps-public-event-page .ps-public-event-tabs button:active{display:inline-flex!important;align-items:center!important;min-height:58px!important;padding:0 2px!important;position:relative!important;border:0!important;border-radius:0!important;background:transparent!important;color:#6b7481!important;text-decoration:none!important;font-family:inherit!important;font-size:13px!important;font-weight:700!important;line-height:1!important;white-space:nowrap!important;box-shadow:none!important;appearance:none!important;-webkit-appearance:none!important;cursor:pointer!important}
.ps-public-event-page .ps-public-event-tabs button:hover,.ps-public-event-page .ps-public-event-tabs button:focus-visible{color:var(--ps-event-ink)!important}
.ps-public-event-page .ps-public-event-tabs button.is-active{color:var(--ps-event-blue)!important}
.ps-public-event-page .ps-public-event-tabs button.is-active::after{content:"";position:absolute!important;left:0!important;right:0!important;bottom:0!important;height:2px!important;background:var(--ps-event-blue)!important}
.ps-public-event-page .ps-public-event-section[hidden]{display:none!important}
.ps-public-event-details-copy{margin-top:18px;padding-top:18px;border-top:1px solid var(--ps-event-border)}
.ps-public-event-details-copy h3{margin:0 0 8px!important;color:var(--ps-event-ink)!important;font-size:15px!important;font-weight:800!important}
.ps-public-event-details-copy p{margin:0 0 9px!important;color:#667487!important;font-size:13px!important;line-height:1.65!important}
.ps-public-event-card--share{padding-bottom:18px!important}
.ps-public-event-share-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:13px}
.ps-public-event-page .ps-public-event-share-button,.ps-public-event-page .ps-public-event-share-button:visited,.ps-public-event-page .ps-public-event-share-button:hover,.ps-public-event-page button.ps-public-event-share-button{display:inline-flex!important;align-items:center!important;justify-content:center!important;min-height:40px!important;padding:9px 10px!important;border:1px solid #e0e5eb!important;border-radius:10px!important;background:#f6f7f9!important;color:#34455d!important;text-decoration:none!important;font-family:inherit!important;font-size:12px!important;font-weight:800!important;line-height:1!important;cursor:pointer!important;appearance:none!important;-webkit-appearance:none!important;box-shadow:none!important;transform:none!important}
.ps-public-event-page .ps-public-event-share-button:hover{background:#edf1f5!important;color:#172b49!important}
.ps-public-event-page .ps-public-event-share-button:focus-visible{outline:3px solid rgba(54,164,223,.22)!important;outline-offset:2px!important}
.ps-public-event-page .ps-public-event-share-button--copy{grid-column:1/-1}
.ps-public-event-share-status{min-height:18px;margin-top:8px;color:#2e7a59;font-size:11px;font-weight:800}

@media (max-width:980px){
  .ps-public-event-layout{grid-template-columns:1fr}
  .ps-public-event-side{position:static}
  .ps-event-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .ps-event-archive-header{align-items:flex-start;flex-direction:column}
}
@media (max-width:680px){
  .ps-public-event-shell,.ps-event-archive{padding-left:14px;padding-right:14px}
  .ps-public-event-hero,.ps-public-event-hero img{min-height:230px;height:230px}
  .ps-public-event-summary{padding:22px 20px}
  .ps-public-event-title{font-size:32px!important}
  .ps-public-event-tabs{gap:16px!important;padding:0 16px!important}
  .ps-public-event-section{padding-left:18px;padding-right:18px}
  .ps-public-event-detail-grid{grid-template-columns:1fr}
  .ps-event-grid{grid-template-columns:1fr}
  .ps-event-archive-header h1{font-size:34px!important}
  .ps-event-archive-tabs{max-width:100%;overflow:auto}
}
