/**
 * Safari mockups — shadows, floating chips, mobile layouts.
 * Prevents clipped badges/shadows and uncramps mobile device stacks.
 */

/* —— Softer shadows on wrapper (not clipped by overflow:hidden parents) —— */
.lm-safari {
  filter:
    drop-shadow(0 8px 18px rgba(12, 18, 34, 0.1))
    drop-shadow(0 2px 6px rgba(12, 18, 34, 0.06));
}

.lm-safari__frame {
  box-shadow:
    0 0 0 0.5px rgba(255, 255, 255, 0.75) inset,
    0 1px 0 rgba(255, 255, 255, 0.98) inset,
    0 1px 2px rgba(0, 0, 0, 0.05);
}

.lm-safari-float .lm-safari__frame,
.landing-flow-safari__window .lm-safari__frame,
.demo-devices__layer .lm-safari__frame,
.hero-mock__safari .lm-safari__frame {
  filter: none;
}

.lm-fly-chip {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.75) inset,
    0 4px 14px rgba(12, 18, 34, 0.08),
    0 1px 4px rgba(12, 18, 34, 0.05);
}

/* —— Order flow — chips fully inside stage —— */
.landing-flow-strip {
  overflow: visible;
}

.landing-flow-safari-col {
  overflow: visible;
}

.landing-flow-safari {
  overflow: visible;
  padding: 0;
  position: relative;
  z-index: 2;
}

.landing-flow-safari__stage {
  overflow: visible;
  padding-bottom: 0;
}

/* Flow float positions live in landing-flow-strip.css (.landing-flow-orbit) */

/* —— Hero mock —— */
.hero-mock__canvas {
  overflow: visible;
}

@media (max-width: 1024px) {
  .landing-hero-split .landing-hero-visual {
    overflow: visible;
  }

  .hero-mock__canvas {
    overflow: visible;
    padding: var(--hero-pad-y) var(--hero-pad-x);
  }
}

@media (max-width: 768px) {
  .hero-mock__canvas {
    padding: var(--space-3) var(--space-1) var(--space-3);
    overflow: visible;
  }
}

/* —— Demo device stack — desktop overlap only —— */
.demo-visual {
  overflow: visible;
}

.demo-devices--stack {
  overflow: visible;
}

/* —— Mobile tabbed demo previews —— */
.demo-devices-mobile {
  width: 100%;
  max-width: 22rem;
  margin: 0 auto;
  padding: 0 var(--space-1);
}

.demo-devices-mobile__tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: var(--space-1);
  padding: var(--space-1);
  margin-bottom: var(--space-4);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--lm-border);
  box-shadow: var(--shadow-lg);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.demo-devices-mobile__tabs::-webkit-scrollbar {
  display: none;
}

.demo-devices-mobile__tab {
  flex: 1 1 0;
  min-width: 0;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-1);
  border: none;
  border-radius: 0.75rem;
  background: transparent;
  color: var(--lm-muted);
  font: inherit;
  font-size: 0.625rem;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.demo-devices-mobile__tab span {
  display: block;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.demo-devices-mobile__tab .lm-icon {
  color: var(--lm-accent-deep);
  opacity: 0.65;
  flex-shrink: 0;
}

.demo-devices-mobile__tab.is-active {
  background: var(--lm-accent-muted);
  color: var(--lm-accent-deep);
  box-shadow: inset 0 0 0 1px rgba(13, 148, 136, 0.18);
}

.demo-devices-mobile__tab.is-active .lm-icon {
  opacity: 1;
}

.demo-devices-mobile__panels {
  position: relative;
  min-height: 17.5rem;
}

.demo-devices-mobile__panel {
  margin: 0;
}

.demo-devices-mobile__panel[hidden] {
  display: none !important;
}

.demo-devices-mobile__stage {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: var(--space-3) var(--space-2) var(--space-4);
  border-radius: 1.35rem;
  background:
    radial-gradient(ellipse 90% 70% at 50% 0%, rgba(204, 251, 241, 0.45), transparent 62%),
    linear-gradient(180deg, rgba(248, 250, 252, 0.95) 0%, rgba(241, 245, 249, 0.55) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 16px 36px -22px rgba(13, 148, 136, 0.28),
    0 8px 24px -16px rgba(15, 23, 42, 0.12);
}

.demo-devices-mobile__iphone {
  width: 100%;
  max-width: 15.5rem;
  margin: 0 auto;
}

.demo-devices-mobile__caption {
  display: none;
}

.demo-devices-caption--mobile {
  margin-top: var(--space-4);
  text-align: center;
  font-size: 0.8125rem;
  color: var(--lm-muted);
  line-height: 1.5;
  padding: 0 var(--space-2);
}

/* —— Mobile dashboard mock (inside iPhone frame) —— */
.safari-dash-mobile {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: var(--space-1) var(--space-2) var(--space-1);
  background: #f8fafc;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
  overflow: hidden;
}

.safari-dash-mobile__topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-1);
  padding-bottom: var(--space-1);
}

