/* ═══════════════════════════════════════════════════════════════════════════
   CENTAURA CREW PLATFORM — AGENDA-OVERLAY
   Laag 3: legt het websitethema over de Syncfusion-agenda's heen.
   Puur cosmetisch — de component, de data en de interactie blijven intact.
   Laadt ná het Syncfusion-thema, vandaar de !important-declaraties.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Schil rond een agenda ──────────────────────────────────────────────── */
.calendar-shell {
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}

.calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--hair);
}

.calendar-head-main { min-width: 0; }
.calendar-head h2, .calendar-head h3 { margin: 2px 0 0; font-size: 17px; }
.calendar-legend { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

.calendar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font: 500 11px var(--font-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}

.calendar-legend i {
  width: 9px; height: 9px;
  border-radius: 3px;
  display: inline-block;
  background: var(--surface-3);
}

.calendar-legend .is-good { background: var(--good); }
.calendar-legend .is-warn { background: var(--warn); }
.calendar-legend .is-red  { background: var(--red); }
.calendar-legend .is-info { background: var(--blue); }
.calendar-legend .is-off  { background: var(--muted); }

.calendar-body { padding: 4px; }

@media (max-width: 760px) {
  .calendar-head { padding: 14px 16px 12px; }
  .calendar-body { padding: 0; }
  .calendar-legend { gap: 10px; }
}

/* ── De agenda zelf ─────────────────────────────────────────────────────── */
.e-schedule,
.e-schedule .e-table-container {
  background: var(--surface) !important;
  color: var(--ink) !important;
  border: none !important;
  font-family: var(--font-ui) !important;
}

.e-schedule { border-radius: var(--r-tile) !important; }

/* Werkbalk: navigatie en weergavekeuze als segmented stijl */
.e-schedule .e-schedule-toolbar,
.e-schedule .e-schedule-toolbar .e-toolbar-items,
.e-schedule .e-schedule-toolbar .e-toolbar-item {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.e-schedule .e-schedule-toolbar { border-bottom: 1px solid var(--hair) !important; padding: 6px 8px !important; }

.e-schedule .e-schedule-toolbar .e-tbar-btn,
.e-schedule .e-schedule-toolbar .e-tbar-btn:hover {
  background: transparent !important;
  border-radius: var(--r-chip) !important;
  box-shadow: none !important;
}

.e-schedule .e-schedule-toolbar .e-tbar-btn:hover { background: var(--surface-2) !important; }

.e-schedule .e-schedule-toolbar .e-tbar-btn-text {
  color: var(--ink-2) !important;
  font-family: var(--font-ui) !important;
  font-size: 13px !important;
}

/* Iconen in de toolbar: kleur van de site, maar hun eigen iconfont */
.e-schedule .e-schedule-toolbar .e-icons { color: var(--ink-2) !important; }

.e-schedule .e-schedule-toolbar .e-active-view .e-tbar-btn,
.e-schedule .e-schedule-toolbar .e-active-view .e-tbar-btn:hover {
  background: var(--aqua) !important;
}

.e-schedule .e-schedule-toolbar .e-active-view .e-tbar-btn-text,
.e-schedule .e-schedule-toolbar .e-active-view .e-icons {
  color: #fff !important;
  font-weight: 600 !important;
}

/* Datumtitel in mono — het is een meetwaarde */
.e-schedule .e-schedule-toolbar .e-date-range .e-tbar-btn-text,
.e-schedule .e-schedule-toolbar .e-day-date-header {
  font-family: var(--font-mono) !important;
  font-weight: 600 !important;
  color: var(--ink) !important;
  letter-spacing: -.01em;
}

/* Kopcellen met de dagnamen */
.e-schedule .e-date-header-wrap table td,
.e-schedule .e-header-cells,
.e-schedule .e-header-row .e-header-cells {
  background: var(--surface-2) !important;
  border-color: var(--hair) !important;
  color: var(--muted) !important;
  font: 600 10.5px var(--font-mono) !important;
  letter-spacing: .14em !important;
  text-transform: uppercase !important;
}

.e-schedule .e-date-header-wrap,
.e-schedule .e-time-cells-wrap,
.e-schedule .e-content-wrap { border-color: var(--hair) !important; }

/* Werkcellen */
.e-schedule .e-work-cells,
.e-schedule .e-month-view .e-work-cells,
.e-schedule .e-timeline-view .e-work-cells {
  background: var(--surface) !important;
  border-color: var(--hair) !important;
  color: var(--ink-2) !important;
}

.e-schedule .e-work-cells:hover { background: var(--surface-2) !important; }
.e-schedule .e-work-hours { background: var(--surface-2) !important; }
.e-schedule .e-other-month, .e-schedule .e-other-month .e-date-header { color: var(--muted) !important; opacity: .55; }
.e-schedule .e-alternate-cells, .e-schedule .e-time-cells {
  background: var(--surface) !important;
  color: var(--muted) !important;
  font: 500 11px var(--font-mono) !important;
  border-color: var(--hair) !important;
}

/* Datumnummers */
.e-schedule .e-month-view .e-date-header,
.e-schedule .e-date-header {
  font: 600 12px var(--font-mono) !important;
  color: var(--ink-2) !important;
}

/* Vandaag */
.e-schedule .e-current-date .e-date-header,
.e-schedule .e-current-day {
  background: var(--brand) !important;
  color: #fff !important;
  border-radius: var(--r-pill) !important;
  padding: 2px 7px !important;
  display: inline-block;
}

.e-schedule .e-selected-cell { background: var(--aqua-soft) !important; }

/* Afspraken — de dragers van betekenis */
.e-schedule .e-appointment {
  border: none !important;
  border-radius: var(--r-field) !important;
  box-shadow: 0 4px 12px -8px rgba(0,0,0,.5) !important;
  font-family: var(--font-ui) !important;
  transition: transform var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease), filter var(--dur-2) var(--ease) !important;
}

.e-schedule .e-appointment:hover { transform: translateY(-1px); filter: brightness(1.06); box-shadow: 0 10px 22px -12px rgba(0,0,0,.6) !important; }
.e-schedule .e-appointment .e-subject { font-weight: 600 !important; font-size: 12px !important; }
.e-schedule .e-appointment .e-time, .e-schedule .e-appointment .e-date-time { font: 500 10.5px var(--font-mono) !important; opacity: .9; }
.e-schedule .e-appointment.e-appointment-border, .e-schedule .e-appointment:focus { box-shadow: 0 0 0 2px var(--aqua) !important; }

/* "+ x meer" indicator */
.e-schedule .e-more-indicator {
  color: var(--aqua) !important;
  font: 600 11px var(--font-mono) !important;
  background: transparent !important;
}

.e-schedule .e-more-indicator:hover { text-decoration: underline; }

/* ── Popups (snelinfo, meer-lijst) in het thema ─────────────────────────── */
.e-quick-popup-wrapper,
.e-more-popup-wrapper,
.e-schedule-dialog .e-dlg-content,
.e-schedule-dialog {
  background: var(--surface) !important;
  color: var(--ink) !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--r-card) !important;
  box-shadow: var(--shadow-pop) !important;
  font-family: var(--font-ui) !important;
}

