/* Digitales Vertragssystem & Mitgliedschafts-Konfigurator — Kids Dojo & Next Gen. Ninjutsu Hamburg */

.nd-membership-wrap {
  font-family: 'Montserrat', sans-serif;
  overflow-x: hidden;
}

/* Explicit layout & vertical rhythm (independent of Tailwind purge) */
.nd-section-stack {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .nd-section-stack {
    gap: 2rem;
  }
}

.nd-section-card {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 0.25rem;
  padding: 1.5rem 1.25rem;
  box-shadow: 0 4px 20px -4px rgba(0, 0, 0, 0.25);
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .nd-section-card {
    padding: 2.25rem 2.5rem;
  }
}

.nd-heading-block {
  margin-bottom: 1.25rem;
}

.nd-heading-title {
  font-size: 1.25rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: hsl(var(--foreground));
}

@media (min-width: 768px) {
  .nd-heading-title {
    font-size: 1.5rem;
  }
}

.nd-heading-sub {
  font-size: 0.85rem;
  line-height: 1.55;
  color: hsl(var(--muted-foreground));
  margin-top: 0.5rem;
}

.nd-divider-block {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid hsl(var(--border));
}

.nd-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: hsl(var(--muted-foreground));
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

/* Card list with guaranteed vertical gap between cards */
.nd-card-list {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.nd-two-col-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .nd-two-col-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }
}

.nd-three-col-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .nd-three-col-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
  }
}

/* Single-Step Progress Bar */
.nd-progress-wrap {
  max-width: 48rem;
  margin: 0 auto 2rem;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 0.25rem;
  padding: 1rem 1.25rem;
  box-sizing: border-box;
}

.nd-progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.nd-progress-title {
  font-size: 0.9rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: hsl(var(--foreground));
}

@media (min-width: 640px) {
  .nd-progress-title {
    font-size: 1rem;
  }
}

.nd-progress-meta {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: hsl(var(--primary));
  white-space: nowrap;
}

.nd-progress-track {
  width: 100%;
  height: 0.55rem;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  overflow: hidden;
}

