/* ================================
   LIVE ACTIVITIES — META GRID
   ================================ */
.la-meta-grid {
  display: flex;
  gap: 24px;
}

.la-meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* ================================
   CONTENT LAYOUT
   ================================ */
.la-content {
  display: flex !important;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  padding: var(--pad) 0;
  grid-template-columns: none !important;
}

/* ================================
   VISUAL — iPhone container
   ================================ */
.la-visual {
  flex: 1;
  min-height: 0;
  border-radius: 8px;
  background: #e7e7e7;
  overflow: hidden;
  position: relative;
  aspect-ratio: 913 / 605;
}

.la-phone-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

/* Phone frame — sits behind screen images (screen area is solid black) */
.la-phone-frame {
  position: absolute;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  width: 96%;
  max-width: 920px;
  pointer-events: none;
  z-index: 1;
}

/* Screen wrap — sits on top of phone frame, covering the black screen area */
.la-screen-wrap {
  position: absolute;
  top: 56px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(96% * 0.924);
  max-width: 850px;
  /* iPhone screen aspect ratio keeps the wrap sized even when children are absolute */
  aspect-ratio: 393 / 852;
  overflow: hidden;
  z-index: 3;
}

/* All screen images sit absolutely inside the wrap */
.la-phone-screen {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

/* ================================
   TRANSITION KEYFRAMES
   ================================ */

/*
  DI expand: incoming emerges from the Dynamic Island pill at the top.
  Pill coordinates (iPhone 16 Pro proportions):
    top ~1.5%, side insets ~34%, bottom inset ~94%, radius 20px
*/
@keyframes la-expand-in {
  from {
    clip-path: inset(1.5% 34% 94% 34% round 20px);
    opacity: 0.5;
  }
  to {
    clip-path: inset(0% 0% 0% 0% round 0px);
    opacity: 1;
  }
}

/* DI contract: outgoing collapses back into the Dynamic Island pill */
@keyframes la-contract-out {
  from {
    clip-path: inset(0% 0% 0% 0% round 0px);
    opacity: 1;
  }
  to {
    clip-path: inset(1.5% 34% 94% 34% round 20px);
    opacity: 0;
  }
}

/* Simple crossfade helpers */
@keyframes la-fade-out {
  from { opacity: 1; }
  to   { opacity: 0; }
}

@keyframes la-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/*
  Lock Screen — pan down.
  The Lock Screen lives "below" the DI interface in iOS.
  Current DI view exits downward; Lock Screen arrives from above, panning down.
*/
@keyframes la-pan-down-in {
  from { transform: translateY(-14%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

@keyframes la-pan-down-out {
  from { transform: translateY(0);    opacity: 1; }
  to   { transform: translateY(14%);  opacity: 0; }
}

/* From Lock Screen — pan upward back to DI */
@keyframes la-pan-up-in {
  from { transform: translateY(14%);  opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

@keyframes la-pan-up-out {
  from { transform: translateY(0);    opacity: 1; }
  to   { transform: translateY(-14%); opacity: 0; }
}

/* ================================
   VIEW SWITCHER
   ================================ */
.la-switcher {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.la-view-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: var(--bg);
  border: 1px solid transparent;
  border-radius: 24px;
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 22px;
  letter-spacing: -0.72px;
  color: var(--text);
  cursor: pointer;
  position: relative;
  z-index: 0;
  overflow: hidden;
  box-shadow: inset 0 0 4px rgba(0,0,0,0.07), inset 0 0 10px rgba(0,0,0,0.35);
  transition: filter 0.3s ease;
}

/* Iridescent glow — matches .cta-secondary */
.la-view-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 24px;
  background: conic-gradient(from 0deg, #a78bfa, #60a5fa, #34d399, #fbbf24, #f472b6, #a78bfa);
  opacity: 0;
  filter: blur(12px) hue-rotate(0deg);
  z-index: -1;
  transition: opacity 0.4s ease;
  animation: iridescent-spin 6s linear infinite;
}

.la-view-btn:hover::after,
.la-view-btn.is-active::after {
  opacity: 0.18;
}

.la-icon-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  padding: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 24px;
  cursor: pointer;
  transition: opacity 0.15s;
}

.la-icon-btn:hover { opacity: 0.6; }

.la-icon-btn img {
  width: 20px;
  height: 20px;
  display: block;
}

.dark .la-icon-btn {
  border-color: var(--border);
  filter: invert(1);
}

/* ================================
   MOBILE
   ================================ */
@media (max-width: 809px) {
  .la-content {
    flex-direction: column !important;
    overflow-x: hidden;
    overflow-y: visible;
    padding: 16px 20px 20px;
    gap: 12px;
  }

  .la-visual {
    aspect-ratio: 4 / 3;
    width: 100%;
    flex: none;
  }

  .la-switcher {
    flex-wrap: wrap;
  }

  .la-view-btn {
    flex: 1 1 calc(50% - 4px);
    min-width: 0;
  }
}
