/* Theme-agnostic UI. Alles geprefixed met ndpvbc- */

.ndpvbc-app {
  position: relative;
  /* Hotfix (A1.0.12): module 1 heeft eigen container (90% / max 1440px).
     Daarom mag de app shell zelf niet op 860px blijven klemmen. */
  max-width: 100%;
  margin: 0 auto;
  line-height: 1.45;
}

.ndpvbc-alert {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(0,0,0,.04);
  color: rgba(0,0,0,.8);
  display: none;
}
.ndpvbc-alert.is-error { display: block; background: rgba(180,35,24,.08); color: #b42318; }
.ndpvbc-alert.is-success { display: block; background: rgba(6,118,71,.08); color: #067647; }

.ndpvbc-inline-alert{
  margin: 12px 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 193, 7, .15);
  color: rgba(0,0,0,.85);
  border: 1px solid rgba(0,0,0,.08);
}

.ndpvbc-app__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 12px;
  padding: 16px 18px;
}

.ndpvbc-app__title { font-size: 18px; font-weight: 800; margin: 0; }
.ndpvbc-app__subtitle { font-size: 13px; color: rgba(0,0,0,.65); margin-top: 2px; }

.ndpvbc-app__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ndpvbc-user { font-size: 13px; color: rgba(0,0,0,.7); }

.ndpvbc-app__content {
  margin-top: 12px;
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 12px;
  padding: 18px;
  min-height: 220px;
}

.ndpvbc-panel {
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 12px;
  padding: 18px;
}

.ndpvbc-h3 { margin: 18px 0 10px; }
.ndpvbc-hr { margin: 18px 0; border:0; border-top:1px solid rgba(0,0,0,.10); }

.ndpvbc-form { display: grid; gap: 12px; }
.ndpvbc-label { display: grid; gap: 6px; font-weight: 600; }
.ndpvbc-req { color: #b42318; font-weight: 800; }

.ndpvbc-input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid rgba(0,0,0,.18);
  border-radius: 10px;
  font-size: 16px;
}

.ndpvbc-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.ndpvbc-span-2{ grid-column: span 2; }

.ndpvbc-checkgrid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 10px;
}
.ndpvbc-check{
  display:flex;
  align-items:flex-start;
  gap:10px;
  font-weight: 500;
  color: rgba(0,0,0,.85);
}
.ndpvbc-check input{ margin-top: 3px; }

.ndpvbc-btn {
  appearance: none;
  border: 0;
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 16px;
  cursor: pointer;
}
.ndpvbc-btn--primary { background: #1e6bff; color: #fff; }
.ndpvbc-btn--ghost { background: rgba(0,0,0,.06); color: rgba(0,0,0,.85); }
.ndpvbc-btn--nowrap { white-space: nowrap; }
.ndpvbc-btn[disabled] { opacity: .6; cursor: not-allowed; }

.ndpvbc-links { margin-top: 10px; font-size: 14px; }
.ndpvbc-link { color: #1e6bff; text-decoration: none; }
.ndpvbc-link:hover { text-decoration: underline; }
.ndpvbc-sep { margin: 0 8px; color: rgba(0,0,0,.4); }

.ndpvbc-msg { min-height: 18px; font-size: 14px; color: rgba(0,0,0,.75); }
.ndpvbc-msg.is-error { color: #b42318; }
.ndpvbc-msg.is-success { color: #067647; }

/* Tabs */
.ndpvbc-tabs{
  display:flex;
  gap: 8px;
  margin-bottom: 12px;
}
.ndpvbc-tab{
  border: 1px solid rgba(0,0,0,.12);
  background: rgba(0,0,0,.03);
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
}
.ndpvbc-tab.is-active{
  background: #1e6bff;
  color:#fff;
  border-color: rgba(0,0,0,.0);
}

/* Overlay lock */
.ndpvbc-lock {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(255,255,255,.60);
  border-radius: 12px;
}

.ndpvbc-lock__card {
  width: min(520px, 92vw);
  background: #fff;
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 16px 50px rgba(0,0,0,.20);
}

.ndpvbc-lock__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.ndpvbc-lock__title { font-size: 18px; font-weight: 800; margin: 0 0 4px; }
.ndpvbc-lock__desc { font-size: 14px; color: rgba(0,0,0,.7); margin: 0; }

/* =========================
   Modal overlay (CENTER-CENTER)
   ========================= */

/* Als je nog oude regels hebt zoals:
   .ndpvbc-modal__dialog { margin: 8vh auto 0; }
   -> die MOET weg.
*/

.ndpvbc-modal[aria-hidden="true"] { 
  display: none !important; 
}

.ndpvbc-modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147483647 !important;

  /* echte center-center */
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  /* kleine veilige padding zodat het op kleine schermen niet “plakt” */
  padding: 24px 16px !important;

  /* als het scherm te klein is: kunnen scrollen */
  overflow: auto !important;
}

.ndpvbc-modal__backdrop {
  position: absolute !important;
  inset: 0 !important;
  background: rgba(0,0,0,.55) !important;
}

.ndpvbc-modal__dialog {
  position: relative !important;

  width: min(450px, 92vw) !important;
  margin: 0 !important;              /* KEY: geen 8vh auto */
  background: #fff !important;

  border-radius: 14px !important;
  padding: 18px !important;

  box-shadow: 0 16px 50px rgba(0,0,0,.35) !important;

  /* nooit buiten beeld */
  max-height: calc(100vh - 48px) !important;
  overflow: auto !important;
}

.ndpvbc-modal__close {
  position: absolute !important;
  right: 10px !important;
  top: 8px !important;

  width: 40px !important;
  height: 40px !important;

  border-radius: 10px !important;
  border: 0 !important;
  background: rgba(0,0,0,.06) !important;

  font-size: 28px !important;
  line-height: 1 !important;
  cursor: pointer !important;
}

@media (max-width: 520px) {
  .ndpvbc-modal {
    padding: 16px 12px !important;
  }
  .ndpvbc-modal__dialog {
    max-height: calc(100vh - 32px) !important;
  }
  .ndpvbc-app__header { flex-direction: column; align-items:flex-start; }
  .ndpvbc-app__actions { justify-content: flex-start; }
  .ndpvbc-grid{ grid-template-columns: 1fr; }
  .ndpvbc-span-2{ grid-column: auto; }
  .ndpvbc-checkgrid{ grid-template-columns: 1fr; }
  .ndpvbc-lock__row { flex-direction: column; align-items: stretch; }
  .ndpvbc-btn--nowrap { width: 100%; }
}
