/* agenda/agenda.css */
.agenda-vertical-wrap {
  width: 100%;
  max-width: 100%;
  max-height: 600px;
  /* responsive height constraint */
  overflow-x: auto;
  overflow-y: auto;
  border-radius: 12px;
  border: 1px solid rgba(203, 213, 225, .85);
  background: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .05);
  display: flex;
  scroll-behavior: smooth;
  box-sizing: border-box;
}

.agenda-time-col {
  position: sticky;
  left: 0;
  z-index: 20;
  background: #f8fafc;
  min-width: 60px;
  height: max-content;
  border-right: 1px solid rgba(226, 232, 240, 1);
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.03);
}

.agenda-day-col {
  min-width: 160px;
  flex: 1;
  height: max-content;
  border-right: 1px solid rgba(226, 232, 240, 1);
  display: flex;
  flex-direction: column;
}

.agenda-day-col.today {
  background: rgba(249, 115, 22, 0.02);
}

.agenda-day-col.today .agenda-col-header {
  color: #c2410c;
  font-weight: 800;
  border-bottom-color: rgba(249, 115, 22, 0.3);
  background: rgba(255, 237, 213, 0.7);
}

.agenda-col-header {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  color: #0f172a;
  border-bottom: 1px solid rgba(226, 232, 240, 1);
  background: rgba(241, 245, 249, .8);
  position: sticky;
  top: 0;
  z-index: 10;
  transition: background 0.2s;
}

.event-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  background: #f97316;
  color: white;
  font-size: 0.7rem;
  font-weight: 800;
  min-width: 20px;
  height: 20px;
  padding: 0 4px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(249, 115, 22, 0.3);
}

.agenda-day-col.has-events .agenda-col-header {
  color: #c2410c;
  background: rgb(255, 221, 197, 0.8);
  border-bottom-color: rgba(249, 115, 22, 0.2);
}

.agenda-day-col.has-events {
  background: rgba(249, 115, 22, 0.01);
  /* very subtle tint for the whole column */
}

.agenda-time-col .agenda-col-header {
  background: #f1f5f9;
  font-size: 0.8rem;
  color: #475569;
  text-transform: uppercase;
  z-index: 30;
  /* above both sticky row and sticky col */
}

.agenda-slots-container {
  position: relative;
  height: 1020px;
  /* 17 hours * 60px */
}

.agenda-slot-cell {
  height: 60px;
  border-bottom: 1px solid rgba(226, 232, 240, 1);
  box-sizing: border-box;
}

.agenda-time-label {
  height: 60px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 5px 8px 0 0;
  font-size: 0.75rem;
  font-weight: 700;
  color: #64748b;
  border-bottom: 1px solid transparent;
  box-sizing: border-box;
}

.agenda-events-layer {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}

.agenda-event-card {
  position: absolute;
  left: 4px;
  right: 4px;
  background: rgba(249, 115, 22, 0.95);
  color: white;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.8rem;
  overflow: hidden;
  pointer-events: auto;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.25);
  border-left: 4px solid #c2410c;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: background-color 0.14s ease, border-color 0.14s ease;
  z-index: 5;
  contain: layout paint;
  backface-visibility: hidden;
}

.agenda-event-card:hover {
  transform: none;
  z-index: 10;
  border-left-color: #9a3412;
}

.event-time {
  font-size: 0.7rem;
  font-weight: 700;
  opacity: 0.9;
}

.event-title {
  font-weight: 600;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.agenda-legend {
  margin-top: .8rem;
  color: #475569;
  font-size: .9rem;
}

/* Past day card: subtle gray and lowered emphasis */
.subpage-card.past {
  opacity: 0.55;
  filter: grayscale(0.35) contrast(0.95);
  transform: none;
  box-shadow: none;
}

/* Next upcoming event: clear highlight to draw attention */
.subpage-card.next {
  background: linear-gradient(180deg, rgba(255,246,238,0.98), #fff);
  border-left: 4px solid #c2410c;
  box-shadow: 0 10px 30px rgba(194,65,12,0.12);
  transform: translateY(-6px);
  z-index: 5;
}

.subpage-card.next .subpage-name,
.subpage-card.next .subpage-summary {
  color: #0f172a;
}

/* Larger card for highlighted next events */
.subpage-card.large {
  padding: 1rem 1.2rem;
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(255,249,240,1), rgba(255,255,255,1));
  border: 1px solid rgba(249,115,22,0.12);
  box-shadow: 0 12px 30px rgba(194,65,12,0.08);
}

.subpage-card.large .subpage-name {
  font-size: 1.05rem;
  font-weight: 800;
}

.subpage-card.featured-next {
  position: relative;
  padding: 1.2rem 1.3rem 1.15rem;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255,247,237,1), rgba(255,255,255,1));
  border: 1px solid rgba(194,65,12,0.18);
  box-shadow: 0 18px 45px rgba(194,65,12,0.14);
  overflow: hidden;
}

.subpage-card.featured-next::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 10px;
  background: linear-gradient(180deg, #f97316, #c2410c);
}

.featured-next-label {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin-bottom: .7rem;
  padding: .28rem .65rem;
  border-radius: 999px;
  background: rgba(194,65,12,0.1);
  color: #9a3412;
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.subpage-card.featured-next .subpage-name {
  font-size: 1.2rem;
  font-weight: 800;
}

.subpage-card.featured-next .subpage-summary strong {
  font-size: 1.15rem;
}

.subpage-card.follow-up {
  background: rgba(255,255,255,0.94);
  border-left: 3px solid rgba(249,115,22,0.18);
}

.subpage-card.follow-up:hover {
  transform: none;
}

/* collapsed past list */
.past-list {
  overflow: hidden;
  transition: max-height 0.28s ease, opacity 0.28s ease;
  max-height: 2000px;
}
.past-list.collapsed {
  max-height: 0;
  opacity: 0;
}

.agenda-sections {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
}

.agenda-upcoming h3, .agenda-remaining h3, .agenda-past h3 {
  margin-bottom: .6rem;
}

.agenda-upcoming {
  display: grid;
  gap: .8rem;
}

.agenda-remaining .subpages-grid {
  gap: .8rem;
}

/* subtle pulse for focus */
.pulse {
  animation: pulse-zoom 1.8s ease-in-out;
}
@keyframes pulse-zoom {
  0% { transform: translateY(-6px) scale(1); }
  50% { transform: translateY(-6px) scale(1.02); }
  100% { transform: translateY(-6px) scale(1); }
}