/* Live Violema iPhone/Slack demo — populated by /assets/js/violema-phone.js
   into the [data-violema-phone] mount inside the ChatOps section. */

.chatops-phone-live {
  position: relative;
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
  isolation: isolate;
}

.chatops-phone-live .chatops-phone-glow { border-radius: 60px; }

.chatops-phone-caption {
  margin: 22px auto 0;
  max-width: 300px;
  color: var(--zinc-400, #a1a1aa);
  font-size: 12.5px;
  line-height: 1.6;
  text-align: center;
}

.chatops-phone-caption span { color: var(--zinc-300, #d4d4d8); }

.violema-phone {
  width: min(300px, 84vw);
  margin: 0 auto;
  filter: drop-shadow(0 44px 60px rgba(0, 0, 0, 0.6));
  font-family: -apple-system, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-align: left;
  cursor: default;
  user-select: none;
  transform: perspective(2400px) rotateY(-7deg) rotateX(3deg) rotateZ(-0.6deg);
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (hover: hover) {
  .violema-phone:hover {
    transform: perspective(2400px) rotateY(-3deg) rotateX(1deg) rotateZ(0deg) translateY(-4px);
  }
}

.violema-phone[hidden] { display: none; }

/* ── device ─────────────────────────────────────────── */

.vp-frame {
  position: relative;
  border-radius: 15.5%/7.2%;
  padding: 4px;
  background: linear-gradient(180deg, #55585f, #26282d 38%, #101115);
  box-shadow:
    inset 0 1px 1.5px rgba(255, 255, 255, 0.3),
    inset 0 0 0 1px rgba(168, 85, 247, 0.12);
}

.vp-bezel {
  border-radius: 15%/7%;
  padding: 3px;
  background: #08090c;
}

.vp-screen {
  position: relative;
  display: flex;
  flex-direction: column;
  aspect-ratio: 9 / 19.5;
  overflow: hidden;
  border-radius: 14.2%/6.6%;
  background: #100e14;
  color: #f6f6f8;
}

.vp-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(118deg, rgba(255, 255, 255, 0.14) 0%, transparent 18%, transparent 70%, rgba(255, 255, 255, 0.05) 100%);
  mix-blend-mode: screen;
}

.vp-island {
  position: absolute;
  top: 3.1%;
  left: 50%;
  z-index: 25;
  width: 27%;
  height: 3.2%;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #000;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.045);
}

.vp-status {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  padding: 7.5% 9% 1.5%;
  font-size: 11px;
  font-weight: 600;
}

.vp-status__right { display: flex; align-items: center; gap: 5px; }
.vp-status__right svg { display: block; height: 10px; width: auto; fill: #fff; }

/* ── Slack chrome ───────────────────────────────────── */

.vp-head {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 2.5% 4% 3%;
}

.vp-chip {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  color: #c9c9d1;
}

.vp-chip svg { height: 13px; width: auto; fill: none; stroke: currentColor; stroke-width: 2; }

.vp-head__pill {
  display: flex;
  flex: 1;
  min-width: 0;
  align-items: center;
  gap: 7px;
  padding: 5px 11px 5px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}

.vp-head__pill img {
  width: 22px;
  height: 22px;
  flex: none;
  border-radius: 50%;
  background: #fff;
  object-fit: contain;
}

.vp-head__pill strong { display: block; font-size: 11.5px; line-height: 1.15; font-weight: 700; }
.vp-head__pill em { display: block; font-size: 9px; font-style: normal; color: #9c9ca6; }

/* ── thread ─────────────────────────────────────────── */

.vp-thread {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 9px;
  min-height: 0;
  padding: 1% 5% 3%;
  overflow: hidden;
  justify-content: flex-end;
}

.vp-thread > * { flex-shrink: 0; }

.vp-intro {
  margin-bottom: auto;
  display: grid;
  justify-items: start;
  gap: 5px;
  padding: 12px 0 14px;
}

.vp-intro__avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  overflow: hidden;
  border-radius: 14px;
  background: #fff;
}

.vp-intro__avatar img { width: 100%; height: 100%; object-fit: contain; }

.vp-intro p { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; color: #fff; }
.vp-intro em { font-size: 9px; font-style: normal; color: #83838e; }

.vp-day {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #83838e;
  font-size: 7.8px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.vp-day i { flex: 1; height: 1px; background: rgba(255, 255, 255, 0.08); }

.vp-msg { display: flex; gap: 7px; align-items: flex-start; }

.vp-msg.vp-in { animation: vp-rise 300ms ease both; }

.vp-avatar {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  overflow: hidden;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 900;
  color: #fff;
}
.vp-avatar--v { background: #fff; }
.vp-avatar--v img { width: 100%; height: 100%; object-fit: contain; }
.vp-avatar--m { background: linear-gradient(135deg, #f97316, #c2410c); }
.vp-avatar--d { background: #17141d; border: 1px solid rgba(255, 255, 255, 0.1); }
.vp-avatar--d img { width: 100%; height: 100%; object-fit: cover; }

.vp-msg__body { min-width: 0; flex: 1; }
.vp-msg__head { display: flex; align-items: baseline; gap: 5px; }
.vp-msg__head strong { font-size: 10.4px; font-weight: 700; }
.vp-msg__head time { font-size: 7.6px; color: #83838e; }

.vp-badge {
  padding: 1px 4px;
  border-radius: 3px;
  background: rgba(29, 155, 209, 0.18);
  color: #55c1e7;
  font-size: 6.6px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.vp-badge--guard { background: rgba(249, 115, 22, 0.16); color: #fca868; }

.vp-msg__text { margin-top: 2px; font-size: 10px; line-height: 1.45; color: #c9c9d3; }
.vp-msg__text b { color: #34d399; font-weight: 700; }
.vp-msg__text u { color: #fff; font-weight: 700; text-decoration: none; }

/* typing indicator */
.vp-typing {
  display: inline-flex;
  gap: 3.5px;
  align-items: center;
  padding: 6px 10px;
  border-radius: 12px 12px 12px 4px;
  background: rgba(255, 255, 255, 0.06);
}
.vp-typing i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #83838e;
  animation: vp-dot 1.1s ease-in-out infinite;
}
.vp-typing i:nth-child(2) { animation-delay: 0.16s; }
.vp-typing i:nth-child(3) { animation-delay: 0.32s; }

/* source logos row */
.vp-sources { display: flex; align-items: center; gap: 5px; margin-top: 5px; }
.vp-sources span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
}
.vp-sources img { width: 10.5px; height: 10.5px; filter: brightness(0) invert(1) opacity(0.9); }
.vp-sources small { font-size: 8px; color: #83838e; }

/* attachment blocks (chart / list / report card) */
.vp-block {
  margin: 2px 0 0 31px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}
.vp-block.vp-in { animation: vp-rise 300ms ease both; }

.vp-chart { padding: 7px 9px 6px; }
.vp-chart__head { display: flex; align-items: center; justify-content: space-between; }
.vp-chart__head span { font-size: 8.6px; font-weight: 600; color: #dcdce4; }
.vp-chart__head b { font-size: 8.6px; font-weight: 700; color: #34d399; }
.vp-chart svg { display: block; width: 100%; height: 38px; margin-top: 5px; }

.vp-list { padding: 7px 9px; }
.vp-list p { font-size: 8.8px; font-weight: 700; color: #dcdce4; }
.vp-list ul { margin: 4px 0 0; padding: 0; list-style: none; display: grid; gap: 3px; }
.vp-list li { font-size: 8.6px; line-height: 1.4; color: #b9b9c3; }
.vp-list li::before { content: "•  "; color: #a78bfa; }
.vp-list--check li::before { content: "✅ "; font-size: 7.4px; }

.vp-card { display: flex; }
.vp-card__rail { width: 3px; flex: none; background: linear-gradient(180deg, #a78bfa, #f97316); }
.vp-card__body { min-width: 0; flex: 1; padding: 7px 9px; }
.vp-card__title { font-size: 10px; font-weight: 700; line-height: 1.3; color: #fff; }
.vp-card__meta { margin-top: 2px; font-size: 7.7px; color: #b9a8ef; }
.vp-card__rows { display: grid; gap: 3px; margin-top: 6px; }
.vp-card__row { display: flex; align-items: baseline; justify-content: space-between; font-size: 8.4px; }
.vp-card__row span { color: #8b8b98; }
.vp-card__row b { font-weight: 600; color: #c9c9d3; }
.vp-card__row b.is-up { color: #34d399; }
.vp-card__row b.is-warn { color: #fbbf24; }
.vp-card__actions { display: flex; gap: 5px; margin-top: 7px; }
.vp-card__actions button {
  flex: 1;
  padding: 5px 2px;
  border: 0;
  border-radius: 5px;
  font-size: 8.5px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 200ms ease, color 200ms ease;
}
.vp-approve { background: #1aa172; color: #fff; box-shadow: 0 3px 10px -3px rgba(26, 161, 114, 0.8); }
.vp-approve.is-approved { background: rgba(26, 161, 114, 0.16); color: #34d399; box-shadow: none; }
.vp-reject { border: 1px solid rgba(255, 255, 255, 0.14) !important; background: rgba(255, 255, 255, 0.04); color: #dcdce4; }
.vp-card.is-approved .vp-reject { display: none; }

/* ── composer + tab bar ─────────────────────────────── */

.vp-composer {
  display: flex;
  flex: none;
  align-items: center;
  gap: 7px;
  margin: 0 4% 2%;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  color: #83838e;
}
.vp-composer__plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.09);
  font-size: 11px;
  line-height: 1;
}
.vp-composer__hint { flex: 1; font-size: 9.8px; }
.vp-composer svg { height: 12px; width: auto; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; }

.vp-tabbar {
  display: flex;
  flex: none;
  align-items: center;
  gap: 6px;
  padding: 0 4% 1%;
}
.vp-tabbar__pill {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: space-around;
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
}
.vp-tab {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 2px;
  color: #8b8b96;
  font-size: 7px;
  font-weight: 600;
}
.vp-tab svg { height: 12px; width: auto; fill: none; stroke: currentColor; stroke-width: 1.9; }
.vp-tab.is-active { color: #c4a7fa; }
.vp-tab__dot {
  position: absolute;
  top: -1px;
  right: -4px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #a855f7;
}
.vp-tabbar__search {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.055);
  color: #c9c9d1;
}
.vp-tabbar__search svg { height: 13px; width: auto; fill: none; stroke: currentColor; stroke-width: 2; }

.vp-homebar {
  flex: none;
  width: 34%;
  height: 4px;
  margin: 0 auto 2.5%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.3);
}

/* ── motion ─────────────────────────────────────────── */

@keyframes vp-rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes vp-dot {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-3px); opacity: 1; }
}

.vp-draw polyline {
  stroke-dasharray: 220;
  stroke-dashoffset: 220;
  animation: vp-draw 900ms ease-out forwards;
}
@keyframes vp-draw { to { stroke-dashoffset: 0; } }

@media (max-width: 959px) {
  .violema-phone { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .vp-msg.vp-in, .vp-block.vp-in { animation: none; }
  .vp-typing i { animation: none; }
  .vp-draw polyline { animation: none; stroke-dashoffset: 0; }
  .violema-phone { transform: none; transition: none; }
}

@media (forced-colors: active) {
  .vp-frame, .vp-screen, .vp-block, .vp-composer, .vp-tabbar__pill { border: 1px solid CanvasText; }
}