.e-quick-popup-wrapper .e-popup-header,
.e-more-popup-wrapper .e-more-event-header {
  background: var(--surface-2) !important;
  border-bottom: 1px solid var(--hair) !important;
  color: var(--ink) !important;
  border-radius: var(--r-card) var(--r-card) 0 0 !important;
}

.e-quick-popup-wrapper .e-subject-wrap .e-subject,
.e-quick-popup-wrapper .e-popup-header .e-subject { font-weight: 600 !important; color: var(--ink) !important; }

.e-quick-popup-wrapper .e-popup-content,
.e-more-popup-wrapper .e-more-event-content { background: var(--surface) !important; color: var(--ink-2) !important; }

.e-quick-popup-wrapper .e-date-time-details,
.e-quick-popup-wrapper .e-location-details,
.e-quick-popup-wrapper .e-subject-details { font: 500 12px var(--font-mono) !important; color: var(--ink-2) !important; }

.e-quick-popup-wrapper .e-popup-footer {
  background: var(--surface) !important;
  border-top: 1px solid var(--hair) !important;
  border-radius: 0 0 var(--r-card) var(--r-card) !important;
  padding: 12px 14px !important;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.e-quick-popup-wrapper .e-popup-footer form { margin: 0 !important; }

/* Knoppen in popups volgen de knopstijl van de site */
.e-quick-popup-wrapper .e-btn,
.e-more-popup-wrapper .e-btn,
.e-schedule .e-btn {
  border-radius: var(--r-field) !important;
  font: 600 12.5px var(--font-ui) !important;
  padding: 8px 14px !important;
  border: 1px solid var(--line) !important;
  background: var(--surface-2) !important;
  color: var(--ink) !important;
  box-shadow: none !important;
  text-transform: none !important;
  transition: transform var(--dur-2) var(--ease), background var(--dur-2) var(--ease) !important;
}

.e-quick-popup-wrapper .e-btn:hover { background: var(--surface-3) !important; }
.e-quick-popup-wrapper .e-btn:active { transform: scale(.96); }
.e-quick-popup-wrapper .e-btn:disabled, .e-quick-popup-wrapper .e-btn[disabled] { opacity: .75; }

/* Rolbevestigende accentknop (bv. "Apply Availability") */
.e-quick-popup-wrapper .e-btn.e-primary,
.e-quick-popup-wrapper form .e-btn {
  background: var(--aqua) !important;
  border-color: var(--aqua) !important;
  color: #fff !important;
}

.e-quick-popup-wrapper form .e-btn:hover { filter: brightness(1.07); }

.e-quick-popup-wrapper .e-icons, .e-more-popup-wrapper .e-icons { color: var(--muted) !important; }
.e-quick-popup-wrapper .e-close:hover, .e-more-popup-wrapper .e-close:hover { color: var(--ink) !important; }

/* De statusstrook die de views zelf injecteren, mag niet lichtgrijs blijven */
.e-quick-popup-wrapper .e-popup-footer > div[style] { background: var(--surface-2) !important; color: var(--ink-2) !important; border-radius: var(--r-field); }

/* ── Resource-/statuslegenda binnen de agenda ───────────────────────────── */
.e-schedule .e-resource-cells { background: var(--surface-2) !important; color: var(--ink) !important; border-color: var(--hair) !important; font: 600 11px var(--font-mono) !important; }

/* ── Overige Syncfusion-onderdelen die in agenda's meekomen ─────────────── */
.e-schedule .e-toolbar .e-input-group,
.e-schedule .e-dropdown-popup { background: var(--surface) !important; border-color: var(--line) !important; }
.e-dropdown-popup ul .e-item { color: var(--ink-2) !important; font-family: var(--font-ui) !important; }
.e-dropdown-popup ul .e-item:hover { background: var(--surface-2) !important; color: var(--ink) !important; }

/* Scrollbars binnen de agenda volgen de site */
.e-schedule ::-webkit-scrollbar-thumb { background: var(--surface-3); }

/* Mobiel: de agenda mag nooit uit de kaart lopen */
.calendar-shell, .calendar-body { min-width: 0; max-width: 100%; }
.calendar-body > .e-schedule { max-width: 100%; }

@media (max-width: 760px) {
  .e-schedule .e-appointment .e-subject { font-size: 11px !important; }
  .e-schedule .e-schedule-toolbar .e-tbar-btn-text { font-size: 12px !important; }
  .calendar-shell { border-radius: var(--r-card); }

  /* Werkbalk: ".e-schedule .e-btn" hierboven geeft elke knop 8px 14px
     padding — ook de toolbarknoppen. Op een telefoon past de rij dan niet
     meer en verdwijnen knoppen in het overloopmenu. Compacter, maar wel
     minstens 36px hoog om aan te tikken. */
  .e-schedule .e-schedule-toolbar { padding: 4px !important; }
  .e-schedule .e-schedule-toolbar .e-tbar-btn { padding: 6px 8px !important; min-height: 36px; }

  /* Dagkoppen: in weekweergave is een kolom ~40px breed. Met .14em
     letterspatiëring liep "MON" daar uit de cel. */
  .e-schedule .e-date-header-wrap table td,
  .e-schedule .e-header-cells,
  .e-schedule .e-header-row .e-header-cells {
    font-size: 10px !important;
    letter-spacing: .04em !important;
  }

  .e-schedule .e-current-date .e-date-header,
  .e-schedule .e-current-day { padding: 1px 5px !important; }

  .e-schedule .e-appointment .e-time,
  .e-schedule .e-appointment .e-date-time { font-size: 10px !important; }
}

/* Touch: een aangetikte afspraak blijft niet "zweven" (plakkende hover). */
@media (hover: none) {
  .e-schedule .e-appointment:hover { transform: none; filter: none; }
}

/* ── Statusstrook en knoppen die de agenda-views zelf injecteren ────────── */
.e-quick-popup-wrapper .cal-popup-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 9px 11px;
  margin-bottom: 4px;
  background: var(--surface-2);
  border-radius: var(--r-field);
}

