/* ============================================================
   Deep-Dive Setup-Popup
   ------------------------------------------------------------
   3 cards: SMS, Photo, Voice-Cloning. Pure UI — no real API
   calls. Visible only when opened by deep-dive-popup.js.
   ============================================================ */

.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: flex-start;
  justify-content: center;
  padding: 4vh 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 {
  background: white;
  width: min(1100px, 100%);
  border-radius: 22px;
  box-shadow: 0 50px 100px rgba(0,0,0,0.30);
  padding: 32px;
  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-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  gap: 16px;
}
.dd-head h2 {
  font-size: clamp(22px, 2.8vw, 30px);
  letter-spacing: -0.03em;
  margin: 0 0 6px;
}
.dd-head p { color: #687385; font-size: 15px; margin: 0; }

.dd-close {
  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-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.dd-card {
  border: 1px solid #dde3ee;
  border-radius: 16px;
  padding: 22px;
  background: #fafbfd;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 200ms, transform 200ms;
}
.dd-card:hover { border-color: rgba(216,98,200,0.40); }
.dd-card-head { display: flex; align-items: center; gap: 12px; }
.dd-card-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--accent-soft, #fde7f7);
  color: var(--accent, #d862c8);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.dd-card-head h3 { margin: 0; font-size: 17px; }
.dd-card-head .sub { font-size: 12px; color: #687385; }

.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: 84px; }
.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-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;
}
.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; }

/* photo card */
.dd-photo-preview {
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 160px;
  margin: 0 auto;
  border-radius: 50%;
  background: linear-gradient(135deg, #c790c0, #7c3aed);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  font-size: 36px;
  position: relative;
  overflow: hidden;
}
.dd-photo-preview img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
}

.dd-drop {
  border: 2px dashed #dde3ee;
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  color: #687385;
  font-size: 12px;
  cursor: pointer;
  transition: border-color 200ms, background 200ms;
}
.dd-drop:hover, .dd-drop.is-drag {
  border-color: var(--accent, #d862c8);
  background: #fdf2fa;
  color: var(--accent, #d862c8);
}
.dd-drop input { display: none; }
.dd-drop .big { font-size: 24px; display: block; margin-bottom: 4px; }

/* tabs */
.dd-tabs {
  display: flex;
  border-bottom: 1px solid #dde3ee;
  margin-bottom: 12px;
}
.dd-tab {
  flex: 1;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  color: #687385;
  cursor: pointer;
  transition: color 150ms, border-color 150ms;
}
.dd-tab.is-active { color: var(--accent, #d862c8); border-bottom-color: var(--accent, #d862c8); }
.dd-tab-panel { display: none; flex-direction: column; gap: 10px; }
.dd-tab-panel.is-active { display: flex; }

/* voice wave mock */
.dd-wave {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 40px;
  margin: 4px 0;
}
.dd-wave span {
  flex: 1;
  background: linear-gradient(180deg, var(--accent, #d862c8), #7c3aed);
  border-radius: 2px;
  animation: ddWave 1.4s ease-in-out infinite;
}
.dd-wave.is-static span { animation: none; }
.dd-wave span:nth-child(2)  { animation-delay: 0.05s; }
.dd-wave span:nth-child(3)  { animation-delay: 0.10s; }
.dd-wave span:nth-child(4)  { animation-delay: 0.15s; }
.dd-wave span:nth-child(5)  { animation-delay: 0.20s; }
.dd-wave span:nth-child(6)  { animation-delay: 0.25s; }
.dd-wave span:nth-child(7)  { animation-delay: 0.30s; }
.dd-wave span:nth-child(8)  { animation-delay: 0.35s; }
.dd-wave span:nth-child(9)  { animation-delay: 0.40s; }
.dd-wave span:nth-child(10) { animation-delay: 0.45s; }
.dd-wave span:nth-child(11) { animation-delay: 0.50s; }
.dd-wave span:nth-child(12) { animation-delay: 0.55s; }
@keyframes ddWave {
  0%, 100% { height: 16%; }
  50%      { height: 100%; }
}

/* QR */
.dd-qr-wrap {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.dd-qr {
  width: 160px; height: 160px;
  background: white;
  border: 1px solid #dde3ee;
  border-radius: 12px;
  padding: 10px;
  display: flex; align-items: center; justify-content: center;
}
.dd-qr svg { width: 100%; height: 100%; display: block; }
.dd-status {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: #687385;
}
.dd-status .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent, #d862c8);
  animation: ddBlink 1s ease-in-out infinite;
}
@keyframes ddBlink {
  0%, 100% { opacity: 0.3; }
  50%      { opacity: 1; }
}

.dd-reading {
  background: white;
  border: 1px dashed #dde3ee;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12px;
  color: #1a2740;
  line-height: 1.6;
  font-style: italic;
}

.dd-footer {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid #dde3ee;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: #687385;
}

/* toast */
.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-cards { grid-template-columns: 1fr; }
  .dd-modal { padding: 22px; }
}
