/* SZMG agenda-widget — gepagineerd raster van activiteiten. Gescoped onder .szmg-agenda,
   themebaar via --szmg-*-variabelen (standaard = SZMG navy/teal). Look = de digitale-voordeur
   (afgeronde kaarten, zachte schaduwen, navy/blauw). Phosphor-iconen via <i class="ph ...">. */

.szmg-agenda {
  --szmg-primary: #1B2D78; --szmg-primary-dk: #13215A;
  --szmg-accent: #00B4CC; --szmg-accent-dk: #0097AD; --szmg-accent-lt: #E0F7FA;
  --szmg-bg: #ffffff; --szmg-soft: #F0F8FE; --szmg-navy: #15294F;
  --szmg-text: #3A4253; --szmg-text-sm: #6B7484;
  --szmg-line: #E3E9F3; --szmg-line-dk: #D4DEEC; --szmg-radius: 16px; --szmg-radius-s: 12px;
  --szmg-shadow: 0 1px 2px rgba(16,40,80,.04), 0 8px 28px rgba(16,40,80,.07);
  --szmg-shadow-s: 0 1px 3px rgba(16,40,80,.07);
  --szmg-fav: #E8638A;
  --szmg-font: 'Inter', 'Open Sans', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;

  position: relative; display: block; font-family: var(--szmg-font);
  color: var(--szmg-text); box-sizing: border-box;
}
.szmg-agenda *, .szmg-agenda *::before, .szmg-agenda *::after { box-sizing: border-box; }
.szmg-agenda .ph { line-height: 1; vertical-align: middle; }

/* ── Topbalk: zoek + reset ── */
.szmg-ag-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.szmg-ag-search { flex: 1; min-width: 220px; display: flex; align-items: center; gap: 10px; background: var(--szmg-bg); border: 1.5px solid var(--szmg-line-dk); border-radius: 14px; padding: 11px 16px; box-shadow: var(--szmg-shadow-s); transition: border-color .15s, box-shadow .15s; }
.szmg-ag-search:focus-within { border-color: var(--szmg-accent); box-shadow: 0 0 0 3px rgba(0,180,204,.12); }
.szmg-ag-search .ph { font-size: 19px; color: var(--szmg-text-sm); flex-shrink: 0; }
.szmg-ag-search input { flex: 1; min-width: 0; border: none; outline: none; background: none; font-family: inherit; font-size: .95rem; color: var(--szmg-navy); }
.szmg-ag-reset { display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0; border: 1.5px solid var(--szmg-line-dk); background: var(--szmg-bg); border-radius: 12px; padding: 11px 15px; font-family: inherit; font-size: .88rem; font-weight: 600; color: var(--szmg-text-sm); cursor: pointer; transition: .15s; }
.szmg-ag-reset:hover { border-color: var(--szmg-accent); color: var(--szmg-accent-dk); }
.szmg-ag-reset .ph { font-size: 17px; }

/* ── Filterrij: pill-dropdowns ── */
.szmg-ag-filters { position: relative; display: flex; align-items: center; gap: 9px; margin-bottom: 16px; flex-wrap: wrap; }
.szmg-ag-fbtn { display: inline-flex; align-items: center; gap: 7px; border: 1.5px solid var(--szmg-line); background: var(--szmg-bg); border-radius: 50px; padding: 9px 14px; font-family: inherit; font-size: .86rem; font-weight: 600; color: var(--szmg-navy); cursor: pointer; box-shadow: var(--szmg-shadow-s); transition: .15s; white-space: nowrap; }
.szmg-ag-fbtn:hover { border-color: var(--szmg-line-dk); transform: translateY(-1px); }
.szmg-ag-fbtn.active { border-color: var(--szmg-primary); color: var(--szmg-primary); background: var(--szmg-accent-lt); }
.szmg-ag-fbtn .ph:first-child { font-size: 17px; color: var(--szmg-primary); }
.szmg-ag-fbtn .ph:last-child { font-size: 13px; color: var(--szmg-text-sm); }
.szmg-ag-fbtn.active .ph:first-child { color: var(--szmg-primary); }
.szmg-ag-fbtn--ph { color: var(--szmg-text-sm); cursor: default; opacity: .8; }
.szmg-ag-fbtn--ph:hover { transform: none; border-color: var(--szmg-line); }
.szmg-ag-fbtn--ph .ph:first-child { color: var(--szmg-text-sm); }

