/* The phone frame, position, and glow are set in style.css. */
.phone {
  aspect-ratio: 1179 / 2556;
  isolation: isolate;
}

.phone-static,
.phone-live {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transition: opacity .25s ease;
}

.phone-static {
  display: block;
  object-fit: cover;
  background: #06040a;
  opacity: 1;
}

.phone-live {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 36px 11px 21px;
  background: radial-gradient(ellipse 90% 45% at 50% 43%, #240818 0%, #0d0710 55%, #06040a 100%);
  color: #eedfc0;
  font-family: Arial, sans-serif;
  opacity: 0;
}

.phone-live::before {
  content: '';
  position: absolute;
  top: 23%;
  left: 15%;
  width: 70%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, #ff2d8a2c 0%, #d10f2f15 46%, transparent 76%);
  filter: blur(12px);
  pointer-events: none;
}

.phone[data-orb-state="live"] .phone-static { opacity: 0; }
.phone[data-orb-state="live"] .phone-live { opacity: 1; }

.phone-orb-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.phone-screen-top,
.phone-state-label,
.phone-messages,
.phone-controls {
  position: relative;
  z-index: 1;
}

.phone-screen-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  text-align: center;
  min-height: 49px;
}

.phone-screen-top strong {
  display: block;
  color: #eedfc0;
  font: 28px/.9 Cormorant, Georgia, serif;
  font-weight: 400;
}

.phone-screen-top small {
  display: block;
  margin-top: 7px;
  color: #b99e8f;
  font: 7px/1.2 Arial, sans-serif;
  letter-spacing: 1.6px;
}

.phone-screen-top small i {
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-right: 3px;
  border-radius: 50%;
  background: #e8536c;
  box-shadow: 0 0 7px #f13666;
  vertical-align: 1px;
}

.phone-nav-glyph {
  color: #d3bda8;
  font: 24px/1 Arial, sans-serif;
  width: 22px;
}

.phone-orb-anchor { flex: 0 0 41%; }

.phone-state-label {
  text-align: center;
  color: #c8aab3;
  font: 9px/1.3 Arial, sans-serif;
  letter-spacing: .2px;
}

.phone-messages {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 7px;
  min-height: 106px;
  margin-top: auto;
}

.phone-message {
  width: fit-content;
  max-width: 94%;
  margin: 0;
  padding: 6px 9px;
  border: 1px solid #7a506044;
  border-radius: 11px;
  background: #20131dba;
  color: #f1dfd8;
  font: 11px/1.3 Arial, sans-serif;
  text-align: left;
  opacity: 0;
  transform: translateY(5px);
  transition: opacity .45s ease, transform .45s ease;
}

.phone-message.revealed { opacity: 1; transform: translateY(0); }
.phone-message-user { align-self: flex-end; background: #371d2bbd; }
.phone-message-ember { align-self: flex-start; }
.phone-message small {
  display: block;
  margin-bottom: 2px;
  color: #e7a4ad;
  font: 7px/1.2 Arial, sans-serif;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.phone-controls {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #9a6f7733;
}

.phone-controls span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #dac9c3;
  font: 8px/1 Arial, sans-serif;
}

.phone-controls svg {
  width: 23px;
  height: 23px;
  padding: 4px;
  border: 1px solid #8e687055;
  border-radius: 50%;
  color: #e7c8bb;
  box-sizing: content-box;
}

.phone-controls .phone-end svg {
  border-color: #a42d4788;
  background: #95243c;
  color: #fff3ed;
}

@media (max-width: 720px) {
  .phone-live { padding: 33px 9px 19px; }
  .phone-orb-anchor { flex-basis: 40%; }
  .phone-message { font-size: 10px; }
  .phone-controls svg { width: 20px; height: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .phone-static, .phone-live, .phone-message { transition: none; }
}
