/* Agenda widget — shared between the dashboard and the /v2 mock. */

/* Agenda */
.agenda-list { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; justify-content: flex-start; }
/* Reset global section padding (rule at line ~1329) for nested agenda sections. */
section.agenda-section,
section.agenda-day { padding: 0; }
.agenda-section { display: flex; flex-direction: column; gap: 6px; }
.agenda-section + .agenda-section { margin-top: 4px; }
.agenda-section-label {
  margin: 0;
  font: 700 11px/1.2 "Source Serif 4", Georgia, serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.agenda-day { padding-top: 0; border-top: none; }
.agenda-day + .agenda-day { padding-top: 8px; }
.agenda-day-label { font-weight: 600; font-size: 13px; color: var(--primary-700); margin-bottom: 4px; }
.agenda-items {
  display: flex; flex-direction: column;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.agenda-item {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 18px;
  padding: 12px 14px;
  border: none;
  border-bottom: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  text-align: left;
  align-items: start;
  font: inherit;
  color: inherit;
  transition: background 0.12s ease;
}
.agenda-item:last-child { border-bottom: none; }
.agenda-item:hover,
.agenda-item:focus-visible { background: var(--primary-50); outline: none; }
.agenda-item.is-active { background: var(--primary-100); }
.agenda-item-past .agenda-service {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: var(--muted);
}
.agenda-item-past .agenda-time,
.agenda-item-past .agenda-meta { color: var(--muted); }
.agenda-time {
  display: flex;
  flex-direction: column;
  font-family: var(--mono, "Geist Mono", monospace);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink);
  padding-top: 3px;
  white-space: nowrap;
  line-height: 1.4;
}
.agenda-time-start { color: var(--ink); }
.agenda-time-end { color: var(--muted); }
.agenda-body { min-width: 0; }
.agenda-service {
  font-weight: 500;
  font-size: 15px;
  color: var(--ink);
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.agenda-meta {
  font-family: var(--mono, "Geist Mono", monospace);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.agenda-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 9px;
  border-radius: 2px;
  border: 1px solid currentColor;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
}
.agenda-pill::before { content: "●"; font-size: 8px; }
.agenda-pill-sage { color: var(--sage); }
.agenda-pill-brass { color: var(--brass); }
.agenda-pill-midnight { color: var(--midnight); }
.agenda-pill-signal { color: var(--signal); }
.agenda-pill-muted { color: var(--muted); }
.agenda-pill-live { animation: agendaPillPulse 1.6s ease-in-out infinite; }
@keyframes agendaPillPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}
.agenda-empty { color: var(--muted); font-size: 14px; margin-top: 10px; }
.agenda-helper { color: var(--muted); font-size: 13px; margin-top: 12px; }
.agenda-detail { border-top: 1px solid var(--border); margin-top: 18px; padding-top: 16px; }
.agenda-detail h3 { margin-bottom: 10px; }
.agenda-detail-list { display: flex; flex-direction: column; gap: 8px; }
.agenda-detail-row { display: flex; gap: 8px; font-size: 14px; }
.agenda-detail-label { width: 120px; color: var(--muted); font-weight: 600; }
.agenda-detail-value { flex: 1; color: var(--ink); }
.agenda-detail-empty { color: var(--muted); font-style: italic; }

.agenda-detail-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 5000;
}

.agenda-detail-card {
  background: #fff;
  border-radius: 18px;
  padding: 20px;
  width: min(480px, 100%);
  max-height: calc(100% - 40px);
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.25);
  animation: agendaDetailIn 160ms ease;
}

.agenda-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.agenda-detail-header .close-btn {
  font-size: 20px;
  line-height: 1;
  width: 36px;
  height: 36px;
  padding: 0;
}

.agenda-detail-overlay[hidden] {
  display: none;
}

@keyframes agendaDetailIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 640px) {
  .agenda-section { gap: 8px; }
  .agenda-section-label { font-size: 11px; }
  .agenda-item {
    grid-template-columns: 1fr auto;
    grid-template-areas: "time pill" "body body";
    gap: 6px 12px;
  }
  .agenda-item .agenda-time { grid-area: time; padding-top: 0; }
  .agenda-item .agenda-body { grid-area: body; }
  .agenda-item .agenda-pill { grid-area: pill; }
  .agenda-detail-row { flex-direction: column; }
  .agenda-detail-label { width: auto; }
  .agenda-detail-card { max-width: 100%; padding: 18px; }
}

