/* ============================================================
   Club Manifest — Calendar Theme CSS
   ============================================================ */

/* ------------------------------------------------------------
   EVENT CARDS — IMAGE OVERRIDE (original behavior preserved)
   ------------------------------------------------------------ */
.card .thumb {
  aspect-ratio: 1 / 1;
  background: rgba(255,255,255,0.04);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background-color: transparent;
}

/* ============================================================
   MONTH VIEW — GLOBAL LAYOUT
   ============================================================ */

#month-view {
  margin-top: 30px;
}

/* Navigation bar */
.cm-month-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.cm-month-nav h2 {
  font-size: 22px;
  font-weight: 900;
  margin: 0 12px;
  color: var(--ink);
}

.cm-month-nav button {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink);
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
}

.cm-month-nav button:hover {
  background: rgba(255,255,255,0.08);
}

/* ============================================================
   WEEKDAY HEADER
   ============================================================ */

.cm-month-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 6px;
}

.cm-month-header-row .cm-month-dayname {
  padding: 6px 0;
  text-align: center;
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase; /* ALL CAPS */
  background: transparent !important; /* remove boxes */
  border: none !important;
}

/* ============================================================
   DAY CELLS
   ============================================================ */

.cm-month-cell {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  min-height: 120px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  position: relative;
  text-align: left; /* left-justified content */
}

.cm-month-empty {
  background: transparent;
  border: none;
}

/* Day number (white, left justified) */
.cm-month-date {
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 6px;
  text-align: left;
}

/* Highlight current day */
.cm-month-day--today {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

/* ============================================================
   EVENT LINES (NO TAGS — TIME + TITLE + CLUB)
   ============================================================ */

.cm-month-events {
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Wrapped event line container */
.cm-month-eventline {
  display: block;
  padding: 3px 5px;
  border-radius: 6px;
  background: rgba(255,255,255,0.05);
  text-align: left;
  white-space: normal;
}

/* Event line text */
.cm-month-eventtitle {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  white-space: normal; /* wrap */
  text-align: left;
}

/* “+ more” indicator */
.cm-month-more {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}

/* ============================================================
   MODAL STYLES
   ============================================================ */

#eventModal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 5000;
}

#eventModal.hidden {
  display: none;
}

#eventModal .cm-modal-inner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  max-width: 600px;
  width: 100%;
  color: var(--ink);
}

.cm-modal-heading {
  font-size: 22px;
  font-weight: 900;
  margin: 0 0 12px;
}

.cm-modal-event {
  margin-bottom: 18px;
}

.cm-modal-event:last-of-type {
  margin-bottom: 0;
}

.cm-modal-title {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 4px;
}

.cm-modal-meta {
  font-size: 14px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.cm-modal-desc {
  margin: 0 0 8px;
  color: var(--ink);
}

.cm-modal-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

/* ============================================================
   VIEW TOGGLE BUTTONS
   ============================================================ */

#viewEventsBtn,
#viewMonthBtn {
  font-size: 14px;
  font-weight: 800;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
}

#viewEventsBtn.secondary,
#viewMonthBtn.secondary {
  background: transparent;
  color: var(--muted);
}

#viewEventsBtn[aria-pressed="true"],
#viewMonthBtn[aria-pressed="true"] {
  background: var(--accent);
  color: #1b110d;
  border-color: var(--accent);
}

/* ============================================================
   UTILITIES
   ============================================================ */
.hidden {
  display: none !important;
}
