/* ============================================================
   Deep-Dive Setup-Popup
   ------------------------------------------------------------
   Eine Seite nach der anderen: Grafik links, wenige Settings
   rechts. Kein 3-Karten-Grid. Rein visuell — keine echte API.
   ============================================================ */

.dd-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 22, 36, 0.68);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3vh 24px;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity 280ms ease-out, visibility 280ms;
}
.dd-overlay.is-open { opacity: 1; visibility: visible; }

.dd-modal {
  position: relative;
  background: white;
  width: min(960px, 100%);
  border-radius: 22px;
  box-shadow: 0 50px 100px rgba(0,0,0,0.30);
  padding: 28px 32px 22px;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: #13213a;
  transform: translateY(20px);
  transition: transform 320ms cubic-bezier(0.22, 0.85, 0.34, 1.07);
}
.dd-overlay.is-open .dd-modal { transform: translateY(0); }

.dd-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  background: transparent;
  border: 1px solid #dde3ee;
  width: 36px; height: 36px; border-radius: 50%;
  font-size: 18px; color: #687385;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 200ms, color 200ms, border-color 200ms;
}
.dd-close:hover { background: #fde7f7; color: #d862c8; border-color: #d862c8; }

.dd-page {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: stretch;
}
.dd-page.is-active { display: grid; }
.dd-page.is-active:has(.dd-visual.is-empty) {
  grid-template-columns: 1fr;
}

.dd-visual {
  position: relative;
  min-height: 280px;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(160deg, #fde7f7 0%, #f3e8ff 55%, #eef2f7 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 24px;
}
.dd-visual.is-empty { display: none; }

.dd-visual-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
  display: block;
}
.dd-visual--photo { padding: 0; }

.dd-visual-logo {
  width: min(42%, 148px);
  height: auto;
  max-height: 148px;
  object-fit: contain;
  display: block;
}

.dd-phone {
  width: 168px;
  height: 280px;
  background: #13213a;
  border-radius: 28px;
  padding: 18px 14px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 18px 40px rgba(19, 33, 58, 0.28);
}
.dd-phone-ear {
  width: 56px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.22);
}
.dd-phone .dd-visual-logo {
  width: 72%;
  max-height: 120px;
  filter: brightness(0) invert(1);
}
.dd-phone-bar {
  width: 44px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,0.28);
}

.dd-settings {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding-right: 28px;
}
.dd-kicker {
  display: inline-flex;
  width: fit-content;
  border: 1px solid rgba(216, 98, 200, 0.28);
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--accent, #d862c8);
  background: var(--accent-soft, #fde7f7);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.dd-settings h2 {
  font-size: clamp(22px, 2.6vw, 28px);
  letter-spacing: -0.03em;
  margin: 0;
  line-height: 1.15;
}
.dd-lead {
  margin: 0;
  color: #687385;
  font-size: 15px;
  line-height: 1.45;
}

.dd-field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.dd-field label { font-weight: 700; color: #1a2740; font-size: 12px; }
.dd-field input, .dd-field textarea {
  border: 1px solid #dde3ee;
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  background: white;
  color: #13213a;
  resize: vertical;
}
.dd-field input:focus, .dd-field textarea:focus {
  outline: none;
  border-color: var(--accent, #d862c8);
  box-shadow: 0 0 0 3px rgba(216,98,200,0.18);
}
.dd-field textarea { min-height: 72px; }
.dd-field--compact textarea {
  min-height: 52px;
  font-size: 12px;
  line-height: 1.4;
}
.dd-hint { font-size: 11px; color: #687385; line-height: 1.5; }
.dd-hint code {
  background: #eef2f7;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 11px;
}

.dd-field-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 8px;
}

.dd-page--stammdaten .dd-settings,
.dd-page--hours .dd-settings,
.dd-page--sms .dd-settings {
  gap: 8px;
}
.dd-page--stammdaten .dd-lead,
.dd-page--hours .dd-lead {
  font-size: 13px;
}
.dd-page--stammdaten .dd-field input {
  padding: 6px 10px;
}

.dd-hours {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.dd-hours-row {
  display: grid;
  grid-template-columns: 18px 28px minmax(0, 1fr) 12px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  height: 29px;
  font-size: 12px;
}
.dd-hours-day {
  font-weight: 700;
  color: #1a2740;
}
.dd-hours-sep { color: #687385; text-align: center; }
.dd-hours-row input[type="checkbox"] {
  width: 14px;
  height: 14px;
  accent-color: var(--accent, #d862c8);
  margin: 0;
  cursor: pointer;
}
.dd-hours-row input[type="time"] {
  border: 1px solid #dde3ee;
  border-radius: 6px;
  padding: 2px 4px;
  font: inherit;
  font-size: 12px;
  height: 26px;
  background: white;
  color: #13213a;
  min-width: 0;
}
.dd-hours-row input[type="time"]:focus {
  outline: none;
  border-color: var(--accent, #d862c8);
  box-shadow: 0 0 0 3px rgba(216,98,200,0.18);
}
.dd-hours-row.is-closed input[type="time"] {
  opacity: 0.4;
}

.dd-sender-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}
.dd-char-count {
  font-size: 11px;
  font-weight: 700;
  color: #687385;
  white-space: nowrap;
}

.dd-sms-preview {
  background: #f6f8fc;
  border: 1px solid #dde3ee;
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dd-sms-preview strong {
  font-size: 13px;
  color: #13213a;
}
.dd-sms-preview p {
  margin: 0;
  font-size: 12px;
  color: #3a465c;
  line-height: 1.4;
}

.dd-btn {
  background: linear-gradient(120deg, var(--accent, #d862c8), #7c3aed);
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: transform 150ms, box-shadow 150ms;
  width: fit-content;
}
.dd-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(216,98,200,0.30); }
.dd-btn.is-busy { opacity: 0.7; pointer-events: none; }
.dd-btn.ghost {
  background: transparent;
  color: #13213a;
  border: 1px solid #dde3ee;
}
.dd-btn.ghost:hover { background: #f3f5fb; box-shadow: none; }
.dd-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.dd-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}
.dd-nav-end { display: flex; gap: 8px; }

.dd-footer {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #dde3ee;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: #687385;
}

.dd-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}
.dd-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #dde3ee;
  cursor: pointer;
  transition: background 160ms, transform 160ms;
}
.dd-dot.is-active {
  background: var(--accent, #d862c8);
  transform: scale(1.25);
}

.dd-toast {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 90;
  background: #13213a;
  color: white;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 12px 30px rgba(0,0,0,0.30);
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 240ms, transform 240ms;
}
.dd-toast.is-show {
  opacity: 1;
  transform: translateX(0);
}
.dd-toast.is-ok { background: #139965; }
.dd-toast.is-err { background: #c1272d; }

@media (max-width: 920px) {
  .dd-page.is-active { grid-template-columns: 1fr; }
  .dd-modal { padding: 22px 18px 18px; }
  .dd-settings { padding-right: 0; }
  .dd-footer { flex-wrap: wrap; justify-content: center; text-align: center; }
  .dd-visual { min-height: 220px; }
}
