/* Phoenix Month Grid — TEC-style full-page month calendar (KofC navy/gold) */

.phx-mg-wrap { width: 100%; }

.phx-mg {
  background: #fff;
  border: 1px solid #CBD5E1;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  color: #0F172A;
  font-family: "Poppins", system-ui, sans-serif;
}

/* ── Head ── */
.phx-mg__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 20px;
  background: #003366;
  color: #fff;
}
.phx-mg__title {
  font-family: "Cinzel", Georgia, serif;
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 0.02em;
}

/* View toggle (Grid | List) */
.phx-mg__views {
  display: inline-flex;
  gap: 0;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  overflow: hidden;
}
.phx-mg__view-toggle {
  color: #E2E8F0;
  font-weight: 700;
  font-size: 0.8rem;
  text-decoration: none;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.06);
}
.phx-mg__view-toggle + .phx-mg__view-toggle { border-left: 1px solid rgba(255, 255, 255, 0.35); }
.phx-mg__view-toggle:hover,
.phx-mg__view-toggle:focus { color: #fff; background: rgba(255, 182, 18, 0.25); }
.phx-mg__view-toggle--active { background: #FFB612; color: #003366; }

/* Month nav */
.phx-mg__nav { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.phx-mg__navlink {
  color: #FFB612;
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none;
  padding: 6px 12px;
  border: 1px solid rgba(255, 182, 18, 0.4);
  border-radius: 6px;
  white-space: nowrap;
}
.phx-mg__navlink:hover,
.phx-mg__navlink:focus { background: #FFB612; color: #003366; }
.phx-mg__navlink--today { color: #fff; border-color: rgba(255, 255, 255, 0.35); }
.phx-mg__navlink--today:hover,
.phx-mg__navlink--today:focus { background: #002244; color: #fff; }

/* ── Day-of-week header ── */
.phx-mg__dow,
.phx-mg__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}
.phx-mg__dow {
  border-bottom: 1px solid #CBD5E1;
  background: #F1F5F9;
}
.phx-mg__dow-label {
  padding: 8px 4px;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #003366;
}

/* ── Cells ── */
.phx-mg__cell {
  aspect-ratio: 1 / 1;
  min-height: 110px;
  padding: 6px 6px 8px;
  border-right: 1px solid #E2E8F0;
  border-bottom: 1px solid #E2E8F0;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow: hidden;
}
.phx-mg__cell:nth-child(7n) { border-right: none; }
.phx-mg__cell--out { background: #F8FAFC; color: #94A3B8; }
.phx-mg__cell--hasevents { background: #F8FAFC; }
.phx-mg__cell--today {
  box-shadow: inset 0 0 0 2px #FFB612;
  background: #FFFDF5;
}
.phx-mg__daynum {
  font-size: 0.85rem;
  font-weight: 600;
  align-self: flex-start;
  min-width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  margin-bottom: 2px;
}
.phx-mg__cell--today .phx-mg__daynum { background: #FFB612; color: #003366; }

/* ── Event entries (chips) ── */
.phx-mg__event {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  background: #fff;
  border: 1px solid #E2E8F0;
  border-left: 3px solid #4bb5d8;
  border-radius: 4px;
  padding: 3px 6px 4px;
  text-decoration: none;
  font-size: 0.72rem;
  line-height: 1.25;
  overflow: hidden;
}
.phx-mg__event:hover,
.phx-mg__event:focus { background: #f8fafc; border-color: #CBD5E1; border-left-color: #003366; }
.phx-mg__entry-text {
  display: block;
  width: 100%;
  min-width: 0;
}
.phx-mg__entry-time {
  color: #64748B;
  font-weight: 600;
  font-size: 0.66rem;
  white-space: nowrap;
  display: block;
  margin-bottom: 1px;
}
.phx-mg__event--allday .phx-mg__entry-time { display: none; }
.phx-mg__entry-title {
  color: #003366;
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  line-height: 1.2;
}
.phx-mg__dot { flex-shrink: 0; width: 0; height: 0; display: none; }

/* "+N more" */
.phx-mg__more {
  color: #0056B3;
  font-size: 0.7rem;
  font-weight: 700;
  text-decoration: none;
  padding: 1px 4px;
}
.phx-mg__more:hover,
.phx-mg__more:focus { color: #FFB612; }

/* ── Month list (below grid / list view) ── */
.phx-mg__list { padding: 8px 20px 20px; background: #fff; }
.phx-mg__daygroup { padding: 14px 0 4px; border-bottom: 1px solid #F1F5F9; }
.phx-mg__daygroup:last-child { border-bottom: none; }
.phx-mg__daygroup-title {
  margin: 0 0 8px !important;
  font-family: "Poppins", system-ui, sans-serif !important;
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #003366;
}
.phx-mg__row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  border-left: 3px solid #4bb5d8;
  background: #F8FAFC;
  border-radius: 4px;
  padding: 8px 12px;
  margin-bottom: 8px;
  text-decoration: none;
}
.phx-mg__row .phx-mg__dot { display: inline-block; width: 8px; height: 8px; border-radius: 999px; align-self: center; }
.phx-mg__row:hover,
.phx-mg__row:focus { background: #F1F5F9; }
.phx-mg__row .phx-mg__entry-time { color: #64748B; }
.phx-mg__row .phx-mg__entry-title { white-space: normal; font-size: 0.95rem; }
.phx-mg__empty { color: #64748B; font-size: 0.95rem; padding: 12px 0; }

/* Small screens */
@media (max-width: 782px) {
  .phx-mg__cell { aspect-ratio: auto; min-height: 62px; padding: 3px; gap: 2px; }
  .phx-mg__event { font-size: 0.58rem; padding: 2px 3px; border-left-width: 2px; }
  .phx-mg__entry-time { display: block; font-size: 0.6rem; }
  .phx-mg__entry-title { -webkit-line-clamp: 2; }
  .phx-mg__title { font-size: 1.05rem; }
  .phx-mg__more { display: none; }
}

/* Print */
@media print {
  .phx-mg__nav, .phx-mg__views { display: none; }
  .phx-mg__cell { min-height: 70px; }
}
.phx-mg__badge {
  display: inline-block;
  background: #FFFDF5;
  color: #003366;
  border: 1px solid #FFB612;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 1px 7px;
  margin-top: 2px;
}
