/* ============================================================
   MCPS Institution — Events
   Complete stylesheet for:
   - /view/events/index.php
   - /view/events/detail/index.php
   - /view/ops/events/index.php
   - /view/ops/events/new/index.php
   - /view/ops/events/edit/index.php
   ============================================================ */


/* ============================================================
   1. Section containers
   ============================================================ */

.ev-section {
  padding: var(--pad-y) var(--pad-x);
  background: var(--black);
  border-bottom: 1px solid var(--border-gold);
}
.ev-section--past {
  background: var(--charcoal);
}

.ev-section__head {
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-gold);
}

/* .panel__title fallback (normally from portal.css, duplicated so
   events pages work without loading portal.css) */
.ev-section .panel__title,
.ev-stream-cta .panel__title {
  font-family: var(--font-head);
  font-size: 36px;
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0;
}
@media (min-width: 768px) {
  .ev-section .panel__title,
  .ev-stream-cta .panel__title { font-size: 48px; }
}


/* ============================================================
   2. Empty state
   ============================================================ */

.ev-empty {
  padding: 48px 0;
  text-align: left;
}
.ev-empty__title {
  font-family: var(--font-head);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 12px;
}
.ev-empty .body {
  color: var(--gray);
  margin: 0;
}


/* ============================================================
   3. Public — Upcoming events list (clickable tabs)
   ============================================================ */

.ev-tabs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
@media (min-width: 768px) {
  .ev-tabs { gap: 20px; }
}

.ev-tab {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 28px 24px;
  background: var(--charcoal);
  border: 1px solid var(--border-gold);
  transition: background 150ms ease;
}
@media (min-width: 768px) {
  .ev-tab { padding: 36px 40px; gap: 24px; }
}
.ev-tab:hover { background: var(--olive-1); }
.ev-tab:hover .ev-tab__title { color: var(--ev-theme, var(--gold)); }

.ev-tab__link {
  grid-column: 1 / 2;
  grid-row: 1 / 2;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}
.ev-tab__link::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  cursor: pointer;
}

.ev-tab__date {
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ev-theme, var(--blue));
  line-height: 1.4;
}

.ev-tab__title {
  font-family: var(--font-head);
  font-size: 26px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--white);
  margin: 0;
  transition: color 150ms ease;
  word-break: break-word;
}
@media (min-width: 768px)  { .ev-tab__title { font-size: 36px; } }
@media (min-width: 1024px) { .ev-tab__title { font-size: 42px; } }

.ev-tab__live {
  grid-column: 2 / 3;
  grid-row: 1 / 2;
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 22px;
  background: #000;
  color: var(--ev-theme, var(--gold));
  border: 2px solid var(--ev-theme, var(--gold));
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 150ms ease, color 150ms ease;
  -webkit-tap-highlight-color: transparent;
}
.ev-tab__live:hover { background: var(--ev-theme, var(--gold)); color: #000; }
.ev-tab__live:focus-visible { outline: 3px solid var(--white); outline-offset: 3px; }
.ev-tab__live svg { flex-shrink: 0; }

@media (max-width: 767px) {
  .ev-tab {
    grid-template-columns: 1fr;
    padding: 24px 20px;
  }
  .ev-tab__link {
    grid-column: 1 / -1;
    grid-row: 1 / 2;
  }
  .ev-tab__live {
    grid-column: 1 / -1;
    grid-row: 2 / 3;
    width: 100%;
    min-height: 56px;
    font-size: 14px;
  }
}


/* ============================================================
   4. Public — Past events archive grid
   ============================================================ */

.ev-archive {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 768px)  { .ev-archive { grid-template-columns: repeat(2, 1fr); gap: 24px; } }
@media (min-width: 1024px) { .ev-archive { grid-template-columns: repeat(3, 1fr); } }

.ev-archive__item {
  border: 1px solid var(--border-gold);
  background: var(--black);
  position: relative;
  overflow: hidden;
}

.ev-archive__link {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 28px 24px;
  height: 100%;
  text-decoration: none;
  color: inherit;
  position: relative;
  z-index: 1;
}
@media (min-width: 768px) {
  .ev-archive__link { padding: 36px 28px; }
}
.ev-archive__item:hover .ev-archive__title { color: var(--ev-theme, var(--gold)); }

.ev-archive__date {
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ev-theme, var(--blue));
}
@media (min-width: 768px) {
  .ev-archive__date { font-size: 14px; }
}

.ev-archive__title {
  font-family: var(--font-head);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0;
  flex: 1;
  transition: color 150ms ease;
}
@media (min-width: 768px) {
  .ev-archive__title { font-size: 28px; }
}

.ev-archive__cta {
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--white);
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
}
@media (min-width: 768px) {
  .ev-archive__cta { font-size: 14px; }
}

/* Archive backdrop */
.ev-archive__backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.22) saturate(0.75);
  z-index: 0;
}
.ev-archive__item--has-backdrop .ev-archive__title,
.ev-archive__item--has-backdrop .ev-archive__date,
.ev-archive__item--has-backdrop .ev-archive__cta {
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}


/* ============================================================
   5. Public — GoFundMe band
   ============================================================ */

.ev-gofundme {
  padding: var(--pad-y) var(--pad-x);
  background: var(--olive-1);
  border-bottom: 1px solid var(--border-gold);
}
.ev-gofundme__inner {
  max-width: 640px;
}
.ev-gofundme .body {
  color: var(--white);
  margin-bottom: 28px;
}


/* ============================================================
   6. Public — Detail page hero backdrop
   ============================================================ */