/* Popover met checkbox-lijst */
.szmg-ag-pop { position: absolute; z-index: 40; min-width: 220px; max-width: 300px; max-height: 320px; overflow-y: auto; background: var(--szmg-bg); border: 1px solid var(--szmg-line); border-radius: 14px; box-shadow: 0 10px 34px rgba(16,40,80,.16); padding: 6px; }
.szmg-ag-pop-list { display: flex; flex-direction: column; }
.szmg-ag-pop-row { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 9px; cursor: pointer; font-size: .86rem; color: var(--szmg-navy); }
.szmg-ag-pop-row:hover { background: var(--szmg-soft); }
.szmg-ag-pop-row.on { color: var(--szmg-primary); font-weight: 600; }
.szmg-ag-pop-row input { width: 16px; height: 16px; flex-shrink: 0; accent-color: var(--szmg-primary); cursor: pointer; }
.szmg-ag-pop-lbl { flex: 1; min-width: 0; }
.szmg-ag-pop-c { flex-shrink: 0; font-size: .74rem; font-weight: 600; color: var(--szmg-text-sm); background: var(--szmg-soft); border-radius: 8px; padding: 1px 7px; }
.szmg-ag-pop-empty { padding: 14px 12px; font-size: .84rem; color: var(--szmg-text-sm); text-align: center; }
.szmg-ag-pop-clear { width: 100%; margin-top: 4px; border: none; border-top: 1px solid var(--szmg-line); background: none; padding: 9px; font-family: inherit; font-size: .82rem; font-weight: 600; color: var(--szmg-text-sm); cursor: pointer; }
.szmg-ag-pop-clear:hover { color: var(--szmg-accent-dk); }

/* ── Meta-rij: telling + sortering ── */
.szmg-ag-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.szmg-ag-count { font-size: .9rem; color: var(--szmg-text-sm); }
.szmg-ag-count b { color: var(--szmg-navy); font-weight: 800; }
.szmg-ag-sort { display: inline-flex; align-items: center; gap: 8px; font-size: .84rem; color: var(--szmg-text-sm); font-weight: 600; }
.szmg-ag-sort select { border: 1.5px solid var(--szmg-line); border-radius: 10px; padding: 8px 11px; font-family: inherit; font-size: .84rem; font-weight: 600; color: var(--szmg-navy); background: var(--szmg-bg); cursor: pointer; }
.szmg-ag-sort select:focus { outline: none; border-color: var(--szmg-accent); }

/* ── Raster: 4 koloms desktop ── */
.szmg-ag-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.szmg-ag-loading { grid-column: 1 / -1; padding: 40px 16px; text-align: center; color: var(--szmg-text-sm); font-size: .9rem; }

