/* Locatiebeheer: een omkeerbare, afgebakende visuele laag voor de blokeditor. */
#view-dashboard .gp-builder-workspace {
  --editor-ink: #17392c;
  --editor-muted: #526b60;
  --editor-line: #dbe7df;
  --editor-surface: #ffffff;
  --editor-soft: #f5f9f6;
  --editor-focus: #176f50;
  --editor-radius: 12px;
  --editor-space: 8px;
  color: var(--editor-ink);
}

#view-dashboard .gp-builder-workspace :is(button, a, input, select, summary):focus-visible {
  outline: 3px solid var(--editor-focus);
  outline-offset: 2px;
}

/* Eén zichtbare hoofdactie. Status en geschiedenis blijven dichtbij, maar rustig. */
#view-dashboard .gp-builder-commandbar {
  gap: calc(var(--editor-space) * 2);
  padding: var(--editor-space) calc(var(--editor-space) * 1.25) !important;
  border-color: var(--editor-line) !important;
  background: var(--editor-surface) !important;
  box-shadow: 0 4px 18px rgba(21, 53, 42, .06) !important;
}

#view-dashboard .gp-builder-commandbar .gp-builder-top-actions {
  gap: var(--editor-space);
}

#view-dashboard .gp-builder-commandbar .gp-builder-save-status {
  gap: 6px;
  padding-inline: 8px;
  color: var(--editor-muted) !important;
  font-size: .75rem;
  font-weight: 700;
  white-space: nowrap;
}

#view-dashboard .gp-builder-commandbar .gp-builder-save-status.is-dirty {
  background: #fff4d9;
  color: #76520a !important;
}

#view-dashboard .gp-builder-commandbar .gp-builder-save-status.is-error {
  background: #fff0ee;
  color: #9b342e !important;
}

#view-dashboard .gp-builder-commandbar .gp-builder-history {
  border-color: var(--editor-line) !important;
  box-shadow: none !important;
}

#view-dashboard .gp-builder-commandbar .gp-builder-primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px !important;
  padding: 9px 16px !important;
  border: 1px solid #176f50 !important;
  border-radius: 9px !important;
  background: #176f50 !important;
  color: #fff !important;
  box-shadow: 0 3px 8px rgba(23, 111, 80, .15);
  font-size: .81rem !important;
  font-weight: 800;
  white-space: nowrap;
}

#view-dashboard .gp-builder-commandbar .gp-builder-primary-action:hover {
  background: #105a40 !important;
  border-color: #105a40 !important;
}

#view-dashboard .gp-builder-commandbar .gp-builder-primary-action svg {
  width: 17px;
  height: 17px;
}

#view-dashboard .gp-builder-commandbar .gp-builder-secondary-action {
  min-height: 44px !important;
  border-color: var(--editor-line) !important;
  background: var(--editor-surface) !important;
  color: var(--editor-ink) !important;
  box-shadow: none !important;
  font-weight: 700;
}

#view-dashboard .gp-builder-commandbar .gp-builder-secondary-action:hover {
  background: var(--editor-soft) !important;
  border-color: #a8c5b4 !important;
}

/* De lijst toont titels eerst; afwijkingen zijn compacte, afzonderlijke labels. */
#view-dashboard .gp-content-panel {
  border-color: var(--editor-line);
  background: var(--editor-surface);
}

#view-dashboard .gp-content-panel-heading {
  margin-bottom: calc(var(--editor-space) * 2);
}

#view-dashboard .gp-content-panel-heading h2 {
  color: var(--editor-ink);
  font-size: 1.2rem;
}

#view-dashboard .gp-content-panel-heading p {
  color: var(--editor-muted);
  font-size: .8rem;
  line-height: 1.45;
}

#view-dashboard .gp-content-list {
  gap: 0;
}

#view-dashboard .gp-content-item {
  grid-template-columns: 36px minmax(0, 1fr) auto 42px;
  gap: var(--editor-space);
  min-height: 72px;
  padding: 6px 8px 6px 4px;
  border-color: var(--editor-line);
  border-radius: var(--editor-radius);
  background: var(--editor-surface);
  box-shadow: 0 1px 2px rgba(21, 53, 42, .025);
}

