/* Live phone mockup — Meridian detection states */

.phone-device {
  --phone-w: min(248px, 68vw);
  width: var(--phone-w);
  perspective: 1200px;
  filter: drop-shadow(0 20px 48px rgba(0, 0, 0, 0.45));
}

.phone-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 19.5;
  border-radius: 36px;
  padding: 7px;
  background: linear-gradient(160deg, #1e1e20 0%, #0e0e10 55%, #060608 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.phone-frame::before {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 32px;
  border: 1px solid rgba(255, 255, 255, 0.03);
  pointer-events: none;
}

.phone-notch {
  position: absolute;
  top: 11px;
  left: 50%;
  transform: translateX(-50%);
  width: 28%;
  height: 20px;
  background: #000;
  border-radius: 16px;
  z-index: 3;
}

.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 30px;
  overflow: hidden;
  background: var(--phone-screen-bg, #0a0a0a);
}

.phone-state {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 44px 14px 16px;
  opacity: 0;
  transform: translateY(6px) scale(0.99);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
  pointer-events: none;
}

.phone-device[data-state="standby"] .phone-state--standby,
.phone-device[data-state="live"] .phone-state--live,
.phone-device[data-state="alert"] .phone-state--alert {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.phone-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-tertiary);
  margin-bottom: 16px;
}

.phone-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.phone-brand-row span:first-child {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.phone-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  font-family: var(--font-mono);
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--red);
  background: var(--threat-surface);
  border: 1px solid var(--threat-border);
  border-radius: var(--radius-pill);
}

.phone-live-pill::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--red);
  animation: pulse-dot 1.5s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}

.phone-standby-title {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.phone-standby-sub {
  font-size: 11px;
  line-height: 1.45;
  color: var(--text-secondary);
  margin-bottom: 18px;
}

.phone-cta-btn {
  margin-top: auto;
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 500;
  text-align: center;
  color: var(--btn-primary-text);
  background: var(--btn-primary-bg);
  border-radius: var(--radius-pill);
}

.phone-caller {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.phone-caller-av {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--surface-3);
  border: 1px solid var(--edge);
  border-radius: 50%;
  flex-shrink: 0;
}

.phone-caller-meta {
  flex: 1;
  min-width: 0;
}

.phone-caller-name {
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.phone-caller-sub {
  font-size: 10px;
  color: var(--text-tertiary);
}

.phone-score-block {
  display: flex;
  justify-content: center;
  margin: 8px 0 12px;
}

.phone-score-ring {
  position: relative;
  width: 88px;
  height: 88px;
}

.phone-score-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.phone-score-ring-track {
  fill: none;
  stroke: var(--edge);
  stroke-width: 5;
}

.phone-score-ring-fill {
  fill: none;
  stroke: var(--red);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 327;
  stroke-dashoffset: 92;
}

.phone-device[data-state="live"] .phone-score-ring-fill {
  stroke-dashoffset: 92;
}

.phone-device[data-state="alert"] .phone-score-ring-fill {
  stroke-dashoffset: 52;
}

.phone-score-num {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.phone-score-num strong {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--red);
  line-height: 1;
}

.phone-score-num span {
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
}

.phone-waveform {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  height: 28px;
  margin-top: auto;
}

.phone-waveform span {
  width: 3px;
  border-radius: 2px;
  background: var(--accent);
  opacity: 0.55;
  animation: wave-bar 1.1s ease-in-out infinite;
}

.phone-waveform span:nth-child(1) { height: 8px; animation-delay: 0s; }
.phone-waveform span:nth-child(2) { height: 16px; animation-delay: 0.1s; }
.phone-waveform span:nth-child(3) { height: 22px; animation-delay: 0.2s; }
.phone-waveform span:nth-child(4) { height: 14px; animation-delay: 0.15s; }
.phone-waveform span:nth-child(5) { height: 24px; animation-delay: 0.05s; }
.phone-waveform span:nth-child(6) { height: 12px; animation-delay: 0.25s; }
.phone-waveform span:nth-child(7) { height: 18px; animation-delay: 0.12s; }

@keyframes wave-bar {
  0%, 100% { transform: scaleY(0.55); opacity: 0.35; }
  50% { transform: scaleY(1); opacity: 0.75; }
}

.phone-alert-card {
  padding: 12px;
  background: var(--threat-surface);
  border: 1px solid var(--threat-border);
  border-radius: var(--radius-md);
  margin-top: 8px;
}

.phone-alert-card strong {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--red);
  margin-bottom: 4px;
}

.phone-alert-card p {
  font-size: 10px;
  line-height: 1.45;
  color: var(--text-secondary);
}

@media (prefers-reduced-motion: reduce) {
  .phone-state,
  .phone-waveform span,
  .phone-live-pill::before {
    animation: none !important;
    transition: none !important;
  }
}