.pagehead--has-backdrop {
  position: relative;
  overflow: hidden;
}
.pagehead--has-backdrop .pagehead__backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.25) saturate(0.8);
  z-index: 0;
}
.pagehead--has-backdrop .pagehead__inner,
.pagehead--has-backdrop .pagehead__meta {
  position: relative;
  z-index: 1;
}
.pagehead--has-backdrop .pagehead__title,
.pagehead--has-backdrop .pagehead__body {
  text-shadow: 0 1px 3px rgba(0,0,0,0.9);
}


/* ============================================================
   7. Public — Detail page slideshow
   ============================================================ */

.ev-slideshow-section {
  padding: var(--pad-y) var(--pad-x);
  background: var(--black);
  border-bottom: 1px solid var(--border-gold);
}

.ev-slideshow {
  position: relative;
  margin-top: 8px;
}

.ev-slideshow__track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 4px 0;
}
.ev-slideshow__track::-webkit-scrollbar { display: none; }

.ev-slideshow__slide {
  flex: 0 0 92%;
  scroll-snap-align: center;
  margin: 0;
  background: var(--charcoal);
  border: 1px solid var(--border-soft);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
@media (min-width: 768px)  { .ev-slideshow__slide { flex: 0 0 60%; } }
@media (min-width: 1024px) { .ev-slideshow__slide { flex: 0 0 45%; } }

.ev-slideshow__slide img,
.ev-slideshow__slide video {
  width: 100%;
  height: auto;
  max-height: 70vh;
  object-fit: contain;
  background: #000;
  display: block;
}
.ev-slideshow__slide figcaption {
  padding: 12px 16px;
  font-size: 12px;
  color: var(--gray);
  border-top: 1px solid var(--border-soft);
}

.ev-slideshow__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background: rgba(0, 0, 0, 0.75);
  color: var(--ev-theme, var(--gold));
  border: 1px solid var(--ev-theme, var(--gold));
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  transition: background 150ms ease, color 150ms ease;
}
.ev-slideshow__nav:hover { background: var(--ev-theme, var(--gold)); color: #000; }
.ev-slideshow__nav--prev { left: 8px; }
.ev-slideshow__nav--next { right: 8px; }

@media (max-width: 767px) {
  .ev-slideshow__nav { display: none; }
}


/* ============================================================
   8. Public — Detail page big Twitch CTA
   ============================================================ */

.ev-stream-cta {
  padding: var(--pad-y) var(--pad-x);
  background: var(--black);
  border-bottom: 1px solid var(--border-gold);
  text-align: center;
}
.ev-stream-cta .eyebrow {
  display: block;
  margin-bottom: 12px;
}
.ev-stream-cta .panel__title {
  margin: 0 auto 40px;
  display: block;
}

/* Base .ev-live button — black bg, theme border, theme text */
.ev-live {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 24px;
  background: #000;
  color: var(--ev-theme, var(--gold));
  border: 2px solid var(--ev-theme, var(--gold));
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 150ms ease, color 150ms ease;
  -webkit-tap-highlight-color: transparent;
}
.ev-live:hover { background: var(--ev-theme, var(--gold)); color: #000; }
.ev-live:focus-visible { outline: 3px solid var(--white); outline-offset: 3px; }
.ev-live svg { flex-shrink: 0; }

/* Big variant */
.ev-live--big {
  min-height: 84px;
  padding: 24px 48px;
  border-width: 3px;
  font-size: 20px;
  width: 100%;
  max-width: 500px;
}
@media (min-width: 768px) {
  .ev-live--big {
    min-height: 96px;
    font-size: 24px;
    gap: 18px;
  }
}
@media (min-width: 1024px) {
  .ev-live--big {
    min-height: 108px;
    font-size: 28px;
    padding: 28px 64px;
  }
}

.ev-back {
  padding: 40px var(--pad-x);
  background: var(--black);
}


/* ============================================================
   9. Ops — Admin event UI (list, new, edit)
   ============================================================ */

.ev-admin-actions {
  margin-bottom: 24px;
}

.ev-upload {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-soft);
}

/* Admin media list */
.ev-media-admin {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.ev-media-admin__item {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--border-soft);
  background: var(--charcoal);
}

.ev-media-admin__thumb {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--black);
  border: 1px solid var(--border-soft);
  overflow: hidden;
}
.ev-media-admin__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ev-media-admin__vid {
  font-family: var(--font-head);
  font-size: 9px;
  letter-spacing: 0.15em;
  color: var(--blue);
}

.ev-media-admin__meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.ev-media-admin__name {
  font-size: 12px;
  color: var(--white);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ev-media-admin__sub {
  font-size: 11px;
  color: var(--gray);
}

/* Backdrop preview on edit page */
.ev-backdrop-preview {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-soft);
}
.ev-backdrop-preview img {
  width: 100%;
  max-width: 480px;
  height: auto;
  border: 1px solid var(--border-gold);
  display: block;
}


/* ============================================================
   10. Ops — Color picker
   ============================================================ */

.ev-color-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.ev-color-input {
  width: 64px !important;
  height: 44px;
  padding: 4px !important;
  cursor: pointer;
  border: 1px solid var(--border-soft);
  background: var(--charcoal);
}
.ev-color-input::-webkit-color-swatch-wrapper { padding: 0; }
.ev-color-input::-webkit-color-swatch { border: none; }
.ev-color-input::-moz-color-swatch { border: none; }

.ev-color-preview {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 16px;
  background: #000;
  border: 1px solid var(--border-soft);
}

.ev-color-preview__title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 20px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #000;
  -webkit-text-stroke: 1.5px currentColor;
  paint-order: stroke fill;
}

.ev-color-preview__btn {
  display: inline-block;
  align-self: flex-start;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 8px 14px;
  background: #000;
  border: 1px solid currentColor;
}