/* ============================================================
   Agenda schedule layout (cards rendered by agenda.js)
   Uses its own "ag-" class names so it doesn't collide with the
   older session-card / session-headshot rules in HeroAgenda.css.
   ============================================================ */

.agenda-wrapper {
  --ag-accent: rgb(0, 159, 206);
  --ag-accent-dark: rgb(0, 95, 130);
  --ag-border: #cfd5da;
  --ag-muted: #5b6168;
  --ag-time-col: 170px;
}

.agenda-loading { padding: 40px; text-align: center; color: #767676; }
.agenda-error {
  padding: 20px; margin: 20px 0;
  background: #fdecea; border: 1px solid #f14a45; border-radius: 8px; color: #611a15;
}

.ag-day { margin-top: 10px; }

/* ---------- Time block: time on the left, cards on the right ---------- */

.ag-block {
  display: grid;
  grid-template-columns: var(--ag-time-col) minmax(0, 1fr);
  gap: 24px;
  padding: 22px 0;
  border-top: 1px solid #e4e7ea;
}

.ag-day > .ag-block:first-child { border-top: 0; }

.ag-time {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 4px;
  align-self: start;
  position: sticky;      /* stays visible while scrolling long blocks */
  top: 16px;
}

.ag-time-range {
  font-weight: 700;
  font-size: 1rem;
  color: #222;
  line-height: 1.3;
}

.ag-time-label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ag-accent-dark);
}

.ag-time-note {
  font-size: 0.8rem;
  font-style: italic;
  color: var(--ag-muted);
}

.ag-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

/* ---------- Session card ---------- */

.ag-card {
  background: #fff;
  border: 1px solid var(--ag-border);
  border-radius: 10px;
  padding: 24px 28px;
}

.ag-card--keynote {
  border: 2px solid var(--ag-accent);
  box-shadow: 0 4px 14px rgba(0, 159, 206, 0.15);
}

.ag-card p { margin: 0; color: #333; }

.ag-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 28px;
}

.ag-card-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ag-badge {
  align-self: flex-start;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #fff;
  background: var(--ag-accent);
  padding: 3px 10px;
  border-radius: 50px;
}

.ag-title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  color: #222;
  margin: 0 0 4px;
}

.ag-speakers { font-weight: 600; }
.ag-role,
.ag-location { font-size: 0.92rem; color: var(--ag-muted) !important; }
.ag-meta-label { font-weight: 600; }

.ag-company a,
.ag-location a,
.ag-qr-label a {
  color: var(--ag-accent-dark);
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 95, 130, 0.35);
}

.ag-company a:hover,
.ag-location a:hover,
.ag-qr-label a:hover { color: var(--ag-accent); border-bottom-color: var(--ag-accent); }