.e-quick-popup-wrapper .cal-popup-stats .kicker { color: var(--muted); }
.e-quick-popup-wrapper .cal-popup-stats .mono { font: 600 12px var(--font-mono); color: var(--ink); }
.e-quick-popup-wrapper .cal-popup-actions { display: flex; gap: 8px; flex-wrap: wrap; width: 100%; }
.e-quick-popup-wrapper .cal-popup-actions form { flex: 1; margin: 0 !important; }
.e-quick-popup-wrapper .cal-popup-actions .e-btn { width: 100%; }

.e-quick-popup-wrapper .e-btn.is-muted { background: var(--surface-3) !important; color: var(--muted) !important; border-color: transparent !important; }
.e-quick-popup-wrapper .e-btn.is-warn  { background: var(--warn-soft) !important; color: var(--warn) !important; border-color: transparent !important; }
.e-quick-popup-wrapper .e-btn.is-good  { background: var(--good-soft) !important; color: var(--good) !important; border-color: transparent !important; }
.e-quick-popup-wrapper .e-btn.is-red   { background: var(--red-soft) !important; color: var(--red) !important; border-color: transparent !important; }

/* ── Syncfusion-iconen ───────────────────────────────────────────────────
   De regels hierboven zetten fonts op knoppen, toolbars en popups. Iconen
   (.e-icons) moeten hun eigen iconfont houden, anders tonen ze lege vakjes. */
.e-schedule .e-icons,
.e-schedule-dialog .e-icons,
.e-quick-popup-wrapper .e-icons,
.e-more-popup-wrapper .e-icons,
.e-dropdown-popup .e-icons,
.e-popup .e-icons,
.e-calendar .e-icons,
.e-treeview .e-icons,
.e-grid .e-icons {
  font-family: 'e-icons' !important;
}