.nd-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, hsl(var(--primary)), #ef4444);
  border-radius: 9999px;
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Probelauf Sandbox Banner */
.nd-test-banner {
  margin-bottom: 1.75rem;
  background: rgba(245, 158, 11, 0.08);
  border: 1.5px solid rgba(245, 158, 11, 0.45);
  border-radius: 0.25rem;
  padding: 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

@media (min-width: 768px) {
  .nd-test-banner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.nd-test-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.nd-test-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #d97706;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.65rem 1rem;
  border-radius: 0.2rem;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease;
}

.nd-test-btn:hover {
  background: #b45309;
}

.nd-test-btn-sec {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  color: hsl(var(--foreground));
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.65rem 1rem;
  border-radius: 0.2rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.nd-test-btn-sec:hover {
  border-color: hsl(var(--primary));
  color: hsl(var(--primary));
}

/* Package, Module & Goal Cards — Airy & Mobile-First */
.nd-pkg-card {
  position: relative;
  border: 1.5px solid hsl(var(--border));
  background: hsl(var(--card));
  padding: 1.15rem 1.1rem;
  cursor: pointer;
  transition: all 0.18s ease;
  box-sizing: border-box;
  width: 100%;
  border-radius: 0.25rem;
}

@media (min-width: 640px) {
  .nd-pkg-card {
    padding: 1.35rem 1.5rem;
  }
}

.nd-pkg-card:hover {
  border-color: hsl(var(--primary) / 0.6);
}

.nd-pkg-card.selected {
  border-color: hsl(var(--primary));
  background: hsl(var(--primary) / 0.06);
  box-shadow: 0 8px 24px -10px hsl(var(--primary) / 0.25);
}

/* Card inner layout */
.nd-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
}

.nd-card-left {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  min-width: 0;
  flex: 1 1 auto;
}

.nd-card-body {
  min-width: 0;
  flex: 1 1 auto;
}

.nd-card-title {
  font-weight: 800;
  font-size: 0.975rem;
  line-height: 1.3;
  word-break: break-word;
  color: hsl(var(--foreground));
}

@media (min-width: 640px) {
  .nd-card-title {
    font-size: 1.075rem;
  }
}

.nd-card-desc {
  font-size: 0.835rem;
  line-height: 1.55;
  color: hsl(var(--muted-foreground));
  margin-top: 0.35rem;
  word-break: break-word;
}

/* Full-width description & highlights below the top header row (prevents mobile squishing) */
.nd-card-full-body {
  width: 100%;
  margin-top: 0.85rem;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.nd-card-full-body .nd-card-desc {
  margin-top: 0;
  color: rgba(255, 255, 255, 0.82);
}

.nd-card-highlights {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.65rem;
}

.nd-card-highlight-item {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  font-size: 0.78rem;
  line-height: 1.4;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
}

.nd-card-highlight-check {
  color: hsl(var(--primary));
  font-weight: 900;
  flex-shrink: 0;
  margin-top: 0.02rem;
}

.nd-card-price {
  text-align: right;
  flex-shrink: 0;
  white-space: nowrap;
  margin-left: 0.25rem;
}

.nd-check-indicator {
  width: 1.4rem;
  height: 1.4rem;
  margin-top: 0.1rem;
  border: 2px solid rgba(156, 163, 175, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 900;
  transition: all 0.15s ease;
}

.nd-check-indicator.circle {
  border-radius: 9999px;
}

.nd-check-indicator.box {
  border-radius: 0.25rem;
}

.nd-check-indicator.active {
  border-color: hsl(var(--primary));
  background: hsl(var(--primary));
  color: #ffffff;
}

.nd-duration-pill {
  display: inline-block;
  font-size: 0.725rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  background: hsl(var(--muted));
  color: hsl(var(--muted-foreground));
  border-radius: 0.2rem;
  margin-top: 0.35rem;
}

/* Badges */
.nd-badge-popular,
.nd-badge-best,
.nd-badge-goal {
  position: absolute;
  top: -11px;
  right: 12px;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 9px;
  white-space: nowrap;
  border-radius: 0.15rem;
  z-index: 2;
}

.nd-badge-popular {
  background: hsl(var(--primary));
}

.nd-badge-best {
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.nd-badge-goal {
  background: #15803d;
}

/* CTA & Outline Buttons — Guaranteed NEVER to overflow on mobile */
.nd-cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background: hsl(var(--primary));
  color: #ffffff;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.85rem;
  line-height: 1.4;
  padding: 1.1rem 1.15rem;
  border-radius: 0.2rem;
  border: none;
  cursor: pointer;
  text-align: center;
  white-space: normal !important;
  word-break: break-word;
  overflow-wrap: anywhere;
  transition: background 0.2s ease, transform 0.1s ease;
  box-shadow: 0 10px 25px -5px hsl(var(--primary) / 0.35);
  text-decoration: none;
}

@media (min-width: 640px) {
  .nd-cta-btn {
    font-size: 0.95rem;
    padding: 1.2rem 1.5rem;
    letter-spacing: 0.08em;
  }
}

.nd-cta-btn:hover:not(:disabled) {
  background: #b91c1c;
}

.nd-cta-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.nd-cta-btn-amber {
  background: #d97706;
  box-shadow: 0 10px 25px -5px rgba(217, 119, 6, 0.35);
}

.nd-cta-btn-amber:hover:not(:disabled) {
  background: #b45309;
}

.nd-outline-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background: transparent;
  color: hsl(var(--foreground));
  border: 1.5px solid hsl(var(--border));
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.8rem;
  line-height: 1.4;
  padding: 0.95rem 1.1rem;
  border-radius: 0.2rem;
  cursor: pointer;
  text-align: center;
  white-space: normal !important;
  word-break: break-word;
  transition: all 0.18s ease;
}

.nd-outline-btn:hover:not(:disabled) {
  border-color: hsl(var(--primary));
  color: hsl(var(--primary));
}

.nd-outline-btn-primary {
  border-color: hsl(var(--primary));
  color: hsl(var(--primary));
  background: hsl(var(--primary) / 0.05);
}

/* Red Validation Error Highlighting */
.nd-error-box {
  border: 2px solid #ef4444 !important;
  background: rgba(239, 68, 68, 0.08) !important;
  border-radius: 0.25rem;
  padding: 0.875rem;
  animation: ndPulseError 1.5s infinite;
}

.nd-input-error {
  border: 2px solid #ef4444 !important;
  background: rgba(239, 68, 68, 0.05) !important;
}

.nd-error-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.45rem;
  font-size: 0.75rem;
  font-weight: 800;
  color: #f87171;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

@keyframes ndPulseError {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.35);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
  }
}