.ag-toggle {
  align-self: flex-start;
  margin-top: 12px;
  padding: 8px 20px;
  font-size: 0.95rem;
  color: #fff;
  background: #222;
  border: 1px solid #222;
  border-radius: 50px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.ag-toggle:hover { background: var(--ag-accent-dark); border-color: var(--ag-accent-dark); }
.ag-toggle[aria-expanded="true"] { background: #fff; color: #222; }
.ag-toggle:focus-visible { outline: 3px solid var(--ag-accent); outline-offset: 2px; }

/* ---------- Right side: headshots or logo ---------- */

.ag-media {
  flex: 0 0 auto;
  max-width: 50%;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 16px;
}

.ag-headshot {
  margin: 0;
  width: 150px;
  text-align: center;
}

.ag-headshot img {
  display: block;
  width: 150px;
  height: 150px;
  margin: 0 auto 8px;
  border-radius: 50%;
  object-fit: cover;
}

.ag-card--keynote .ag-headshot,
.ag-card--keynote .ag-headshot img { width: 190px; }
.ag-card--keynote .ag-headshot img { height: 190px; }

.ag-headshot figcaption {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.3;
  color: #444;
}

/* Logos are rectangles: never crop them into a circle */
.ag-logo {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  border-radius: 0;
  object-fit: contain;
}

.ag-logo-side {
  width: 220px;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ag-logo-side .ag-logo { max-width: 220px; max-height: 110px; }

/* ---------- Expanded "More info" area ---------- */

.ag-details {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid #e3e5e7;
}

.ag-details[hidden] { display: none; }

.ag-details-body p { margin: 0 0 12px; line-height: 1.6; }
.ag-details-body ul,
.ag-details-body ol { margin: 0 0 12px; padding-left: 1.25rem; }
.ag-details-body h2,
.ag-details-body h3,
.ag-details-body h4 { font-size: 1.05rem; color: #222; margin: 16px 0 6px; text-align: left !important; }

/* Bottom-left: company logo (when a headshot is used) + survey QR */
.ag-details-footer {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 28px;
  margin-top: 18px;
}

.ag-logo-foot .ag-logo { max-width: 180px; max-height: 70px; }

.ag-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.ag-qr img {
  display: block;
  width: 110px;
  height: 110px;
  object-fit: contain;
  border-radius: 0;
}

.ag-qr-label { font-size: 0.8rem; font-weight: 600; }

/* ---------- Breaks / lunch: no card outline ---------- */

.ag-block--break {
  margin: 4px -16px;
  padding: 14px 16px;
  background: #f3f6f8;
  border-top: 0;
  border-radius: 8px;
}

.ag-block--break + .ag-block { border-top: 0; }
.ag-block--break .ag-time { position: static; }

.ag-break-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 4px;
}

.ag-break-info p { margin: 0; color: #333; }
.ag-break-title { font-weight: 700; font-size: 1.05rem; }
.ag-break-details { font-size: 0.92rem; font-style: italic; color: var(--ag-muted); }
.ag-break-details p { margin: 0 0 4px; color: var(--ag-muted); }

/* ---------- Responsive ---------- */

@media (max-width: 767px) {
  .ag-block {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .ag-time {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 12px;
  }

  .ag-card { padding: 18px; }

  .ag-card-top {
    flex-direction: column-reverse;   /* headshot/logo above the text */
    gap: 16px;
  }

  .ag-media {
    max-width: 100%;
    justify-content: flex-start;
  }

  .ag-headshot,
  .ag-headshot img,
  .ag-card--keynote .ag-headshot,
  .ag-card--keynote .ag-headshot img { width: 120px; }
  .ag-headshot img,
  .ag-card--keynote .ag-headshot img { height: 120px; }

  .ag-logo-side { width: auto; min-height: 0; justify-content: flex-start; }
  .ag-logo-side .ag-logo { max-width: 180px; max-height: 80px; }
}

/* ---------- Extra tab: sheet shown as a plain table ---------- */

.ag-sheet { margin-top: 10px; }

.ag-sheet-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--ag-border);
  border-radius: 10px;
}

.ag-sheet-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 0.92rem;
  background: #fff;
}

.ag-sheet-table th,
.ag-sheet-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e4e7ea;
  text-align: left;
  vertical-align: top;
}

.ag-sheet-table th {
  background: #2c3e50;
  color: #fff;
  font-weight: 700;
  position: sticky;
  top: 0;
}

.ag-sheet-table td:first-child,
.ag-sheet-table th:first-child {
  font-weight: 700;
  white-space: nowrap;
}

.ag-sheet-table tbody tr:nth-child(even) td { background: #f7f9fa; }
.ag-sheet-table .ag-sheet-span td { background: #e8f4f8 !important; font-weight: 600; }
.ag-sheet-table .ag-sheet-span td[colspan] { text-align: center; }

.ag-sheet-link { margin-top: 10px; font-size: 0.9rem; }

/* ---------- Multiple presenters ---------- */

/* Several headshots sit side by side; shrink them a little so they fit */
.ag-media--multi { max-width: 60%; flex-wrap: nowrap; }
.ag-media--multi .ag-headshot,
.ag-media--multi .ag-headshot img { width: 120px; }
.ag-media--multi .ag-headshot img { height: 120px; }
.ag-card--keynote .ag-media--multi .ag-headshot,
.ag-card--keynote .ag-media--multi .ag-headshot img { width: 150px; }
.ag-card--keynote .ag-media--multi .ag-headshot img { height: 150px; }

.ag-headshot .ag-headshot-name { color: #222; font-weight: 700; }

/* Session summary and speaker bios inside "More info" */
.ag-details-section + .ag-details-section { margin-top: 18px; }

.ag-details-body h4.ag-details-heading {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--ag-accent-dark);
  margin: 0 0 8px;
}

.ag-bio + .ag-bio { margin-top: 14px; }
.ag-details-body .ag-bio-name { font-weight: 700; margin-bottom: 4px; color: #222; }
.ag-bio-role { font-weight: 400; font-style: italic; color: var(--ag-muted); }

@media (max-width: 767px) {
  .ag-media--multi { max-width: 100%; flex-wrap: wrap; }
  .ag-media--multi .ag-headshot,
  .ag-media--multi .ag-headshot img,
  .ag-card--keynote .ag-media--multi .ag-headshot,
  .ag-card--keynote .ag-media--multi .ag-headshot img { width: 100px; }
  .ag-media--multi .ag-headshot img,
  .ag-card--keynote .ag-media--multi .ag-headshot img { height: 100px; }
}

/* Let the tab buttons wrap onto a second line instead of running off-screen */
.agenda-wrapper .tab-wrapper { flex-wrap: wrap; gap: 12px 20px; }

/* ---------- Badges: Keynote + session number ---------- */
.ag-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.ag-badges .ag-badge { align-self: auto; }

.ag-code {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ag-accent-dark);
  border: 1px solid rgba(0, 95, 130, 0.35);
  padding: 2px 9px;
  border-radius: 50px;
}

/* ---------- Topic tags (track) and audience ---------- */
.ag-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px !important; }

.ag-tag {
  font-size: 0.78rem;
  font-weight: 600;
  color: #24414f;
  background: #e6f4f9;
  padding: 3px 10px;
  border-radius: 50px;
}

.ag-tag--audience { background: #f1efe6; color: #4d4630; }

/* ---------- Topic filter ---------- */
.ag-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 6px 0 4px;
}

.ag-filter-label { font-weight: 600; font-size: 0.9rem; margin-right: 4px; }

.ag-chip {
  font-size: 0.85rem;
  padding: 5px 14px;
  border: 1px solid var(--ag-border);
  border-radius: 50px;
  background: #fff;
  color: #222;
  cursor: pointer;
}

.ag-chip:hover { border-color: var(--ag-accent-dark); }
.ag-chip.is-active { background: var(--ag-accent-dark); border-color: var(--ag-accent-dark); color: #fff; }
.ag-chip:focus-visible { outline: 3px solid var(--ag-accent); outline-offset: 2px; }

.ag-card[hidden],
.ag-block[hidden] { display: none !important; }

/* ---------- Recording / slides links (past events) ---------- */
.ag-resources { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 4px !important; }
.ag-resource {
  font-weight: 600;
  color: var(--ag-accent-dark);
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 95, 130, 0.35);
}
.ag-resource:hover { color: var(--ag-accent); }

/* Session opened from an "At a Glance" link */
.ag-card.is-target { box-shadow: 0 0 0 3px var(--ag-accent); scroll-margin-top: 20px; }

/* ---------- High school schedule (cards colored by school group) ---------- */
.ag-day--hs { margin-top: 6px; }

.ag-hs-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.ag-hs-card {
  padding: 16px 18px;
  border: 3px solid var(--g, var(--ag-border));
  border-radius: 10px;
}
.ag-hs-card .ag-title { font-size: 1.1rem; margin-bottom: 2px; }
.ag-hs-card--break { border-style: dashed; background: #fafbfc; }
.ag-hs-group { margin-top: 8px !important; }
.ag-group-pill {
  display: inline-block; font-size: 0.8rem; font-weight: 700;
  padding: 3px 10px; border-radius: 50px;
}
.ag-hs-count { font-size: 0.8rem; color: var(--ag-muted); margin-left: 4px; }
.ag-hs-empty { margin: 0; font-style: italic; color: var(--ag-muted); grid-column: 2; }
.ag-hs-empty[hidden] { display: none; }

.ag-hs-note {
  background: #f3f6f8; border-radius: 8px; padding: 12px 16px; margin: 6px 0 4px;
}
.ag-hs-note p { margin: 0; }
.ag-hs-note-title { font-weight: 700; }
.ag-hs-note-loc { font-weight: 400; color: var(--ag-muted); }

/* Group filter buttons: colored dot, filled with the school color when active */
.ag-chip--group { border-color: var(--g); }
.ag-chip--group::before {
  content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%;
  background: var(--g); margin-right: 6px; vertical-align: -1px;
}
.ag-chip--group:hover { border-color: var(--g); box-shadow: 0 0 0 1px var(--g); }
.ag-chip--group.is-active { background: var(--g); border-color: var(--g); color: var(--g-text); }
.ag-chip--group.is-active::before { background: var(--g-text); }

@media (max-width: 767px) {
  .ag-hs-empty { grid-column: 1; }
}
.ag-hs-count { display: block; margin: 4px 0 0; }
