/* =============================================================================
   UMD India Alumni — Events (listing, single-event summary, registration
   widget). Scoped under .umd-alumni so it shares --umd-red/.fi/.fs/.btn-cta
   with the main registration form and never collides with the theme.
   ============================================================================= */

/* ---------- Give the events pages a soft off-white backdrop instead of the
   theme's site-wide dark background — so white cards read as "white with
   shadow", not a stark white box floating on a dark page. ---------- */
body.single-umd_event,
body.umd-ev-listing-page {
  background-color: #FAF8F6 !important;
}
body.single-umd_event #main,
body.umd-ev-listing-page #main,
body.single-umd_event #content-wrap,
body.umd-ev-listing-page #content-wrap {
  background-color: transparent !important;
}

/* ---------- Events grid (listing shortcode) ---------- */
/* The theme's own "full width" layout CSS stretches .content-area to
   width:100% with no cap, so this needs its own explicit width + !important
   to actually stay capped and centered rather than sprawling edge to edge. */
.umd-alumni.umd-ev-list {
  max-width: 1100px !important; width: 100% !important;
  margin-left: auto !important; margin-right: auto !important;
  padding: 24px 16px; box-sizing: border-box;
}
.umd-ev-empty { text-align: center; color: var(--muted, #6D6F79); padding: 40px 0; }

.umd-ev-grid {
  display: grid;
  /* A fixed 3-up grid (not auto-fill) — auto-fill was picking column counts
     off the theme's oversized, unconstrained parent width instead of ours. */
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 900px) {
  .umd-ev-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .umd-ev-grid { grid-template-columns: 1fr; }
}

.umd-ev-card {
  background: #fff; border: 1px solid var(--hairline-lilac, #E4E2F0);
  border-radius: var(--r-lg, 14px); overflow: hidden;
  box-shadow: var(--shadow-md, 0 2px 16px rgba(0,0,0,.07));
  transition: transform .15s, box-shadow .15s;
}
.umd-ev-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.umd-ev-card-link { display: block; text-decoration: none; color: inherit; }
.umd-ev-card-footer { padding: 0 18px 18px; }

.umd-ev-card-banner { position: relative; aspect-ratio: 16/9; background: #F0ECEA; overflow: hidden; }
.umd-ev-card-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.umd-ev-card-banner-placeholder { width: 100%; height: 100%; background: linear-gradient(135deg, var(--umd-red, #E21833), var(--umd-red-press, #9A0F1F)); }

.umd-ev-badge {
  position: absolute; top: 10px; right: 10px;
  font-size: 11px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase;
  padding: 4px 10px; border-radius: var(--r-pill, 999px); color: #fff;
}
.umd-ev-badge-full { background: var(--umd-dark, #1A0509); right: 10px; }
.umd-ev-badge-members { background: var(--umd-red, #E21833); left: 10px; right: auto; }

.umd-ev-card-body { padding: 16px 18px 20px; }
.umd-ev-card-date { font-size: 12.5px; font-weight: 700; color: var(--umd-red, #E21833); text-transform: uppercase; letter-spacing: .03em; margin-bottom: 6px; }
.umd-ev-card-title { font-size: 18px; font-weight: 700; margin: 0 0 6px; line-height: 1.3; color: var(--ink, #17181C); }
.umd-ev-card-loc { font-size: 13.5px; color: var(--muted, #6D6F79); margin-bottom: 14px; }
.umd-ev-card-cta {
  display: block; text-align: center; width: 100%; height: 42px; line-height: 42px;
  border-radius: var(--r-pill, 999px); background: linear-gradient(135deg, var(--umd-red, #E21833), var(--umd-red-press, #9A0F1F));
  color: #fff; font-size: 13.5px; font-weight: 700;
}

/* ---------- Single event: hide the theme's own raw featured-image block
   and duplicate title — we render our own hero banner instead (below). ---------- */
body.single-umd_event .thumbnail,
body.single-umd_event .entry-header { display: none !important; }

/* ---------- Single event: hero banner ---------- */
.umd-ev-hero {
  position: relative; border-radius: var(--r-lg, 14px); overflow: hidden;
  max-width: 900px; min-height: 360px; margin: 0 auto 24px;
  background-color: var(--umd-dark, #1A0509);
  background-size: contain; background-position: center; background-repeat: no-repeat;
  display: flex; align-items: flex-end;
}
.umd-ev-hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(26,5,9,.05) 0%, rgba(26,5,9,.92) 100%);
}
.umd-ev-hero-overlay { position: relative; z-index: 1; padding: 36px; color: #fff; width: 100%; box-sizing: border-box; }
.umd-ev-hero-badge {
  display: inline-block; background: rgba(255,255,255,.14); backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,.35); color: #fff; font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em; padding: 6px 14px; border-radius: var(--r-pill, 999px);
  margin-bottom: 16px;
}
.umd-ev-hero-title { font-size: 34px; font-weight: 800; margin: 0 0 10px; line-height: 1.15; }
.umd-ev-hero-meta { font-size: 14.5px; opacity: .9; }
.umd-ev-hero-meta-icon { margin-right: 4px; }
.umd-ev-hero-sub { font-size: 13px; opacity: .8; margin: 8px 0 22px; display: flex; gap: 16px; flex-wrap: wrap; }
.umd-ev-hero-cta {
  width: auto; display: inline-flex; align-items: center; justify-content: center;
  padding: 0 30px;
}
@media (max-width: 700px) {
  .umd-ev-hero { min-height: 280px; }
  .umd-ev-hero-overlay { padding: 22px; }
  .umd-ev-hero-title { font-size: 24px; }
}

/* ---------- Single event: description label ---------- */
.umd-ev-description { max-width: 900px; margin: 0 auto 32px; }
.umd-ev-section-label {
  font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--umd-red, #E21833); margin: 0 0 8px;
}

/* ---------- Registration widget ---------- */
.umd-alumni.umd-ev-reg,
.umd-alumni .umd-ev-reg {
  max-width: 560px; margin: 0 auto 40px; padding: 28px 30px;
  background: #fff; border: 1px solid var(--hairline-lilac, #E4E2F0);
  border-radius: var(--r-lg, 14px); box-shadow: var(--shadow-md, 0 2px 16px rgba(0,0,0,.07));
}
.umd-ev-reg-title { font-size: 20px; font-weight: 700; margin: 0 0 14px; color: var(--ink, #17181C); }
.umd-ev-note { font-size: 14px; color: var(--muted, #6D6F79); margin: 0 0 16px; }

/* Only the active stage shows. */
.umd-ev-reg .umd-ev-stage { display: none; }
.umd-ev-reg[data-stage="1"] .umd-ev-stage-1,
.umd-ev-reg[data-stage="2"] .umd-ev-stage-2 { display: block; }

.umd-ev-choice-buttons { display: flex; gap: 12px; margin-bottom: 16px; }
.umd-ev-choice-btn {
  flex: 1; height: 48px; border-radius: var(--r-md, 10px);
  border: 1.5px solid var(--hairline-lilac, #E4E2F0); background: #fff;
  font-family: var(--font-sans); font-size: 13.5px; font-weight: 700; cursor: pointer;
  color: var(--ink, #17181C); transition: border-color .15s, background .15s, color .15s;
}
.umd-ev-choice-btn:hover,
.umd-ev-choice-btn.is-active {
  border-color: var(--umd-red, #E21833); background: rgba(226,24,51,.06); color: var(--umd-red, #E21833);
}

.umd-ev-lookup-error {
  background: #FDECEE; border: 1px solid #F8C7CE; color: #9A0F1F;
  border-radius: var(--r-md, 10px); padding: 10px 14px; font-size: 13px; margin-bottom: 12px;
}

.umd-ev-link-btn {
  background: none; border: none; padding: 0; margin: 10px 0 0;
  color: var(--umd-red, #E21833); font-family: var(--font-sans);
  font-size: 13.5px; font-weight: 700; cursor: pointer; text-decoration: underline;
  text-underline-offset: 3px;
}

.umd-ev-signup-link { font-size: 13px; color: var(--muted, #6D6F79); margin-top: 14px; text-align: center; }
.umd-ev-signup-link a { color: var(--umd-red, #E21833); font-weight: 700; text-decoration: none; }

/* Identity is read-only for the member path; still visible so they can confirm it. */
.umd-ev-reg[data-kind="member"] #umd-ev-first-name,
.umd-ev-reg[data-kind="member"] #umd-ev-last-name,
.umd-ev-reg[data-kind="member"] #umd-ev-email {
  background: var(--surface-1, #FDFBFE); color: var(--muted, #6D6F79); pointer-events: none;
}

/* Graduation Year / Degree are confirmation-only, shown for members only.
   !important because .umd-alumni .g2 (main form CSS) is more specific than a
   single-class selector and would otherwise always win and force it visible. */
.umd-ev-member-only-field { display: none !important; }
.umd-ev-reg[data-kind="member"] .umd-ev-member-only-field { display: grid !important; }
.umd-ev-reg .fi:disabled { background: var(--surface-1, #FDFBFE); color: var(--muted, #6D6F79); }

.umd-ev-textarea { height: auto; padding: 12px 14px; resize: vertical; }

.umd-ev-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; }
.umd-ev-actions .btn-cta { width: auto; flex: 1; padding: 0 28px; }

.umd-ev-success.umd-success { max-width: 480px; }
.umd-ev-success.umd-success .btn-cta { width: auto; display: inline-flex; padding: 0 28px; margin-top: 18px; }

.umd-ev-back-wrap { text-align: center; margin: -20px auto 40px; max-width: 560px; }
.umd-ev-back-link { font-size: 13.5px; font-weight: 700; color: var(--muted, #6D6F79); text-decoration: none; }
.umd-ev-back-link:hover { color: var(--umd-red, #E21833); }