/* Contract Document Sheet */
.nd-contract-sheet {
  background: #ffffff;
  color: #111827;
  border: 1px solid #d1d5db;
  box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.12);
  padding: 1.25rem;
  line-height: 1.6;
  font-size: 0.825rem;
  overflow-x: hidden;
}

@media (min-width: 768px) {
  .nd-contract-sheet {
    padding: 2.5rem 3rem;
    font-size: 0.875rem;
  }
}

.nd-contract-sheet h3 {
  color: #8b1e24;
  font-weight: 800;
  font-size: 1rem;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  text-transform: none;
  letter-spacing: -0.01em;
}

.nd-table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0.65rem 0 1.25rem;
}

.nd-contract-table {
  width: 100%;
  min-width: 440px;
  border-collapse: collapse;
  font-size: 0.775rem;
}

.nd-contract-table th {
  background: #8b1e24;
  color: #ffffff;
  font-weight: 700;
  text-align: left;
  padding: 0.5rem 0.65rem;
  border: 1px solid #6b141a;
}

.nd-contract-table td {
  padding: 0.45rem 0.65rem;
  border: 1px solid #9ca3af;
  color: #111827;
}

.nd-contract-table tr.active-row td {
  background: #fef2f2;
  font-weight: 700;
}

.nd-renewal-box {
  background: #fdf2f2;
  border: 1px solid #d9a3a6;
  padding: 1rem 1.15rem;
  margin: 1.25rem 0;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: #111827;
}

/* Signature Canvas */
.nd-sig-canvas {
  width: 100%;
  height: 180px;
  background: #ffffff;
  border: 2px dashed #9ca3af;
  touch-action: none;
  cursor: crosshair;
  display: block;
}

.nd-sig-canvas.signed {
  border-style: solid;
  border-color: #16a34a;
}

.nd-sig-canvas.error {
  border: 2px solid #ef4444 !important;
  background: #fff5f5;
}

/* Summary Card spacing & rows */
.nd-summary-card {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 0.25rem;
  padding: 1.5rem 1.35rem;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.nd-summary-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
}

.nd-summary-price {
  font-weight: 800;
  white-space: nowrap;
  flex-shrink: 0;
  text-align: right;
}

.nd-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

/* Trainer 1-Click Check-in Page (/trainer) */
.nd-trainer-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.nd-trainer-tab {
  padding: 0.65rem 1rem;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 0.25rem;
  border: 1.5px solid hsl(var(--border));
  background: hsl(var(--card));
  color: hsl(var(--muted-foreground));
  cursor: pointer;
  transition: all 0.15s ease;
}

.nd-trainer-tab.active {
  border-color: hsl(var(--primary));
  background: hsl(var(--primary) / 0.14);
  color: hsl(var(--foreground));
}

.nd-trainer-card {
  background: hsl(var(--card));
  border: 1.5px solid hsl(var(--border));
  border-radius: 0.25rem;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.nd-trainer-card.showed {
  border-color: rgba(22, 163, 74, 0.55);
  background: rgba(22, 163, 74, 0.05);
}

.nd-trainer-card.noshow {
  opacity: 0.65;
}

.nd-trainer-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.nd-trainer-btn-yes {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: #16a34a;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.85rem 0.75rem;
  border-radius: 0.25rem;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease;
}

.nd-trainer-btn-yes:hover {
  background: #15803d;
}

.nd-trainer-btn-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  border: 1.5px solid rgba(239, 68, 68, 0.35);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.85rem 0.75rem;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.nd-trainer-btn-no:hover {
  background: rgba(239, 68, 68, 0.2);
}

.nd-trainer-btn-link {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.07);
  color: hsl(var(--foreground));
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.65rem 0.75rem;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.nd-trainer-btn-link:hover {
  border-color: hsl(var(--primary));
  color: hsl(var(--primary));
}

.nd-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.6rem;
  border-radius: 0.2rem;
}

.nd-status-pill.green {
  background: rgba(22, 163, 74, 0.18);
  color: #4ade80;
  border: 1px solid rgba(22, 163, 74, 0.4);
}

.nd-status-pill.amber {
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.nd-status-pill.red {
  background: rgba(239, 68, 68, 0.16);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}