#view-dashboard .gp-content-item:hover,
#view-dashboard .gp-content-item:focus-within {
  border-color: #9fc8b4;
  background: #fbfdfb;
  box-shadow: 0 3px 12px rgba(21, 53, 42, .06);
}

#view-dashboard .gp-content-item.is-hidden {
  background: #f7f9f8;
}

#view-dashboard .gp-content-item-main {
  gap: 12px;
  min-height: 54px;
  padding: 4px;
}

#view-dashboard .gp-content-item-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

#view-dashboard .gp-content-item-main strong {
  max-width: 100%;
  color: var(--editor-ink);
  font-size: .88rem;
  font-weight: 750;
  line-height: 1.3;
}

#view-dashboard .gp-content-item-main small {
  max-width: 100%;
  margin-top: 3px;
  color: var(--editor-muted);
  font-size: .73rem;
  line-height: 1.35;
}

#view-dashboard .gp-content-item-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}

#view-dashboard .gp-content-item-flags em,
#view-dashboard .gp-content-item-main .gp-audience-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin: 0;
  padding: 2px 7px;
  border-radius: 6px;
  background: #eef4ef;
  color: #3a5b48;
  font-size: .68rem;
  font-style: normal;
  font-weight: 700;
  line-height: 1.2;
}

#view-dashboard .gp-content-item-main .gp-audience-badge {
  margin-top: 6px;
  background: #fff2d6;
  color: #76520a;
}

#view-dashboard .gp-visibility-status {
  gap: 5px;
  color: var(--editor-muted);
  font-size: .72rem;
  font-weight: 700;
}

#view-dashboard .gp-visibility-status.is-hidden {
  padding: 4px 7px;
  border-radius: 6px;
  background: #e9edeb;
  color: #465950;
}

/* Tussenposities verschijnen bij aanwijzen of toetsenbordfocus. */
#view-dashboard .gp-content-insert-point {
  z-index: 2;
  min-height: 12px;
  height: 12px;
  margin: 0;
}

#view-dashboard .gp-content-insert-point::before,
#view-dashboard .gp-content-insert-point::after {
  display: none;
}

#view-dashboard .gp-content-insert-point button {
  position: absolute;
  top: 50%;
  left: 50%;
  min-height: 32px;
  padding: 3px 8px;
  transform: translate(-50%, -50%);
  border: 1px solid #a8c5b4;
  border-radius: 999px;
  background: #fff;
  color: #176f50;
  box-shadow: 0 2px 8px rgba(21, 53, 42, .09);
  font-size: .72rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease;
}

#view-dashboard .gp-content-insert-point button svg {
  width: 15px;
  height: 15px;
  padding: 0;
  border: 0;
}

#view-dashboard .gp-content-insert-point button span {
  max-width: none;
  opacity: 1;
}

#view-dashboard .gp-content-item:hover + .gp-content-insert-point button,
#view-dashboard .gp-content-insert-point:hover button,
#view-dashboard .gp-content-insert-point:focus-within button {
  opacity: 1;
  pointer-events: auto;
}

#view-dashboard .gp-add-content-button {
  min-height: 46px;
  margin-top: 16px;
  border-color: #b7cfbf;
  background: var(--editor-soft);
  font-size: .8rem;
}

/* Dezelfde kleuren, afstanden en teksthiërarchie in de bewerkvelden. */
#view-dashboard .gp-block-editor {
  gap: calc(var(--editor-space) * 2);
}

#view-dashboard .gp-block-editor-heading {
  gap: calc(var(--editor-space) * 2);
  padding-block: 4px 12px;
}

#view-dashboard .gp-block-editor-heading h1 {
  color: var(--editor-ink);
  font-size: 1.35rem;
  line-height: 1.2;
}

#view-dashboard .gp-block-editor-heading p {
  color: var(--editor-muted);
  font-size: .68rem;
  letter-spacing: .06em;
}

#view-dashboard .gp-editor-section,
#view-dashboard .gp-language-switcher {
  border-color: var(--editor-line);
  background: var(--editor-surface);
  box-shadow: 0 2px 10px rgba(21, 53, 42, .035);
}

#view-dashboard .gp-editor-section>header {
  gap: 12px;
  padding: 14px 16px;
  border-color: var(--editor-line);
  background: var(--editor-soft);
}

