/* ============================================================
   Agenda-view — gedeeld (klant + freelancer). Bovenop base.css.
   ============================================================ */

.cb-agenda-screen { padding: 8px 0 48px; max-width: 640px; }

.cb-ag-group { margin-bottom: 26px; }
.cb-ag-grouphdr { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--cb-line); }
.cb-ag-grouphdr b { font-size: 13px; font-weight: 600; letter-spacing: .01em; }
.cb-ag-grouphdr .cb-mono { font-size: 11px; color: var(--cb-muted); }

.cb-ag-list { display: flex; flex-direction: column; gap: 8px; }

.cb-ag-event {
  display: flex; gap: 14px; align-items: stretch;
  padding: 14px 16px; border: 1px solid var(--cb-line); border-radius: var(--cb-r);
  background: var(--cb-card); cursor: pointer;
  transition: border-color .25s var(--cb-ease), transform .25s var(--cb-ease), background .25s var(--cb-ease);
}
.cb-ag-event:hover { border-color: var(--cb-line-2); transform: translateY(-1px); }
.cb-ag-event.is-today { border-color: var(--cb-info-bd); }
.cb-ag-event.is-overdue { background: var(--cb-alert-bg); border-color: var(--cb-alert-bd); }
.cb-ag-event.is-past { opacity: .5; }

.cb-ag-event__date { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 46px; flex: none; border-right: 1px solid var(--cb-line); padding-right: 12px; }
.cb-ag-event__day { font-size: 20px; font-weight: 500; color: var(--cb-fg); line-height: 1; }
.cb-ag-event__mon { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--cb-muted); margin-top: 3px; }

.cb-ag-event__body { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.cb-ag-event__typerow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cb-ag-event__type { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--cb-muted); }
.cb-ag-event__title { font-size: 15px; font-weight: 600; color: var(--cb-fg); margin: 0; }
.cb-ag-event__meta { font-size: 12px; color: var(--cb-fg-2); }
.cb-ag-event__ref { font-size: 11px; color: var(--cb-muted); margin: 0; }

/* dot-grammar (grijswaarden): disc=draaidag, ring=jouw actie, half=review, square=deadline */
.cb-ag-dot { width: 11px; height: 11px; flex: none; }
.cb-ag-dot--fill   { border-radius: 50%; background: var(--cb-fg); }
.cb-ag-dot--ring   { border-radius: 50%; border: 2px solid var(--cb-warn); background: transparent; }
.cb-ag-dot--half   { border-radius: 50%; background: linear-gradient(90deg, var(--cb-warn) 0 50%, transparent 50% 100%); border: 1.5px solid var(--cb-warn-bd); }
.cb-ag-dot--square { border-radius: 2px; background: var(--cb-fg-2); }

/* urgentie-pills (due=amber, overdue=rood) staan in base.css */

/* ingebouwd op een dashboard */
.cb-agenda-embed { margin: 0; }
.cb-ag-more { color: var(--cb-muted); font-size: 12px; font-family: var(--cb-mono); margin: 6px 0 0; }

/* lijst/maand/week-toggle (rechts in de kop) */
.cb-agenda-embed__head { justify-content: space-between; }
.cb-ag-toggle { display: inline-flex; border: 1px solid var(--cb-line-2); border-radius: var(--cb-pill); overflow: hidden; }
.cb-ag-toggle__btn { appearance: none; border: 0; background: transparent; cursor: pointer; padding: 5px 12px; font-size: 11px; letter-spacing: .04em; color: var(--cb-muted); transition: background .2s var(--cb-ease), color .2s var(--cb-ease); }
.cb-ag-toggle__btn + .cb-ag-toggle__btn { border-left: 1px solid var(--cb-line); }
.cb-ag-toggle__btn:hover { color: var(--cb-fg-2); }
.cb-ag-toggle__btn.is-active { background: var(--cb-fg); color: #000; }

/* ============================================================
   Kalender (maand / week) — grijswaarden
   ============================================================ */
.cb-cal { display: flex; flex-direction: column; gap: 12px; }

.cb-cal__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cb-cal__barnav { display: flex; align-items: center; gap: 10px; }
.cb-cal__nav { appearance: none; cursor: pointer; width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--cb-line-2); border-radius: 8px; background: var(--cb-card); color: var(--cb-fg-2); font-size: 16px; line-height: 1; transition: border-color .2s var(--cb-ease), color .2s var(--cb-ease); }
.cb-cal__nav:hover { border-color: var(--cb-fg-3); color: var(--cb-fg); }
.cb-cal__month { font-size: 14px; font-weight: 600; text-transform: lowercase; min-width: 130px; text-align: center; }
.cb-cal__today { appearance: none; cursor: pointer; border: 1px solid var(--cb-line-2); background: var(--cb-card); border-radius: var(--cb-pill); padding: 5px 12px; font-size: 11px; color: var(--cb-muted); transition: border-color .2s var(--cb-ease), color .2s var(--cb-ease); }
.cb-cal__today:hover { border-color: var(--cb-fg-3); color: var(--cb-fg); }

