:root{
  --am5-brand: var(--wp--preset--color--primary, #F8E326);
  --am5-dark:  var(--wp--preset--color--black, #000);
  --am5-bg:    var(--wp--preset--color--base, #fff);
  --am5-ink:   var(--wp--preset--color--contrast, #0b0b0b);

  --am5-muted: rgba(11,11,11,.66);
  --am5-line: rgba(11,11,11,.14);
  --am5-shadow: 0 14px 34px rgba(0,0,0,.10);
  --am5-radius: 18px;
}

/* Shell */
.am5{
  background: var(--am5-bg) !important;
  color: var(--am5-ink) !important;
  border:1px solid var(--am5-line);
  border-radius: var(--am5-radius);
  box-shadow: var(--am5-shadow);
  overflow:hidden;
}
.am5 *{ box-sizing: border-box; }

/* Focus */
.am5 :focus-visible{
  outline: none;
  box-shadow: 0 0 0 3px rgba(248,227,38,.45);
  border-radius: 10px;
}

/* Header */
.am5__head{
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding:14px 14px 12px;
  background: linear-gradient(180deg, rgba(248,227,38,.18), rgba(255,255,255,0));
  border-bottom:1px solid var(--am5-line);
}
.am5__title{
  font-weight: 950;
  font-size: 18px;
  letter-spacing: .2px;
}
.am5__tools{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  justify-content:flex-end;
}
.am5__search input{
  border:1px solid var(--am5-line);
  border-radius:999px;
  padding:10px 12px;
  min-width:240px;
  outline:none;
  background:#fff;
  color:#000;
}
.am5__search input:focus{
  border-color: rgba(0,0,0,.28);
  box-shadow: 0 0 0 3px rgba(248,227,38,.35);
}

.am5__toggles{ display:flex; gap:8px; flex-wrap:wrap; }
.am5__toggle{
  border:1px solid var(--am5-line);
  background:#fff;
  color:#000;
  border-radius:999px;
  padding:9px 12px;
  font-weight: 900;
  cursor:pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}
.am5__toggle:hover{ transform: translateY(-1px); box-shadow: 0 12px 24px rgba(0,0,0,.10); }
.am5__toggle.is-active{
  background: var(--am5-dark);
  color: var(--am5-brand);
  border-color: rgba(248,226,38,.40);
}

/* Tabs */
.am5__tabs{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  padding:10px 14px;
  border-bottom:1px solid var(--am5-line);
  background:#fff;
}
.am5__tab{
  border:1px solid var(--am5-line);
  background:#fff;
  color:#000;
  border-radius:999px;
  padding:9px 12px;
  font-weight:950;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  gap:8px;
  transition: transform .12s ease, box-shadow .12s ease;
}
.am5__tab:hover{ transform: translateY(-1px); box-shadow: 0 12px 24px rgba(0,0,0,.10); }
.am5__tab.is-active{
  background: var(--am5-brand);
  border-color: rgba(0,0,0,.22);
}
.am5__count{
  background: rgba(0,0,0,.10);
  border-radius:999px;
  padding:2px 8px;
  font-size:12px;
  font-weight:950;
}

/* Calendar */
.am5__calendar{ padding: 10px 10px 14px; background:#fff; }

/* FullCalendar toolbar */
.am5 .fc .fc-toolbar{
  background: var(--am5-dark);
  color: var(--am5-brand);
  padding:12px 12px;
  margin:0 0 10px 0;
  border-radius: 14px;
}
.am5 .fc .fc-toolbar-title{ font-weight:950; text-transform:capitalize; }
.am5 .fc .fc-button{
  background: var(--am5-dark) !important;
  border:1px solid rgba(248,226,38,.40) !important;
  color: var(--am5-brand) !important;
  border-radius: 12px !important;
  font-weight: 950 !important;
}
.am5 .fc .fc-button:hover{ background:#111 !important; }
.am5 .fc .fc-button-primary:not(:disabled).fc-button-active{
  background: var(--am5-brand) !important;
  color: var(--am5-dark) !important;
  border-color: rgba(0,0,0,.25) !important;
}

/* Events */
.am5 .fc .fc-daygrid-event,
.am5 .fc .fc-timegrid-event{
  background: var(--am5-brand) !important;
  border:1px solid rgba(0,0,0,.14) !important;
  border-radius:12px !important;
  box-shadow: 0 8px 18px rgba(0,0,0,.10);
  overflow:hidden;
}
.am5 .fc .fc-event,
.am5 .fc .fc-event .fc-event-main{
  color: #000 !important;
  text-decoration:none !important;
}

/* Live badge */
.am5 .fc .fc-event{ position:relative; }
.am5 .fc .fc-event.am5-is-live{ padding-top:18px !important; }
.am5 .fc .fc-event.am5-is-live::before{
  content:"LIVE NU";
  position:absolute;
  top:4px; left:6px;
  background: var(--am5-dark);
  color: var(--am5-brand);
  border-radius:999px;
  padding:2px 8px;
  font-size:11px;
  font-weight:950;
  z-index:2;
  border:1px solid rgba(248,226,38,.40);
}

/* Has live icon */
.am5 .fc .fc-event.am5-has-live::after{
  content: "▶";
  position: absolute;
  top: 4px;
  right: 6px;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(0,0,0,.85);
  color: var(--am5-brand);
  font-size: 11px;
  font-weight: 950;
  border: 1px solid rgba(248,226,38,.40);
}

/* Live chip (is span, not a) */
.am5live{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:max-content;
  margin: 6px 8px 0;
  padding:6px 10px;
  border-radius:999px;
  background: var(--am5-dark);
  color: var(--am5-brand) !important;
  border:1px solid rgba(248,226,38,.40);
  font-size:12px;
  font-weight:950;
  text-decoration:none !important;
  cursor:pointer;
  user-select:none;
}
.am5live:hover{ background:#111; }

/* Today */
.am5 .fc .fc-day-today{ background: rgba(248,227,38,.14) !important; }

/* Panel */
.am5__panel{
  border-top:1px solid var(--am5-line);
  background:#fff;
  padding: 14px;
}
.am5__panelHead{
  display:flex;
  gap:10px;
  justify-content:space-between;
  align-items:flex-end;
  margin-bottom:10px;
}
.am5__panelTitle{ font-weight:950; font-size:16px; }
.am5__panelMeta{ color: var(--am5-muted); font-weight:800; font-size:13px; }

.am5__error{
  border:1px solid rgba(0,0,0,.18);
  background: rgba(248,227,38,.22);
  padding:10px 12px;
  border-radius: 14px;
  font-weight: 800;
  margin-bottom: 10px;
}

.am5__list{ display:flex; flex-direction:column; gap:10px; }

/* Rows */
.am5row{
  border:1px solid var(--am5-line);
  border-radius: 14px;
  padding: 12px 12px;
  display:flex;
  gap:12px;
  align-items:flex-start;
  justify-content:space-between;
  background:#fff;
  box-shadow: 0 10px 22px rgba(0,0,0,.06);
}
.am5row--empty{ opacity:.85; }
.am5row__main{ min-width:0; }
.am5row__top{ display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin-bottom:6px; }
.am5row__badge{
  border-radius:999px;
  padding:4px 10px;
  font-size:12px;
  font-weight:950;
  border:1px solid rgba(248,226,38,.40);
  background: var(--am5-dark);
  color: var(--am5-brand);
}
.am5row__when{
  border-radius:999px;
  padding:4px 10px;
  font-size:12px;
  font-weight:950;
  background: rgba(0,0,0,.06);
}
.am5row__title{ font-weight:950; line-height:1.25; margin:0; }
.am5row__loc{ margin-top:4px; color: var(--am5-muted); font-weight:800; font-size:13px; }

.am5row__actions{ flex:0 0 auto; display:flex; gap:8px; flex-wrap:wrap; align-items:center; }

.am5btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  padding:8px 10px;
  font-weight:950;
  text-decoration:none !important;
  border:1px solid var(--am5-line);
  color:#000 !important;
  background:#fff;
}
.am5btn:hover{ background: rgba(248,227,38,.25); border-color: rgba(0,0,0,.25); }

.am5btn--live{
  background: var(--am5-dark);
  color: var(--am5-brand) !important;
  border:1px solid rgba(248,226,38,.40);
}
.am5btn--live:hover{ background:#111; }

.am5__panelFoot{ margin-top:12px; display:flex; justify-content:center; }
.am5__more{
  border-radius:999px;
  padding:10px 14px;
  font-weight:950;
  border:1px solid var(--am5-line);
  background:#fff;
  cursor:pointer;
}
.am5__more:hover{ background:#f7f7f7; }

/* Bar */
.am5bar{
  border:1px solid var(--am5-line);
  border-radius: var(--am5-radius);
  overflow:hidden;
  background: var(--am5-bg);
  box-shadow: var(--am5-shadow);
}
.am5bar__title{
  background: var(--am5-dark);
  color: var(--am5-brand);
  padding:12px 14px;
  font-weight:950;
}
.am5bar__items{
  display:flex;
  gap:10px;
  padding:12px 14px;
  overflow:auto;
  -webkit-overflow-scrolling: touch;
  align-items: stretch;
  background:#fff;
}
.am5bar__empty{ opacity:.75; padding:6px 0; }

.am5bar__chip{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  gap:10px;
  border:1px solid var(--am5-line);
  border-radius:999px;
  padding:10px 12px;
  white-space:nowrap;
  background:#fff;
  transition: transform .12s ease, box-shadow .12s ease;
}
.am5bar__chip:hover{ transform: translateY(-1px); box-shadow: 0 12px 24px rgba(0,0,0,.10); }
.am5bar__live{
  background: var(--am5-dark);
  color: var(--am5-brand);
  border-radius:999px;
  padding:4px 10px;
  font-weight:950;
  font-size:12px;
  border:1px solid rgba(248,226,38,.40);
}
.am5bar__date,.am5bar__time{
  background: var(--am5-brand);
  color: var(--am5-dark);
  border-radius:999px;
  padding:4px 8px;
  font-weight:950;
}
.am5bar__name{
  min-width:120px;
  max-width:280px;
  overflow:hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight:950;
}
.am5bar__loc{
  max-width:220px;
  overflow:hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--am5-muted);
  font-weight:800;
  font-size:13px;
}
.am5bar__more{
  background:#fff;
  color:#000 !important;
  border-radius:999px;
  padding:6px 10px;
  font-weight:950;
  text-decoration:none !important;
  border:1px solid var(--am5-line);
}
.am5bar__more:hover{ background:#f7f7f7; }
.am5bar__btn{
  background: var(--am5-dark);
  color: var(--am5-brand) !important;
  border-radius:999px;
  padding:6px 10px;
  font-weight:950;
  text-decoration:none !important;
  border:1px solid rgba(248,226,38,.40);
}
.am5bar__btn:hover{ background:#111; }

/* Mobile */
@media (max-width: 768px){
  .am5__head{ flex-direction:column; align-items:stretch; }
  .am5__tools{ justify-content:flex-start; }
  .am5__search input{ min-width:0; width:100%; }
  .am5 .fc .fc-toolbar{ padding:10px 10px; }
  .am5 .fc .fc-toolbar-title{ font-size:16px; }
  .am5 .fc .fc-button{ padding:6px 8px !important; border-radius:10px !important; font-size:12px !important; }

  .am5row{ flex-direction:column; }
  .am5row__actions{ width:100%; }
  .am5bar__chip{ flex-wrap:wrap; row-gap:8px; }
  .am5bar__name{ max-width:100%; flex: 1 1 100%; }
  .am5bar__loc{ max-width:100%; }
}

/* Month view wrapping */
.am5 .fc .fc-daygrid-event{ white-space: normal !important; align-items:flex-start; }
.am5event__title{
  white-space: normal !important;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.15;
}

/* Veilig: gewone links zwart, maar niet knoppen */
.am5 a:not(.am5btn):not(.am5btn--live):not(.am5bar__btn),
.am5 a:visited:not(.am5btn):not(.am5btn--live):not(.am5bar__btn){
  color:#000 !important;
}