/* Phone mockup + interactive widget additions */

/* View toggle (Desktop / Mobile) */
.view-toggle {
  position: absolute;
  top: -8px;
  inset-inline-start: 0;
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  z-index: 20;
  backdrop-filter: blur(8px);
}
.view-toggle button {
  padding: 6px 14px;
  font-size: 12.5px; font-weight: 600;
  color: rgba(255,255,255,.6);
  border-radius: 999px;
  transition: background .15s, color .15s;
}
.view-toggle button.active {
  background: #fff; color: var(--indigo);
}

/* Close button in widget header */
.cw-close {
  width: 28px; height: 28px;
  border-radius: 50%;
  color: rgba(255,255,255,.8);
  display: grid; place-items: center;
  transition: background .15s;
}
.cw-close:hover { background: rgba(255,255,255,.12); color: #fff; }

/* Quick-reply suggestions */
.cw-suggestions {
  display: flex; flex-direction: column; gap: 6px;
  margin-block-start: 4px;
}
.cw-suggestion {
  text-align: start;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  font-size: 12.5px;
  color: var(--ink);
  transition: border-color .15s, background .15s;
}
.cw-suggestion:hover { border-color: var(--indigo); background: rgba(47,67,111,.04); }

/* Compact widget for phone */
.chat-widget-compact {
  position: absolute !important;
  inset: 0 !important;
  width: auto !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  display: flex; flex-direction: column;
  z-index: 10;
}
.chat-widget-compact .cw-body {
  flex: 1;
  height: auto;
}

/* Phone mockup */
.phone-mockup {
  width: 280px;
  margin-inline: auto;
  position: relative;
  transform: rotate(-2deg);
}
.phone-frame {
  background: #0A0B14;
  border-radius: 36px;
  padding: 8px;
  box-shadow:
    0 40px 100px -20px rgba(0,0,0,.6),
    0 20px 40px -10px rgba(47,67,111,.4),
    inset 0 0 0 2px rgba(255,255,255,.08);
  position: relative;
}
.phone-notch {
  position: absolute;
  top: 10px; left: 50%; transform: translateX(-50%);
  width: 100px; height: 22px;
  background: #0A0B14;
  border-radius: 0 0 14px 14px;
  z-index: 10;
}
.phone-screen {
  background: #fff;
  border-radius: 28px;
  overflow: hidden;
  aspect-ratio: 9 / 19.5;
  position: relative;
  display: flex; flex-direction: column;
}
.phone-statusbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 24px 4px;
  font-size: 11px; font-weight: 600; color: var(--ink);
  min-height: 26px;
}
.ps-ico { display: inline-block; width: 14px; height: 10px; background: currentColor; opacity: .9; }
.ps-ico.signal { mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 10'%3E%3Crect x='0' y='7' width='3' height='3' rx='.5'/%3E%3Crect x='4' y='5' width='3' height='5' rx='.5'/%3E%3Crect x='8' y='3' width='3' height='7' rx='.5'/%3E%3Crect x='12' y='0' width='3' height='10' rx='.5'/%3E%3C/svg%3E") center/contain no-repeat; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 10'%3E%3Crect x='0' y='7' width='3' height='3' rx='.5'/%3E%3Crect x='4' y='5' width='3' height='5' rx='.5'/%3E%3Crect x='8' y='3' width='3' height='7' rx='.5'/%3E%3Crect x='12' y='0' width='3' height='10' rx='.5'/%3E%3C/svg%3E") center/contain no-repeat; }
.ps-ico.battery { width: 22px; border: 1px solid currentColor; border-radius: 3px; background: none; position: relative; }
.ps-ico.battery::before { content: ''; position: absolute; inset: 1px; width: 70%; background: currentColor; border-radius: 1px; }
.ps-ico.battery::after { content: ''; position: absolute; right: -3px; top: 3px; width: 2px; height: 4px; background: currentColor; border-radius: 0 1px 1px 0; }

.phone-store { flex: 1; position: relative; overflow: hidden; }
.phone-store .storefront { padding: 12px; font-size: 11px; }
.phone-store .sf-brand { font-size: 13px; }
.phone-store .sf-nav { font-size: 10px; gap: 10px; }
.phone-store .sf-cart { font-size: 10px; padding: 4px 8px; }
.phone-store .sf-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
.phone-store .sf-hero-banner { font-size: 9px; }

/* Launcher FAB */
.launcher {
  position: absolute;
  inset-block-end: 16px;
  inset-inline-end: 16px;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--indigo);
  color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 12px 32px rgba(47,67,111,.45), 0 4px 12px rgba(47,67,111,.3);
  z-index: 6;
  transition: transform .2s, box-shadow .2s;
}
.launcher:hover { transform: scale(1.06); box-shadow: 0 16px 40px rgba(47,67,111,.55), 0 6px 14px rgba(47,67,111,.4); }
.launcher.bump { animation: launcherBump .6s ease-out; }
@keyframes launcherBump {
  0%, 100% { transform: scale(1); }
  40% { transform: scale(1.12); }
}
.launcher svg { width: 20px; height: 20px; }
.launcher-badge {
  position: absolute;
  top: -4px; inset-inline-end: -4px;
  min-width: 18px; height: 18px;
  background: var(--coral);
  color: #fff;
  border-radius: 9px;
  font-size: 10px; font-weight: 700;
  display: grid; place-items: center;
  padding: 0 4px;
  border: 2px solid #fff;
}

.phone-widget-wrap {
  position: absolute;
  inset: 0;
  z-index: 5;
  animation: slideUp .35s cubic-bezier(.2,.7,.3,1);
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .launcher.bump { animation: none !important; }
  .phone-widget-wrap { animation: none !important; }
}
