/* =====================================================================
   assets/css/tijdlijn.css  -  Tijdlijn per regel (portaal én beheer)
   ===================================================================== */

.gt-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Legenda ---------- */
.gt-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 13px; color: #5f5775; }
.gt-legend li { display: flex; align-items: center; gap: 8px; }
.gt-key { width: 24px; height: 12px; border-radius: 4px; }
.gt-key.st-afgerond { background: #dcfce7; border: 1px solid #86efac; }
.gt-key.st-bezig    { background: linear-gradient(90deg, #6E4DFF, #FF5A8B); }
.gt-key.st-gepland  { background: #f1ecff; border: 1px dashed #a898e8; }
.gt-key-ms { width: 11px; height: 11px; background: #1d1530; transform: rotate(45deg); border-radius: 2px; }
.gt-key-today { width: 2px; height: 16px; background: #e11d48; }

/* ---------- Kaart en kolommen ---------- */
.gt-card { background: #ffffff; border: 1px solid #e7e2f1; border-radius: 18px; padding: 16px 0 16px 16px; overflow: hidden; }
.gt { display: flex; }
.gt-labels { width: 210px; flex-shrink: 0; padding-right: 12px; border-right: 1px solid #e7e2f1; }
.gt-head-space { height: 64px; }

/* ---------- Regellabel: alles op één lijn ---------- */
.gt-lane-label {
  display: flex; align-items: center; gap: 8px; box-sizing: border-box;
  border-top: 1px solid #efebf6; background: #ffffff;
}
.gt-lane-title {
  flex: 1; min-width: 0; font-size: 14px; font-weight: 700; color: #1d1530;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.gt-lane-mini { width: 34px; height: 5px; flex-shrink: 0; border-radius: 99px; background: #ece7f5; overflow: hidden; }
.gt-lane-mini > span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #6E4DFF, #FF5A8B); }
.gt-lane-pct { min-width: 30px; flex-shrink: 0; text-align: right; font-size: 11px; font-weight: 700; color: #5f5775; }

/* ---------- Tijdas ---------- */
.gt-scroll { flex: 1; min-width: 0; overflow-x: auto; overflow-y: hidden; padding-bottom: 6px; scroll-behavior: smooth; }
.gt-canvas { position: relative; padding-right: 20px; box-sizing: content-box; }
.gt-months, .gt-weeks { position: relative; }
.gt-months { height: 24px; }
.gt-month {
  position: absolute; top: 0; height: 24px; padding-left: 8px; box-sizing: border-box;
  font-size: 12px; font-weight: 700; color: #4f32d6; white-space: nowrap; overflow: hidden;
  border-left: 2px solid #d9d1ea;
}
.gt-weeks { height: 40px; }
.gt-week {
  position: absolute; top: 0; height: 40px; padding-left: 8px; box-sizing: border-box;
  display: flex; flex-direction: column; justify-content: center; border-left: 1px solid #efebf6;
}
.gt-week strong { font-size: 12px; font-weight: 700; }
.gt-week span { font-size: 11px; color: #5f5775; }

.gt-body { position: relative; }
.gt-grid { position: absolute; top: 0; bottom: 0; width: 1px; background: #efebf6; }
.gt-grid.is-odd { background: #f5f2fa; }
.gt-row { position: absolute; left: 0; right: 0; border-top: 1px solid #efebf6; }

/* ---------- Blokken ---------- */
.gt-bar {
  position: absolute; height: 44px; box-sizing: border-box; border-radius: 12px;
  padding: 0 10px; display: flex; align-items: center; justify-content: space-between; gap: 6px;
  font-size: 13px; font-weight: 700; text-decoration: none; overflow: hidden;
  background: #f1ecff; color: #3b2f5c; border: 1px dashed #a898e8;
  transition: transform .12s ease, box-shadow .12s ease;
}
.gt-bar:hover { transform: translateY(-1px); color: inherit; }
.gt-bar.st-afgerond { background: #dcfce7; color: #14532d; border: 1px solid #86efac; }
.gt-bar.st-bezig    { background: linear-gradient(90deg, #6E4DFF, #FF5A8B); color: #fff; border: 1px solid transparent; }
.gt-bar.st-bezig:hover { color: #fff; }
.gt-bar.is-sel { box-shadow: 0 0 0 3px #fff, 0 0 0 5px #1d1530; }
.gt-bar.is-short { justify-content: center; padding: 0 4px; }
.gt-bar-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.gt-count {
  flex-shrink: 0; min-width: 20px; height: 20px; padding: 0 6px; box-sizing: border-box; border-radius: 99px;
  display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800;
  background: #fff; color: #1d1530;
}
.gt-bar.st-bezig .gt-count { background: rgba(255,255,255,.28); color: #fff; }

/* Naam naast een kort blok */
.gt-out {
  position: absolute; height: 44px; display: flex; align-items: center;
  font-size: 13px; font-weight: 700; color: #3b2f5c; white-space: nowrap; pointer-events: none;
}

/* ---------- Mijlpalen ---------- */
.gt-ms {
  position: absolute; height: 44px; display: flex; align-items: center; gap: 10px; padding-right: 8px;
  text-decoration: none; color: #1d1530; border-radius: 8px; white-space: nowrap;
}
.gt-diamond { width: 18px; height: 18px; margin-left: 2px; background: #1d1530; transform: rotate(45deg); border-radius: 3px; flex-shrink: 0; }
.gt-ms.st-afgerond .gt-diamond { background: #15803d; }
.gt-ms-text { font-size: 13px; font-weight: 700; }
.gt-ms.is-sel { outline: 2px solid #1d1530; outline-offset: 2px; }

/* ---------- Vandaag ---------- */
.gt-today { position: absolute; top: 0; bottom: 0; width: 2px; background: #e11d48; pointer-events: none; z-index: 3; }
.gt-today span {
  position: absolute; top: -20px; left: -27px; width: 56px; text-align: center;
  font-size: 11px; font-weight: 700; color: #fff; background: #e11d48; border-radius: 6px; padding: 1px 0;
}

.gt-bar:focus-visible, .gt-ms:focus-visible, .gt-add:focus-visible, .gt-grip:focus-visible,
.gt-scroll:focus-visible, .gt-newlane-btn:focus-visible { outline: 3px solid #6E4DFF; outline-offset: 2px; }

/* =====================================================================
   Alleen in beheer: bewerken, slepen, regels verplaatsen
   ===================================================================== */
.gt-add {
  width: 26px; height: 26px; flex-shrink: 0; border-radius: 8px; border: 0; padding: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  background: #f1ecff; color: #4f32d6; text-decoration: none;
}
.gt-add:hover { background: #6E4DFF; color: #ffffff; }

.gt-grip {
  width: 22px; height: 32px; flex-shrink: 0; margin-left: -6px; border: 0; border-radius: 7px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: #a39bb8; cursor: grab; touch-action: none;
}
.gt-grip:hover { background: #f1ecff; color: #4f32d6; }
.gt-lane-label.is-lane-drag, .gt-row.is-lane-drag { z-index: 30; box-shadow: 0 10px 24px rgba(29, 21, 48, .2); background: #ffffff; }
.gt-lane-label.is-lane-drag { position: relative; border-radius: 10px; }
.gt-lane-label.is-lane-drag .gt-grip { cursor: grabbing; }
.gt-lane-drop { position: absolute; left: 0; right: 0; height: 3px; border-radius: 3px; background: #6E4DFF; z-index: 31; pointer-events: none; }

.gt-editable .gt-drag { cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.gt-editable .gt-drag:hover { transform: none; }
.gt-editable .gt-drag.is-drag {
  cursor: grabbing; z-index: 20; transition: none;
  box-shadow: 0 10px 24px rgba(29, 21, 48, .28);
}
.gt-editable .gt-bar { padding: 0 14px; }
.gt-editable .gt-bar.is-short { padding: 0 4px; }
.gt-h { position: absolute; top: 0; bottom: 0; width: 10px; cursor: ew-resize; z-index: 2; }
.gt-h.l { left: 0; }
.gt-h.r { right: 0; }
.gt-h::after {
  content: ""; position: absolute; top: 13px; bottom: 13px; left: 4px; width: 2px;
  border-radius: 2px; background: currentColor; opacity: 0; transition: opacity .12s ease;
}
.gt-bar:hover .gt-h::after, .gt-bar.is-sel .gt-h::after, .gt-bar.is-drag .gt-h::after { opacity: .5; }
.gt-row.is-target { background: rgba(110, 77, 255, .06); }
.gt-lane-label.is-target .gt-lane-title { color: #4f32d6; }

/* Onderste rij: nieuwe regel */
.gt-newlane-label {
  height: 48px; display: flex; align-items: center; border-top: 1px dashed #d9d1ea;
}
.gt-newlane-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 8px 0 0;
  border: 0; background: transparent; color: #4f32d6; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; border-radius: 8px;
}
.gt-newlane-btn .gt-add { pointer-events: none; }
.gt-newlane-btn:hover .gt-add { background: #6E4DFF; color: #fff; }
.gt-newlane-row {
  position: absolute; left: 0; right: 0; height: 48px; border-top: 1px dashed #d9d1ea;
  display: flex; align-items: center; padding-left: 14px; font-size: 12px; color: #8a8299;
}
.gt-newlane-row span { position: sticky; left: 14px; }
.gt-newlane-row.is-target { background: rgba(110, 77, 255, .08); color: #4f32d6; font-weight: 700; }

.gt-undated { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: #5f5775; }
.gt-chip {
  height: 34px; padding: 0 12px; border-radius: 99px; border: 1px dashed #a898e8; background: #f1ecff;
  color: #3b2f5c; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.gt-chip.is-sel { border-style: solid; border-color: #1d1530; }

/* Uitleg achter "Zo werkt slepen" */
.gt-help { position: relative; font-size: 13px; color: #5f5775; }
.gt-help summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  min-height: 36px; padding: 0 10px; border-radius: 10px; font-weight: 600; color: #4f32d6;
}
.gt-help summary::-webkit-details-marker { display: none; }
.gt-help summary:hover { background: #f1ecff; }
.gt-help[open] summary { background: #f1ecff; }
.gt-help-body {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; width: min(380px, 80vw);
  background: #ffffff; border: 1px solid #e7e2f1; border-radius: 14px; padding: 14px 16px;
  box-shadow: 0 16px 40px rgba(29, 21, 48, .16); color: #374151; line-height: 1.55;
}
.gt-help-body ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }

/* Melding rechtsonder */
.gt-toast {
  position: fixed; right: 24px; bottom: 24px; z-index: 100; max-width: min(420px, calc(100vw - 48px));
  padding: 12px 16px; border-radius: 12px; background: #1d1530; color: #ffffff;
  font-size: 14px; font-weight: 600; box-shadow: 0 10px 30px rgba(29, 21, 48, .3);
  opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .18s ease, transform .18s ease;
}
.gt-toast.is-on { opacity: 1; transform: none; }
.gt-toast.is-err { background: #b91c1c; }

/* ---------- Mobiel ---------- */
@media (max-width: 760px) {
  .gt-labels { width: 150px; padding-right: 8px; }
  .gt-lane-title { font-size: 13px; }
  .gt-lane-mini { display: none; }
}
