:root { --nstp-brand: #ec5598; }

.nstp-wrap{
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 14px;
  padding: 16px;
  max-width: 980px;
  background: #fff;
}

.nstp-header{ margin-bottom: 12px; }
.nstp-title{ font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.nstp-subtitle{ color: rgba(0,0,0,.65); font-size: 14px; }

.nstp-cal-controls{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin:10px 0 12px;
}

.nstp-btn{
  appearance:none;
  border:0;
  background: var(--nstp-brand);
  color:#fff;
  padding:10px 14px;
  border-radius:12px;
  cursor:pointer;
  font-weight:650;
}
.nstp-btn:disabled{ opacity:.65; cursor:not-allowed; }

.nstp-month-label{ font-size:16px; font-weight:700; text-transform:capitalize; }

.nstp-table{ width:100%; border-collapse:collapse; table-layout:fixed; }
.nstp-table th{ text-align:center; padding:10px 6px; font-size:12px; color:rgba(0,0,0,.7); }
.nstp-table td{ border:1px solid rgba(0,0,0,.08); vertical-align:top; height:120px; padding:8px; }
.nstp-empty{ background: rgba(0,0,0,.02); }

.nstp-daynum{ font-weight:700; font-size:13px; margin-bottom:6px; }
.nstp-slots{ display:flex; flex-direction:column; gap:6px; }

.nstp-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width: 100%;
  min-height: 30px;
  border-radius: 10px;
  padding: 6px 8px;
  font-size: 12px;
  font-weight: 750;
  user-select:none;
  text-align:center;
  line-height: 1.1;
  box-sizing: border-box;
}
.nstp-badge.free{ background: rgba(0,160,60,.12); color: rgb(0,115,45); }
.nstp-badge.booked{ background: rgba(220,40,40,.12); color: rgb(165,0,0); }
/* gesperrt = rot (heller), wie von Ines gewünscht */
.nstp-badge.blocked{ background: rgba(220,40,40,.18); color: rgb(165,0,0); }

.nstp-badge.is-free{ cursor:pointer; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.nstp-badge.is-free:hover{ transform: translateY(-1px); }

.nstp-legend{
  display:flex;
  gap:14px;
  flex-wrap:wrap;
  margin-top:12px;
  color: rgba(0,0,0,.7);
  font-size: 13px;
}
.nstp-legend-item{ display:inline-flex; align-items:center; gap:8px; }
.nstp-dot{ width:10px; height:10px; border-radius:999px; display:inline-block; }
.nstp-dot.free{ background: rgb(0,160,60); }
.nstp-dot.booked{ background: rgb(220,40,40); }
.nstp-dot.blocked{ background: rgb(165,0,0); }

/* Modal */
.nstp-modal{
  position:fixed;
  inset:0;
  background: rgba(0,0,0,.45);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
  z-index:9999;
}
.nstp-modal-card{
  width:min(520px, 100%);
  background:#fff;
  border-radius:16px;
  padding:16px;
  box-shadow: 0 10px 40px rgba(0,0,0,.22);
  position:relative;
}
.nstp-modal-close{
  position:absolute;
  right:10px;
  top:8px;
  border:0;
  background:transparent;
  font-size:26px;
  cursor:pointer;
  line-height:1;
}
.nstp-modal-title{ font-weight:800; font-size:16px; margin-bottom:10px; }

.nstp-form{ display:grid; gap:10px; }
.nstp-form label{ display:grid; gap:6px; font-size:13px; color:rgba(0,0,0,.75); }
.nstp-form input, .nstp-form select, .nstp-form textarea{
  width:100%;
  border:1px solid rgba(0,0,0,.14);
  border-radius:12px;
  padding:10px 12px;
  font-size:14px;
}
.nstp-form-msg{ min-height:18px; font-size:13px; color:rgba(0,0,0,.75); }
.nstp-form-msg.is-ok{ color: rgb(0,115,45); font-weight:650; }
.nstp-form-msg.is-err{ color: rgb(165,0,0); font-weight:650; }

/* ===== FINAL: Theme-Isolation (mobil-sicher) ===== */
/* Isoliert den Kalender vollständig von Theme-CSS, ohne Funktionalität zu brechen */
.nstp-wrap {
  isolation: isolate;
}

.nstp-wrap * {
  box-sizing: border-box;
}

/* Schutz vor Theme-Transforms / Scroll-Snap / Position Hacks */
.nstp-wrap,
.nstp-wrap * {
  transform: none !important;
  scroll-snap-type: none !important;
}

/* Erzwinge saubere Grid-Breite */
.nstp-grid {
  width: 100%;
  max-width: 100%;
}

/* Mobile Fix: verhindere ungewollte Verschiebung */
@media (max-width: 768px){
  .nstp-wrap {
    position: relative !important;
    left: 0 !important;
    right: 0 !important;
  }

/* === NSTP MODAL – ABSOLUT STABIL (WP + ADMIN BAR) === */

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

.nstp-modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 999999 !important;

  background: rgba(0,0,0,0.55);

  display: flex;
  justify-content: center;
  align-items: flex-start;

  padding: env(safe-area-inset-top) 16px env(safe-area-inset-bottom);
  overflow-y: auto;
}

.nstp-modal-card {
  width: 100%;
  max-width: 420px;
  margin: 24px auto;

  max-height: calc(100dvh - 48px);
  overflow-y: auto;

  box-sizing: border-box;
}


}