/* ============================================================
   Dating Copilot — Phase 2 styles (phase2.css)
   Loaded AFTER styles.css. Same design language: near-black
   violet surfaces, electric violet accents, soft rose highlights.
   All classes are dc2- / notif- prefixed (new only) so nothing
   here collides with the Phase 1 stylesheet.
   ============================================================ */

/* ---------- severity badges (red flags) ---------- */
.dc2-sev {
  display: inline-block; font-size: 11px; font-weight: 800;
  letter-spacing: 1.2px; text-transform: uppercase;
  padding: 4px 12px; border-radius: 999px; white-space: nowrap;
}
.dc2-sev-low {
  color: var(--success);
  background: rgba(127, 201, 143, 0.12);
  border: 1px solid rgba(127, 201, 143, 0.4);
}
.dc2-sev-medium {
  color: var(--warn);
  background: rgba(229, 180, 91, 0.12);
  border: 1px solid rgba(229, 180, 91, 0.4);
}
.dc2-sev-high {
  color: var(--danger);
  background: var(--rose-soft);
  border: 1px solid rgba(224, 120, 138, 0.4);
}

.dc2-flag {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); padding: 14px 16px; margin-bottom: 10px;
}
.dc2-flag:last-child { margin-bottom: 0; }
.dc2-flag-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 6px; font-size: 14.5px;
}
.dc2-flag-text { font-size: 13.5px; color: var(--muted); margin: 0; }

.dc2-risk { text-align: center; }
.dc2-risk h2 { margin: 4px 0 0; }

.dc2-resources li { line-height: 1.6; }

/* ---------- coach chat ---------- */
.dc2-chat { padding: 16px; }
.dc2-messages {
  display: flex; flex-direction: column; gap: 10px;
  max-height: 52vh; overflow-y: auto; padding: 4px 2px;
  -webkit-overflow-scrolling: touch;
}
.dc2-msg {
  max-width: 86%; padding: 11px 15px; border-radius: 16px;
  font-size: 14.5px; line-height: 1.55; white-space: pre-wrap;
  overflow-wrap: break-word;
}
.dc2-msg.user {
  align-self: flex-end;
  background: linear-gradient(135deg, #5a3df5, var(--violet-deep));
  color: #ffffff; border-bottom-right-radius: 5px;
}
.dc2-msg.ai {
  align-self: flex-start;
  background: var(--surface-3); border: 1px solid var(--border);
  border-bottom-left-radius: 5px;
}
.dc2-typing {
  align-self: flex-start; display: inline-flex; gap: 5px;
  padding: 14px 18px; background: var(--surface-3);
  border: 1px solid var(--border); border-radius: 16px;
  border-bottom-left-radius: 5px;
}
.dc2-typing span {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--muted); animation: dc2blink 1.2s ease-in-out infinite;
}
.dc2-typing span:nth-child(2) { animation-delay: 0.2s; }
.dc2-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dc2blink { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }

.dc2-chatbar {
  position: sticky; bottom: calc(var(--bottomnav-h) + 12px); z-index: 5;
  display: flex; gap: 10px; align-items: center;
  margin-top: 12px; padding: 10px;
  background: rgba(30, 26, 38, 0.92);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-strong); border-radius: 16px;
}
body:not(.has-bottomnav) .dc2-chatbar { bottom: 12px; }
.dc2-chatbar .input { flex: 1; min-width: 0; padding: 12px 14px; }
.dc2-chatbar .btn { width: auto; flex: 0 0 auto; }

/* ---------- settings ---------- */
.dc2-setting-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; padding: 15px 0; border-bottom: 1px solid var(--border);
}
.dc2-setting-row:last-child { border-bottom: 0; }
.dc2-setting-col { flex-direction: column; align-items: stretch; gap: 10px; }
.dc2-setting-label { font-weight: 700; font-size: 14.5px; }
.dc2-setting-desc { font-size: 12.5px; color: var(--muted); margin-top: 3px; }

.dc2-switch { position: relative; width: 50px; height: 28px; flex: 0 0 auto; }
.dc2-switch input {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; margin: 0; cursor: pointer; z-index: 1;
}
.dc2-track {
  position: absolute; inset: 0; border-radius: 999px;
  background: var(--surface-3); border: 1px solid var(--border-strong);
  transition: background 0.2s, border-color 0.2s;
}
.dc2-track::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--muted); transition: transform 0.2s, background 0.2s;
}
.dc2-switch input:checked + .dc2-track {
  background: var(--violet-soft); border-color: var(--violet);
}
.dc2-switch input:checked + .dc2-track::after {
  transform: translateX(22px); background: var(--violet);
}

/* ---------- referrals ---------- */
.dc2-code {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin: 14px 0; padding: 14px 16px;
  background: var(--surface);
  border: 1px dashed rgba(124, 92, 255, 0.6);
  border-radius: var(--radius-sm);
}
.dc2-code .code {
  font-size: 22px; font-weight: 800; letter-spacing: 2px; color: var(--violet);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ---------- notifications ---------- */
.notif-item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 0; border-bottom: 1px solid var(--border);
  cursor: pointer; color: var(--text);
}
a.notif-item:hover { text-decoration: none; }
.notif-item:last-child { border-bottom: 0; }
.notif-dot {
  width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto;
  background: var(--violet); margin-top: 6px;
  box-shadow: 0 0 8px rgba(124, 92, 255, 0.7);
}
.notif-item.read .notif-dot { background: transparent; border: 1px solid var(--muted-2); box-shadow: none; }
.notif-main { flex: 1; min-width: 0; }
.notif-title { font-weight: 700; font-size: 14.5px; }
.notif-body { font-size: 13.5px; color: var(--muted); margin: 3px 0 0; }
.notif-time { font-size: 12px; color: var(--muted-2); margin-top: 4px; }