.cb-cal__grid { display: grid; gap: 4px; }
.cb-cal__grid--month { grid-template-columns: repeat(7, 1fr); }
.cb-cal__grid--week { grid-template-columns: repeat(7, 1fr); }
.cb-cal__wd { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--cb-muted); text-align: center; padding: 2px 0; }

.cb-cal__cell { min-height: 78px; border: 1px solid var(--cb-line); border-radius: 8px; background: var(--cb-card); padding: 5px 5px 6px; display: flex; flex-direction: column; gap: 4px; overflow: hidden; }
.cb-cal__cell.is-out { background: transparent; opacity: .42; }
.cb-cal__cell.is-today { border-color: var(--cb-info-bd); box-shadow: inset 0 0 0 1px var(--cb-info-bd); }
.cb-cal__cell.has-ev { background: var(--cb-bg-2); }
.cb-cal__daynum { font-size: 11px; color: var(--cb-fg-2); align-self: flex-end; }
.cb-cal__cell.is-today .cb-cal__daynum { color: var(--cb-fg); font-weight: 600; }

.cb-cal__events { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cb-cal__ev { appearance: none; cursor: pointer; display: flex; align-items: center; gap: 5px; width: 100%; text-align: left; border: 0; background: transparent; padding: 2px 3px; border-radius: 5px; color: var(--cb-fg-2); transition: background .2s var(--cb-ease); }
.cb-cal__ev:hover { background: var(--cb-line); color: var(--cb-fg); }
.cb-cal__ev .cb-ag-dot { width: 8px; height: 8px; }
.cb-cal__ev-t { font-size: 11px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.cb-cal__ev.is-overdue { color: var(--cb-alert); }
.cb-cal__more { font-size: 10px; color: var(--cb-muted); padding-left: 3px; }

/* weekweergave: hogere kolommen, alles zichtbaar */
.cb-cal__col { min-height: 150px; border: 1px solid var(--cb-line); border-radius: 8px; background: var(--cb-card); padding: 0 0 6px; display: flex; flex-direction: column; }
.cb-cal__col.is-today { border-color: var(--cb-info-bd); box-shadow: inset 0 0 0 1px var(--cb-info-bd); }
.cb-cal__colhdr { display: flex; align-items: baseline; justify-content: space-between; gap: 4px; padding: 6px 7px; border-bottom: 1px solid var(--cb-line); }
.cb-cal__colhdr .cb-cal__daynum { font-size: 13px; align-self: auto; }
.cb-cal__colevents { display: flex; flex-direction: column; gap: 3px; padding: 5px; min-width: 0; }
.cb-cal__none { color: var(--cb-muted); font-size: 11px; padding: 2px 3px; }

.cb-cal__legend { display: flex; flex-wrap: wrap; gap: 14px; padding-top: 4px; }
.cb-cal__leg { display: inline-flex; align-items: center; gap: 6px; font-size: 10px; letter-spacing: .04em; color: var(--cb-muted); }
.cb-cal__leg .cb-ag-dot { width: 9px; height: 9px; }

@media (max-width: 560px) {
  .cb-cal__cell { min-height: 56px; }
  .cb-cal__ev-t { display: none; }
  .cb-cal__events { flex-direction: row; flex-wrap: wrap; gap: 2px; }
  .cb-cal__ev { width: auto; padding: 2px; }
}

/* eerder (inklapbaar) */
.cb-ag-earlier { margin-top: 8px; }
.cb-ag-earlier__sum { cursor: pointer; font-family: var(--cb-mono); font-size: 12px; color: var(--cb-muted); padding: 8px 0; list-style: none; }
.cb-ag-earlier__sum::-webkit-details-marker { display: none; }
.cb-ag-earlier__sum::before { content: "▸ "; }
.cb-ag-earlier[open] .cb-ag-earlier__sum::before { content: "▾ "; }
.cb-ag-earlier .cb-ag-list { margin-top: 8px; }
