/* ===== Venue Calendar Frontend — CKCC Theme ===== */
/* Uses the same design tokens and patterns as the CKCC block theme */

.cem-frontend {
  font-family: "Poppins", Helvetica, sans-serif;
  color: var(--text, #241605);
}

/* Controls bar */
.cem-fe-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
  background: var(--surface, #fff);
  border: 1px solid var(--border-strong, #1b4d3e);
  border-radius: var(--radius, 7px);
  padding: 16px 20px;
}

.cem-fe-search-wrap { position: relative; }

.cem-fe-search {
  width: 100%;
  padding: 10px 16px;
  border: 1px solid var(--border, #cdd9d2);
  border-radius: var(--radius, 7px);
  font-size: .9rem;
  font-family: inherit;
  color: var(--text, #241605);
  background: var(--surface, #fff);
  box-sizing: border-box;
  transition: border-color .15s;
}
.cem-fe-search:focus {
  outline: none;
  border-color: var(--pitch-green, #1b4d3e);
  box-shadow: 0 0 0 3px rgba(27,77,62,.1);
}

/* Filter pills — match .team-pill */
.cem-fe-filters,
.cem-fe-daterange {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cem-filter-pill,
.cem-range-pill {
  display: inline-flex;
  align-items: center;
  font-family: "Outfit", Arial, sans-serif;
  font-weight: 700;
  font-size: .78rem;
  color: var(--maroon, #4f0101);
  background: var(--surface, #fff);
  border: 1px solid var(--border-strong, #1b4d3e);
  border-radius: 999px;
  padding: .45rem 1rem;
  cursor: pointer;
  text-decoration: none;
  transition: all 120ms cubic-bezier(0.2, 0.65, 0.3, 1);
}

.cem-filter-pill:hover,
.cem-range-pill:hover {
  background: var(--pitch-green, #1b4d3e);
  color: #fff;
  border-color: var(--pitch-green, #1b4d3e);
  transform: translateY(-2px);
  box-shadow: 0 6px 14px -6px rgba(27,77,62,.35);
}

.cem-filter-pill--active,
.cem-range-pill--active {
  background: var(--maroon, #4f0101);
  color: #fff;
  border-color: var(--maroon, #4f0101);
}

.cem-filter-pill--active:hover,
.cem-range-pill--active:hover {
  background: var(--maroon-dark, #380000);
  border-color: var(--maroon-dark, #380000);
}

/* Month headings — match .section-label */
.cem-month-group { margin-bottom: 32px; }

.cem-month-heading {
  font-family: "Outfit", Arial, sans-serif;
  font-weight: 700;
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--pitch-green, #1b4d3e);
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: 14px;
}
.cem-month-heading::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-strong, #1b4d3e);
  opacity: .45;
}

/* Event cards — match .event-card */
.cem-event-card {
  display: grid;
  grid-template-columns: 60px 1fr auto auto;
  align-items: center;
  gap: 16px;
  background: var(--surface, #fff);
  border: 1px solid var(--border-strong, #1b4d3e);
  border-left: 4px solid var(--cem-type-color, var(--maroon, #4f0101));
  border-radius: var(--radius, 7px);
  padding: 14px 16px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: transform 220ms cubic-bezier(0.2, 0.65, 0.3, 1),
              box-shadow 220ms cubic-bezier(0.2, 0.65, 0.3, 1);
}

.cem-event-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px -12px rgba(27,77,62,.3);
}

.cem-card--cancelled {
  opacity: .55;
}
.cem-card--cancelled .cem-card-title {
  text-decoration: line-through;
}

/* Date column */
.cem-card-date {
  text-align: center;
  flex-shrink: 0;
}
.cem-card-date__day {
  font-family: "Outfit", Arial, sans-serif;
  font-weight: 700;
  font-size: .65rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted, #5b5347);
}
.cem-card-date__num {
  font-family: "Outfit", Arial, sans-serif;
  font-weight: 800;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--cem-type-color, var(--maroon, #4f0101));
  margin-top: 2px;
}

/* Card body */
.cem-card-body { min-width: 0; }

.cem-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
}

/* Type chip — match .card-kicker */
.cem-type-chip {
  display: inline-block;
  font-family: "Outfit", Arial, sans-serif;
  font-weight: 700;
  font-size: .65rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #fff;
  background: var(--cem-type-color, var(--maroon, #4f0101));
  border-radius: 3px;
  padding: 2px 7px;
}

.cem-team-chip {
  display: inline-block;
  font-family: "Outfit", Arial, sans-serif;
  font-weight: 700;
  font-size: .65rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--pitch-green, #1b4d3e);
  border: 1px solid var(--pitch-green, #1b4d3e);
  border-radius: 999px;
  padding: 1px 8px;
}

.cem-cancelled-chip {
  display: inline-block;
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #b91c1c;
  border: 1px solid #b91c1c;
  border-radius: 3px;
  padding: 1px 6px;
}

/* H/A dots */
.cem-ha-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: .6rem;
  font-weight: 800;
  color: #fff;
}
.cem-ha--home { background: var(--pitch-green, #1b4d3e); }
.cem-ha--away { background: var(--maroon, #4f0101); }

.cem-card-title {
  font-family: "Outfit", Arial, sans-serif;
  font-weight: 800;
  font-size: 1rem;
  color: var(--text, #241605);
  margin: 0 0 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cem-card-details {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cem-card-detail {
  font-size: .8rem;
  color: var(--text-muted, #5b5347);
}

.cem-result {
  font-weight: 600;
  color: var(--pitch-green, #1b4d3e);
}

.cem-card-link {
  font-weight: 600;
  color: #0a5f8a;
  text-decoration: none;
}
.cem-card-link:hover { text-decoration: underline; }

/* Weather column — accred-pill style */
.cem-card-weather {
  flex-shrink: 0;
  text-align: center;
  min-width: 48px;
}

.cem-weather-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-family: "Outfit", Arial, sans-serif;
  font-weight: 700;
  font-size: .65rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--pitch-green, #1b4d3e);
  border: 1px solid var(--pitch-green, #1b4d3e);
  border-radius: 6px;
  padding: 5px 7px;
}

.cem-weather-badge__icon { font-size: 1.1rem; line-height: 1; }
.cem-weather-badge__temp { font-size: .7rem; color: var(--text-muted, #5b5347); }

/* Expand chevron */
.cem-card-expand {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--text-muted, #5b5347);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color .15s;
}
.cem-card-expand:hover { color: var(--maroon, #4f0101); }

/* Empty state */
.cem-empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted, #5b5347);
}
.cem-empty-state__icon { font-size: 3rem; margin-bottom: 12px; opacity: .5; }
.cem-empty-state p { font-size: .95rem; margin: 0; }

/* Modal */
.cem-fe-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 60px 20px 20px;
}

.cem-fe-modal__overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(2px);
}

.cem-fe-modal__box {
  position: relative;
  background: var(--surface, #fff);
  border-radius: var(--radius, 7px);
  width: 100%;
  max-width: 520px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 24px 60px -12px rgba(0,0,0,.35);
  border: 1px solid var(--border-strong, #1b4d3e);
}

.cem-fe-modal__close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--text-muted, #5b5347);
  line-height: 1;
  z-index: 1;
}
.cem-fe-modal__close:hover { color: var(--maroon, #4f0101); }

.cem-fe-modal__header {
  background: var(--maroon, #4f0101);
  color: var(--cream, #f5f0e8);
  padding: 24px 24px 20px;
  border-radius: var(--radius, 7px) var(--radius, 7px) 0 0;
}

.cem-fe-modal__type-badge {
  display: inline-block;
  font-family: "Outfit", Arial, sans-serif;
  font-weight: 700;
  font-size: .65rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--cream, #f5f0e8);
  border: 1px solid rgba(245,240,232,.45);
  border-radius: 3px;
  padding: 2px 8px;
  margin-bottom: 8px;
}

.cem-fe-modal__title {
  font-family: "Outfit", Arial, sans-serif;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--cream, #f5f0e8);
  margin: 0 0 6px;
}

.cem-fe-modal__date {
  font-size: .85rem;
  color: rgba(245,240,232,.75);
  margin: 0;
}

.cem-fe-modal__body {
  padding: 20px 24px;
}

.cem-fe-modal__body dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 16px;
  margin: 0;
  font-size: .9rem;
}

.cem-fe-modal__body dt {
  font-family: "Outfit", Arial, sans-serif;
  font-weight: 700;
  font-size: .7rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted, #5b5347);
  padding-top: 2px;
}

.cem-fe-modal__body dd {
  color: var(--text, #241605);
  margin: 0;
  font-weight: 500;
}

.cem-fe-modal__weather {
  padding: 12px 24px 20px;
  border-top: 1px solid var(--border, #cdd9d2);
}

/* Featured events */
.cem-featured-wrap { display: flex; flex-direction: column; gap: 24px; }

/* Primary — match .feature-split */
.cem-featured-primary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--surface, #fff);
  border: 1px solid var(--border-strong, #1b4d3e);
  border-radius: var(--radius, 7px);
  overflow: hidden;
  transition: box-shadow 220ms cubic-bezier(0.2, 0.65, 0.3, 1);
}
.cem-featured-primary:hover {
  box-shadow: 0 16px 30px -16px rgba(27,77,62,.45);
}

.cem-featured-primary__img {
  background-size: cover;
  background-position: center;
  min-height: 360px;
}

.cem-featured-primary__content {
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  justify-content: center;
}

/* Stat badge — match .accred-pill */
.cem-featured-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-family: "Outfit", Arial, sans-serif;
  font-weight: 700;
  font-size: .68rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--pitch-green, #1b4d3e);
  border: 1px solid var(--pitch-green, #1b4d3e);
  border-radius: 999px;
  padding: .35rem .8rem;
  align-self: flex-start;
}
.cem-featured-badge__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold, #f5a21e);
  flex-shrink: 0;
}

.cem-featured-section-label {
  font-family: "Outfit", Arial, sans-serif;
  font-weight: 700;
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--maroon, #4f0101);
}

.cem-featured-primary__title {
  font-family: "Outfit", Arial, sans-serif;
  font-weight: 800;
  font-size: 1.55rem;
  color: var(--text, #241605);
  margin: 0;
  letter-spacing: -.02em;
}

.cem-featured-primary__desc {
  color: var(--text-muted, #5b5347);
  font-size: .95rem;
  line-height: 1.6;
}

/* Secondary cards — match .event-card */
.cem-featured-secondary-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.cem-featured-secondary {
  background: var(--surface, #fff);
  border: 1px solid var(--border-strong, #1b4d3e);
  border-radius: var(--radius, 7px);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  position: relative;
  transition: transform 220ms cubic-bezier(0.2, 0.65, 0.3, 1),
              box-shadow 220ms cubic-bezier(0.2, 0.65, 0.3, 1);
}
.cem-featured-secondary::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 1rem;
  right: 1rem;
  height: 3px;
  background: var(--gold, #f5a21e);
  border-radius: 0 0 3px 3px;
}
.cem-featured-secondary:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 30px -16px rgba(27,77,62,.45);
}

.cem-featured-secondary__label {
  font-family: "Outfit", Arial, sans-serif;
  font-weight: 700;
  font-size: .6rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-muted, #5b5347);
}

.cem-featured-secondary__type {
  font-family: "Outfit", Arial, sans-serif;
  font-weight: 700;
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--maroon, #4f0101);
}

.cem-featured-secondary__title {
  font-family: "Outfit", Arial, sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text, #241605);
  margin: 0;
  letter-spacing: -.01em;
}

.cem-featured-secondary__date {
  font-size: .82rem;
  color: var(--text-muted, #5b5347);
  margin: 0;
}

.cem-featured-secondary__desc {
  font-size: .88rem;
  color: var(--text-muted, #5b5347);
  margin: 0;
  flex: 1;
}

/* CTA buttons */
.cem-fe-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: "Outfit", Arial, sans-serif;
  font-weight: 700;
  font-size: .86rem;
  border-radius: var(--radius, 7px);
  padding: .75rem 1.4rem;
  text-decoration: none;
  transition: all 120ms cubic-bezier(0.2, 0.65, 0.3, 1);
  border: 1px solid transparent;
  cursor: pointer;
  align-self: flex-start;
}
.cem-fe-cta-btn--primary {
  background: var(--maroon, #4f0101);
  color: var(--cream, #f5f0e8);
  box-shadow: 0 2px 0 var(--maroon-dark, #380000);
}
.cem-fe-cta-btn--primary:hover {
  background: var(--maroon-dark, #380000);
  transform: translateY(-3px);
  box-shadow: 0 8px 16px -6px rgba(79,1,1,.45);
}
.cem-fe-cta-btn--outline {
  background: transparent;
  color: var(--pitch-green, #1b4d3e);
  border-color: var(--pitch-green, #1b4d3e);
}
.cem-fe-cta-btn--outline:hover {
  background: var(--pitch-green, #1b4d3e);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 8px 16px -6px rgba(27,77,62,.35);
}

/* Venue calendar card */
.cem-featured-secondary-row--cal { grid-template-columns: 1fr; margin-top: 0; }
.cem-featured-cal-card {
  background: var(--surface, #fff);
  border: 1px solid var(--pitch-green, #1b4d3e);
  border-radius: var(--radius, 7px);
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  transition: box-shadow 200ms;
}
.cem-featured-cal-card:hover { box-shadow: 0 8px 24px -8px rgba(27,77,62,.25); }
.cem-featured-cal-card__icon { font-size: 2.2rem; flex-shrink: 0; }
.cem-featured-cal-card__label {
  font-weight: 700; font-size: .65rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--pitch-green, #1b4d3e); margin-bottom: 4px;
}
.cem-featured-cal-card__title {
  font-family: "Outfit", Arial, sans-serif; font-weight: 800; font-size: 1.1rem;
  color: var(--text, #241605); margin: 0 0 6px; letter-spacing: -.01em;
}
.cem-featured-cal-card__desc { font-size: .88rem; color: var(--text-muted, #5b5347); margin: 0; }
.cem-featured-cal-card > div:nth-child(2) { flex: 1; }

.cem-featured-footer {
  text-align: center;
  padding-top: 8px;
}

.cem-fe-view-all {
  font-family: "Outfit", Arial, sans-serif;
  font-weight: 700;
  font-size: .85rem;
  color: var(--maroon, #4f0101);
  text-decoration: none;
  letter-spacing: .01em;
}
.cem-fe-view-all:hover { color: var(--maroon-dark, #380000); text-decoration: underline; }

/* Responsive */
@media (max-width: 900px) {
  .cem-featured-secondary-row { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
  .cem-event-card {
    grid-template-columns: 48px 1fr;
    grid-template-rows: auto auto;
  }
  .cem-card-weather,
  .cem-card-expand {
    display: none;
  }
  .cem-featured-primary,
  .cem-featured-secondary-row {
    grid-template-columns: 1fr;
  }
  .cem-featured-primary__img { min-height: 220px; }
}
