/* =============================================================================
   Agenda & Rückblick – runningplus.ch
   Layout: Datum | Badge+Titel+Pills | Thumbnail  →  Detailpanel aufklappbar
   ============================================================================= */

:root {
  --ag-green:       #3B6D11;
  --ag-green-light: #EAF3DE;
  --ag-green-mid:   #639922;
  --ag-amber:       #854F0B;
  --ag-amber-light: #FAEEDA;
  --ag-blue:        #185FA5;
  --ag-blue-light:  #E6F1FB;
  --ag-border:      #dee2e6;
  --ag-text:        #1a1a1a;
  --ag-muted:       #6c757d;
  --ag-surface:     #f8f9fa;
}

/* Seitentitel */
.agenda-page-title {
  font-size: 2rem;
  font-weight: 600;
  color: var(--ag-text);
  border-bottom: 2px solid var(--ag-green-light);
  padding-bottom: .5rem;
  margin-bottom: 0;
}

/* ---- Liste & Monats-Header ---- */
.agenda-list {
  border: 1px solid var(--ag-border);
  border-radius: 8px;
  overflow: hidden;
}

.agenda-month-header {
  background: var(--ag-green-light);
  color: var(--ag-green);
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  padding: .4rem 1.25rem;
  border-bottom: 1px solid var(--ag-border);
}

/* ---- Item (<details>) ---- */
.agenda-item {
  border-bottom: 1px solid var(--ag-border);
  background: #fff;
}

.agenda-item:last-child {
  border-bottom: none;
}

.agenda-item[open] > .agenda-item-row {
  background: var(--ag-surface);
}

.agenda-item--past { opacity: .55; }
.agenda-item--past:hover { opacity: .85; }

/* ---- Summary-Zeile: Datum | Main | Thumbnail ---- */
.agenda-item-row {
  display: grid;
  grid-template-columns: 56px 1fr 96px;
  align-items: stretch;
  cursor: pointer;
  list-style: none;
  user-select: none;
  min-height: 80px;
}

.agenda-item-row::-webkit-details-marker { display: none; }
.agenda-item-row:hover { background: #f0f4ed; }

/* Datum-Spalte */
.agenda-col-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: .75rem .5rem;
  border-right: 1px solid var(--ag-border);
  flex-shrink: 0;
}

.ag-day {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--ag-green);
  line-height: 1;
}

.ag-wd {
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ag-muted);
  margin-top: 3px;
}

/* Haupt-Spalte: Badge + Titel + Pills */
.agenda-col-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: .75rem 1rem;
  min-width: 0;
}

/* Badges nebeneinander */
.agenda-col-main .categories-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.ag-title {
  font-size: .95rem;
  font-weight: 600;
  color: var(--ag-text);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Meta-Pills */
.ag-pills {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 2px;
}

.ag-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .78rem;
  color: var(--ag-muted);
}

.ag-pill svg { color: var(--ag-green-mid); flex-shrink: 0; }

/* Thumbnail-Spalte */
.agenda-col-thumb {
  overflow: hidden;
  flex-shrink: 0;
}

.agenda-col-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---- Detailpanel ---- */
.agenda-detail {
  display: grid;
  grid-template-columns: 480px 1fr;
  border-top: 1px solid var(--ag-border);
  background: #fff;
}

.agenda-detail-img { overflow: hidden; }

.agenda-detail-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  min-height: 240px;
}

.agenda-detail-body {
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.agenda-detail-desc {
  font-size: .9rem;
  color: var(--ag-muted);
  line-height: 1.65;
  margin: 0;
}

/* Detail DL — zweispaltig: Label | Wert */
.agenda-detail-dl {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0;
  border-top: 1px solid var(--ag-border);
  padding-top: .75rem;
}

.ag-dl-row {
  display: contents;
}

.ag-dl-row dt {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--ag-text);
  padding: .3rem .75rem .3rem 0;
  white-space: nowrap;
  border-bottom: 1px solid var(--ag-border);
}

.ag-dl-row:last-child dt,
.ag-dl-row:last-child dd {
  border-bottom: none;
}

.ag-dl-row dt svg { color: var(--ag-green); flex-shrink: 0; }

.ag-dl-row dd {
  margin: 0;
  font-size: .85rem;
  color: var(--ag-muted);
  padding: .3rem 0 .3rem .5rem;
  border-bottom: 1px solid var(--ag-border);
}

/* ---- Kategorie-Badge ---- */
.agenda-badge {
  display: inline-block;
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: .15rem .5rem;
  border-radius: 3px;
  width: fit-content;
}

.agenda-badge--lauftraining { background: var(--ag-green-light); color: var(--ag-green); }
.agenda-badge--schulung     { background: var(--ag-amber-light); color: var(--ag-amber); }
.agenda-badge--beratung     { background: var(--ag-blue-light);  color: var(--ag-blue);  }

/* ---- Leer-Zustand ---- */
.agenda-empty { color: var(--ag-muted); font-size: .95rem; padding: 1.5rem; }
.agenda-empty a { color: var(--ag-green); }

/* ---- Responsive ---- */
@media (max-width: 767px) {
  .agenda-item-row {
    grid-template-columns: 48px 1fr 72px;
  }

  .ag-day { font-size: 1.4rem; }

  .agenda-detail {
    grid-template-columns: 1fr;
  }

  .agenda-detail-img img { height: 220px; min-height: unset; }
  .agenda-detail-body { padding: 1rem; }
}

@media (max-width: 480px) {
  .agenda-col-thumb { display: none; }
  .agenda-item-row { grid-template-columns: 48px 1fr; }
}