.safari-dash-mobile__brand {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  min-width: 0;
}

.safari-dash-mobile__mark {
  flex-shrink: 0;
  width: 1.35rem;
  height: 1.35rem;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: linear-gradient(145deg, #14b8a6, #0d9488);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  box-shadow: var(--shadow-md);
}

.safari-dash-mobile__brand strong {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.safari-dash-mobile__live {
  flex-shrink: 0;
  padding: 0.12rem var(--space-2);
  border-radius: 100px;
  background: #ecfdf5;
  color: #047857;
  font-size: 0.48rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.22);
}

.safari-dash-mobile__greeting {
  padding: var(--space-1) 0 var(--space-2);
}

.safari-dash-mobile__greeting h3 {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.safari-dash-mobile__greeting p {
  margin: 0.12rem 0 0;
  font-size: 0.52rem;
  color: #64748b;
}

.safari-dash-mobile__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-1);
  margin-bottom: var(--space-2);
}

.safari-dash-mobile__stats article {
  padding: var(--space-1) var(--space-1);
  border-radius: var(--radius-tiny);
  background: #fff;
  border: 1px solid #e8edf2;
  box-shadow: var(--shadow-sm);
}

.safari-dash-mobile__stats span {
  display: block;
  font-size: 0.44rem;
  color: #64748b;
  line-height: 1.2;
}

.safari-dash-mobile__stats strong {
  display: block;
  margin-top: 0.12rem;
  font-size: 0.72rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.safari-dash-mobile__orders {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  overflow: hidden;
}

.safari-dash-mobile__orders-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.05rem 0.1rem;
}

.safari-dash-mobile__orders-head strong {
  font-size: 0.56rem;
  font-weight: 700;
  color: #0f172a;
}

.safari-dash-mobile__orders-head span {
  font-size: 0.48rem;
  font-weight: 600;
  color: #0d9488;
}

.safari-dash-mobile__order {
  padding: var(--space-1) var(--space-2);
  border-radius: 9px;
  background: #fff;
  border: 1px solid #e8edf2;
  box-shadow: var(--shadow-sm);
}

.safari-dash-mobile__order-top,
.safari-dash-mobile__order-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-1);
}

.safari-dash-mobile__order-body {
  margin-top: var(--space-1);
}

.safari-dash-mobile__order-id {
  font-size: 0.52rem;
  font-weight: 700;
  color: #0f172a;
}

.safari-dash-mobile__order-meta {
  flex: 1;
  min-width: 0;
  font-size: 0.5rem;
  color: #64748b;
  line-height: 1.25;
}

.safari-dash-mobile__order-price {
  flex-shrink: 0;
  font-size: 0.52rem;
  font-weight: 700;
  color: #0f766e;
}

.safari-dash-mobile__status {
  flex-shrink: 0;
  padding: 0.08rem var(--space-1);
  border-radius: 100px;
  font-size: 0.42rem;
  font-weight: 700;
}

.safari-dash-mobile__status--new {
  background: #fffbeb;
  color: #b45309;
}

.safari-dash-mobile__status--done {
  background: #ecfdf5;
  color: #047857;
}

.safari-dash-mobile__nav {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-1);
  margin-top: auto;
  padding: var(--space-1) var(--space-1) 0.1rem;
  border-top: 1px solid #e8edf2;
}

.safari-dash-mobile__nav span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.12rem;
  font-size: 0.42rem;
  font-weight: 600;
  color: #94a3b8;
}

.safari-dash-mobile__nav span em {
  font-style: normal;
  font-size: 0.42rem;
}

.safari-dash-mobile__nav span.is-active {
  color: #0d9488;
}

.safari-dash-mobile__nav span .lm-icon {
  opacity: 0.75;
}

.safari-dash-mobile__nav span.is-active .lm-icon {
  opacity: 1;
}

@keyframes demo-mobile-panel-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 480px) {
  .demo-devices-mobile {
    max-width: 100%;
  }

  .demo-devices-mobile__tab {
    font-size: 0.58rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .demo-devices-mobile__panel {
    animation: none;
  }
}