/* ── Kaart ── */
.szmg-ag-card { display: flex; flex-direction: column; background: var(--szmg-bg); border: 1px solid var(--szmg-line); border-radius: var(--szmg-radius); overflow: hidden; box-shadow: var(--szmg-shadow-s); cursor: pointer; transition: transform .18s, box-shadow .18s, border-color .18s; }
.szmg-ag-card:hover { transform: translateY(-3px); box-shadow: var(--szmg-shadow); border-color: var(--szmg-line-dk); }
.szmg-ag-card:focus-visible { outline: 2px solid var(--szmg-accent); outline-offset: 2px; }
.szmg-ag-c-media { position: relative; height: 158px; overflow: hidden; background: var(--szmg-soft); }
.szmg-ag-c-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.szmg-ag-c-grad { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.szmg-ag-c-emoji { font-size: 3rem; opacity: .38; }
.szmg-ag-c-badge { position: absolute; top: 11px; left: 11px; z-index: 2; display: flex; flex-direction: column; align-items: center; padding: 6px 10px; background: rgba(0,0,0,.55); backdrop-filter: blur(4px); border-radius: 10px; color: #fff; line-height: 1; }
.szmg-ag-c-day { font-size: 1.35rem; font-weight: 800; }
.szmg-ag-c-mon { font-size: .6rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; opacity: .92; margin-top: 2px; }
.szmg-ag-fav { position: absolute; top: 10px; right: 10px; z-index: 2; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.92); border-radius: 50%; box-shadow: 0 1px 4px rgba(16,40,80,.18); cursor: pointer; font-size: 1.05rem; line-height: 1; color: #C2CCDB; transition: .15s; }
.szmg-ag-fav:hover { color: var(--szmg-fav); transform: scale(1.08); }
.szmg-ag-fav.on { color: var(--szmg-fav); }
.szmg-ag-c-body { flex: 1; display: flex; flex-direction: column; padding: 14px 15px 15px; }
.szmg-ag-c-title { font-size: .96rem; font-weight: 700; color: var(--szmg-navy); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.szmg-ag-c-sub { margin-top: 5px; font-size: .8rem; color: var(--szmg-text-sm); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.szmg-ag-c-row { display: flex; align-items: center; gap: 7px; margin-top: 8px; font-size: .8rem; color: var(--szmg-text); min-width: 0; }
.szmg-ag-c-row .ph { font-size: 15px; color: var(--szmg-accent-dk); flex-shrink: 0; }
.szmg-ag-c-row span { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.szmg-ag-c-tags { margin-top: auto; padding-top: 12px; }
.szmg-ag-c-tag { display: inline-block; font-size: .72rem; font-weight: 600; padding: 4px 10px; border-radius: 50px; }

/* ── Lege staat ── */
.szmg-ag-empty { grid-column: 1 / -1; text-align: center; padding: 48px 20px; }
.szmg-ag-empty-ic { font-size: 2.6rem; opacity: .55; margin-bottom: 12px; }
.szmg-ag-empty-tx { font-size: .92rem; color: var(--szmg-text-sm); max-width: 420px; margin: 0 auto; line-height: 1.55; }

/* ── Paginering ── */
.szmg-ag-pager { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 24px; flex-wrap: wrap; }
.szmg-ag-pg { min-width: 38px; height: 38px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; border: 1.5px solid var(--szmg-line); background: var(--szmg-bg); border-radius: 10px; font-family: inherit; font-size: .88rem; font-weight: 600; color: var(--szmg-navy); cursor: pointer; transition: .15s; }
.szmg-ag-pg:hover:not(:disabled):not(.active) { border-color: var(--szmg-primary); color: var(--szmg-primary); }
.szmg-ag-pg.active { background: var(--szmg-primary); border-color: var(--szmg-primary); color: #fff; cursor: default; }
.szmg-ag-pg:disabled { opacity: .4; cursor: default; }
.szmg-ag-pg--nav .ph { font-size: 16px; }
.szmg-ag-pg-gap { min-width: 22px; text-align: center; color: var(--szmg-text-sm); font-weight: 700; }

/* ══ Zwevend Mees-paneel ══ */
/* FAB rechtsonder */
.szmg-ag-fab { position: fixed; right: 22px; bottom: 22px; z-index: 900; display: inline-flex; align-items: center; gap: 11px; padding: 8px 18px 8px 8px; background: var(--szmg-primary); color: #fff; border: none; border-radius: 50px; box-shadow: 0 8px 26px rgba(27,45,120,.34); cursor: pointer; font-family: inherit; transition: transform .18s, box-shadow .18s, background .15s; }
.szmg-ag-fab:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(27,45,120,.4); background: var(--szmg-primary-dk); }
.szmg-ag-fab.hidden { display: none; }
.szmg-ag-fab img, .szmg-ag-fab-ini { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: #fff; color: var(--szmg-primary); font-weight: 800; font-size: 1.2rem; }
.szmg-ag-fab-tx { font-size: .9rem; font-weight: 700; white-space: nowrap; }

/* Overlay-chatpaneel rechtsonder */
.szmg-ag-mees { position: fixed; right: 22px; bottom: 22px; z-index: 901; width: 360px; max-width: calc(100vw - 32px); max-height: min(560px, calc(100vh - 44px)); background: var(--szmg-bg); border-radius: 20px; box-shadow: 0 18px 50px rgba(16,40,80,.28); display: none; flex-direction: column; overflow: hidden; font-family: var(--szmg-font); }
.szmg-ag-mees.open { display: flex; animation: szmg-ag-pop-in .22s ease both; }
@keyframes szmg-ag-pop-in { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.szmg-ag-mees-head { display: flex; align-items: center; gap: 11px; padding: 14px 14px 12px; background: var(--szmg-primary); color: #fff; }
.szmg-ag-mees-av { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: #fff; }
.szmg-ag-mees-av--ini { display: flex; align-items: center; justify-content: center; color: var(--szmg-primary); font-weight: 800; font-size: 1.15rem; }
.szmg-ag-mees-htx { flex: 1; min-width: 0; }
.szmg-ag-mees-name { font-weight: 700; font-size: .98rem; line-height: 1.2; }
.szmg-ag-mees-sub { font-size: .78rem; opacity: .85; margin-top: 1px; }
.szmg-ag-mees-x { flex-shrink: 0; width: 30px; height: 30px; border: none; background: rgba(255,255,255,.16); border-radius: 50%; color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.szmg-ag-mees-x:hover { background: rgba(255,255,255,.28); }
.szmg-ag-mees-x .ph { font-size: 16px; }

.szmg-ag-mees-msgs { flex: 1; min-height: 120px; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 9px; background: var(--szmg-soft); }
.szmg-ag-mees-b { max-width: 85%; padding: 10px 13px; border-radius: 14px; font-size: .86rem; line-height: 1.45; }
.szmg-ag-mees-b--assistant { align-self: flex-start; background: var(--szmg-bg); color: var(--szmg-text); border: 1px solid var(--szmg-line); border-bottom-left-radius: 5px; }
.szmg-ag-mees-b--user { align-self: flex-end; background: var(--szmg-primary); color: #fff; border-bottom-right-radius: 5px; }
.szmg-ag-mees-typing { padding: 12px 14px; }
.szmg-ag-dots { display: inline-flex; gap: 4px; }
.szmg-ag-dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--szmg-accent); animation: szmg-ag-dot 1.1s ease-in-out infinite; }
.szmg-ag-dots span:nth-child(2) { animation-delay: .15s; }
.szmg-ag-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes szmg-ag-dot { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }

.szmg-ag-mees-note { margin: 0 14px; padding: 9px 12px; border-radius: 10px; font-size: .8rem; line-height: 1.4; background: #E9F9EE; color: #15803D; border: 1px solid #BDE9CB; }
.szmg-ag-mees-note b { font-weight: 800; }
.szmg-ag-mees-note-btn { margin-top: 5px; display: inline-block; border: none; background: none; padding: 0; font-family: inherit; font-size: .78rem; font-weight: 700; color: var(--szmg-primary); cursor: pointer; text-decoration: underline; }

.szmg-ag-mees-form { display: flex; align-items: center; gap: 8px; padding: 11px 12px 8px; }
.szmg-ag-mees-form input { flex: 1; min-width: 0; border: 1.5px solid var(--szmg-line); border-radius: 50px; padding: 10px 15px; font-family: inherit; font-size: .86rem; color: var(--szmg-navy); outline: none; }
.szmg-ag-mees-form input:focus { border-color: var(--szmg-accent); }
.szmg-ag-mees-form button { flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; border: none; background: var(--szmg-primary); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .15s; }
.szmg-ag-mees-form button:hover { background: var(--szmg-primary-dk); }
.szmg-ag-mees-form button .ph { font-size: 18px; }
.szmg-ag-mees-disc { padding: 0 14px 12px; font-size: .72rem; color: var(--szmg-text-sm); line-height: 1.4; }

/* ── Responsive raster ── */
@media (max-width: 1100px) { .szmg-ag-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px)  { .szmg-ag-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; } }
@media (max-width: 520px)  {
  .szmg-ag-grid { grid-template-columns: 1fr; }
  .szmg-ag-fab-tx { display: none; }
  .szmg-ag-fab { padding: 8px; }
  .szmg-ag-mees, .szmg-ag-fab { right: 14px; bottom: 14px; }
}