#view-dashboard .gp-editor-section>header>span {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #e2f0e7;
  color: #176f50;
  font-size: .76rem;
}

#view-dashboard .gp-editor-section h2 {
  color: var(--editor-ink);
  font-size: .95rem;
}

#view-dashboard .gp-editor-section header p {
  color: var(--editor-muted);
  font-size: .74rem;
  line-height: 1.4;
}

#view-dashboard .gp-editor-section-body {
  padding: 16px;
}

#view-dashboard .gp-editor-section-body .form-label {
  color: var(--editor-ink);
  font-size: .78rem;
}

#view-dashboard .gp-editor-section-body :is(.form-control, .rte-editor) {
  border-color: #bbd0c2;
  border-radius: 9px;
  font-size: .88rem;
}

#view-dashboard .gp-language-switcher {
  padding: 8px;
}

#view-dashboard .gp-language-switcher button {
  font-size: .75rem;
}

#view-dashboard .gp-setting-disclosure {
  border-color: var(--editor-line);
  border-radius: var(--editor-radius);
}

#view-dashboard .gp-setting-disclosure-main strong {
  color: var(--editor-ink);
  font-size: .78rem;
}

#view-dashboard .gp-setting-disclosure-main small {
  color: var(--editor-muted);
  font-size: .7rem;
}

#view-dashboard .gp-builder-preview-heading strong {
  color: var(--editor-ink);
  font-size: .84rem;
}

#view-dashboard .gp-builder-preview-heading a {
  color: #176f50;
  font-size: .72rem;
}

@media (max-width: 1180px) {
  #view-dashboard .gp-content-item {
    grid-template-columns: 36px minmax(0, 1fr) 42px;
  }

  #view-dashboard .gp-visibility-status.is-visible {
    display: none;
  }

  #view-dashboard .gp-visibility-status.is-hidden {
    grid-column: 2;
    grid-row: 2;
    justify-self: start;
    margin: -3px 0 4px 4px;
  }

  #view-dashboard .gp-content-actions {
    grid-column: 3;
    grid-row: 1 / 3;
  }
}

@media (max-width: 900px) {
  #view-dashboard .gp-builder-commandbar .gp-builder-save-status span {
    display: inline;
  }

  #view-dashboard .gp-builder-commandbar .gp-builder-secondary-action span {
    display: none;
  }
}

@media (max-width: 720px) {
  #view-dashboard .gp-builder-commandbar .gp-builder-top-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    width: 100%;
  }

  #view-dashboard .gp-builder-commandbar .gp-builder-save-status {
    grid-column: 1;
    margin: 0;
  }

  #view-dashboard .gp-builder-commandbar .gp-builder-history {
    grid-column: 2;
  }

  #view-dashboard .gp-builder-commandbar .gp-builder-secondary-action {
    grid-column: 3;
    width: 44px;
    min-width: 44px;
    padding: 0 !important;
  }

  #view-dashboard .gp-builder-commandbar .gp-builder-primary-action:not(.gp-builder-preview-button) {
    grid-column: 1 / -1;
    width: 100%;
  }

  #view-dashboard .gp-builder-commandbar .gp-builder-primary-action.gp-builder-preview-button {
    grid-column: 3;
    width: auto;
  }

  #view-dashboard .gp-content-panel {
    padding: 12px;
  }

  #view-dashboard .gp-editor-section-body {
    padding: 12px;
  }
}

@media (max-width: 430px) {
  #view-dashboard .gp-builder-commandbar .gp-builder-primary-action.gp-builder-preview-button {
    width: auto;
    padding-inline: 12px !important;
  }

  #view-dashboard .gp-builder-commandbar .gp-builder-primary-action.gp-builder-preview-button span {
    display: inline;
  }

  #view-dashboard .gp-content-item {
    grid-template-columns: 28px minmax(0, 1fr) 40px;
    gap: 5px;
    padding-inline: 2px 5px;
  }

  #view-dashboard .gp-content-item-main {
    gap: 8px;
  }
}

@media (hover: none) {
  #view-dashboard .gp-content-insert-point button {
    min-width: 32px;
    padding-inline: 5px;
    opacity: 1;
    pointer-events: auto;
  }

  #view-dashboard .gp-content-insert-point button span {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  #view-dashboard .gp-content-insert-point button {
    transition: none;
  }
}
