/* NDPVBC Modals — A1.0.12 */

/* overlay altijd boven alles */
.ndpvbc-modal{
  position:fixed !important;
  inset:0 !important;
  z-index:2147483647 !important;

  display:none !important;
  align-items:center !important;
  justify-content:center !important;

  padding:24px 16px !important;
  overflow:auto !important;
}

.ndpvbc-modal.is-open{ display:flex !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(760px,94vw) !important;
  margin:0 !important;

  background:#fff !important;
  border-radius:14px !important;
  padding:18px !important;

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

  max-height:calc(100vh - 48px) !important;
  overflow:auto !important;
}

.ndpvbc-modal__header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}

.ndpvbc-modal__title{
  font-size:20px;
  font-weight:800;
  margin:0;
}

.ndpvbc-modal__close{
  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;
}

body.ndpvbc-modal-open{ overflow:hidden !important; }

/* adminbar safe-top */
body.admin-bar .ndpvbc-modal{
  padding-top:calc(24px + var(--wp-admin--admin-bar--height,32px) + var(--ndpvbc-safe-top, 0px)) !important;
}
body.admin-bar .ndpvbc-modal__dialog{
  max-height:calc(100vh - 48px - var(--wp-admin--admin-bar--height,32px) - var(--ndpvbc-safe-top, 0px)) !important;
}

/* Divi fixed header safe-top (Divi: #main-header) */
.ndpvbc-modal{
  padding-top:calc(24px + var(--ndpvbc-safe-top, 0px)) !important;
}
.ndpvbc-modal__dialog{
  max-height:calc(100vh - 48px - var(--ndpvbc-safe-top, 0px)) !important;
}

@media (max-width:680px){
  .ndpvbc-modal__dialog{ width:min(96vw, 560px) !important; }
}

/* Compact variant (login) */
.ndpvbc-modal--login .ndpvbc-modal__dialog{
  width:min(450px,92vw) !important;
}



/* Modal action row (reusable) */
.ndpvbc-modal-actions{
  display:flex;
  gap:10px;
  justify-content:flex-end;
  align-items:center;
  margin-top:12px;
  flex-wrap:wrap;
}

/* Modal messages */
.ndpvbc-modal .ndpvbc-msg{
  margin-top:10px;
  font-weight:700;
}
.ndpvbc-modal .ndpvbc-msg.is-error{
  color:#c0392b;
}

/* Project create form grid (scoped to modal) */
.ndpvbc-projform{ display:grid; gap:12px; }
.ndpvbc-projform .ndpvbc-row-2{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.ndpvbc-projform .ndpvbc-row-2.wide-narrow{ grid-template-columns:2fr 1fr; }
.ndpvbc-projform .ndpvbc-field label{ display:block; font-weight:700; margin:0 0 6px; }
.ndpvbc-projform .ndpvbc-field input,
.ndpvbc-projform .ndpvbc-field textarea,
.ndpvbc-projform .ndpvbc-field select{ width:100%; }

.ndpvbc-field-error{
  color:#c0392b;
  font-size:12px;
  margin-top:6px;
}

@media(max-width:680px){
  .ndpvbc-projform .ndpvbc-row-2,
  .ndpvbc-projform .ndpvbc-row-2.wide-narrow{
    grid-template-columns:1fr;
  }
}

.ndpvbc-projform-section{ margin-top:6px; font-weight:800; }
