/* SureShow product UI motion — status board + SMS demo */

.ss-demo {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
  margin: 28px 0 8px;
  align-items: stretch;
}

@media (max-width: 860px) {
  .ss-demo {
    grid-template-columns: 1fr;
  }
}

.ss-demo__panel {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
  box-shadow: 0 18px 48px rgba(10, 27, 61, 0.08);
  overflow: hidden;
  min-height: 320px;
}

.ss-demo__panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fbfcfe, #f4f8fc);
}

.ss-demo__label {
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.ss-demo__title {
  margin: 2px 0 0;
  color: var(--navy);
  font-size: 15px;
  font-weight: 900;
}

.ss-demo__live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--sky);
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
}

.ss-demo__live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 0 rgba(13, 109, 255, 0.45);
}

.ss-demo.is-playing .ss-demo__live-dot {
  animation: ss-live-pulse 1.6s ease-out infinite;
}

@keyframes ss-live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(13, 109, 255, 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(13, 109, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(13, 109, 255, 0); }
}

/* ---- Status board ---- */
.ss-board {
  padding: 12px 14px 16px;
}

.ss-board__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.ss-board__chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--sky);
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.ss-board__chip.is-green {
  background: var(--green-bg);
  color: #15803d;
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 280ms ease, transform 280ms ease;
}

.ss-board__chip.is-green.is-on {
  opacity: 1;
  transform: scale(1);
}

.ss-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 12px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfcfe;
  transition: border-color 240ms ease, background 240ms ease, box-shadow 240ms ease;
}

.ss-row.is-hot {
  border-color: rgba(13, 109, 255, 0.35);
  background: #f3f8ff;
  box-shadow: 0 0 0 3px rgba(13, 109, 255, 0.08);
}

.ss-row.is-ok {
  border-color: rgba(34, 197, 94, 0.28);
  background: #f5fcf7;
}

.ss-row.is-warn {
  border-color: rgba(245, 158, 11, 0.35);
  background: #fffaf0;
}

.ss-row__who {
  display: grid;
  gap: 2px;
}

.ss-row__name {
  color: var(--navy);
  font-size: 14px;
  font-weight: 900;
}

.ss-row__role {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.ss-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  min-width: 88px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef2f7;
  color: #5b6b82;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.01em;
  transition: background 240ms ease, color 240ms ease, transform 240ms ease;
}

.ss-badge.is-pop {
  animation: ss-badge-pop 420ms cubic-bezier(0.2, 0.9, 0.25, 1);
}

.ss-badge[data-state="waiting"] {
  background: #eef2f7;
  color: #5b6b82;
}

.ss-badge[data-state="confirmed"],
.ss-badge[data-state="on-my-way"],
.ss-badge[data-state="arrived"] {
  background: var(--green-bg);
  color: #15803d;
}

.ss-badge[data-state="late"],
.ss-badge[data-state="needs-attention"] {
  background: #fff4e5;
  color: #9a5300;
}

@keyframes ss-badge-pop {
  0% { transform: scale(0.86); }
  55% { transform: scale(1.06); }
  100% { transform: scale(1); }
}

/* ---- Phone / SMS ---- */
.ss-phone {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--navy);
  color: var(--white);
}

.ss-phone .ss-demo__panel-head {
  background: rgba(255, 255, 255, 0.04);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.ss-phone .ss-demo__label {
  color: rgba(231, 239, 255, 0.65);
}

.ss-phone .ss-demo__title {
  color: #edf5ff;
}

.ss-phone__thread {
  display: grid;
  gap: 10px;
  padding: 16px;
  flex: 1;
  align-content: start;
}

.ss-bubble {
  max-width: 92%;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
  color: #edf5ff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  opacity: 0;
  transform: translateY(10px) scale(0.98);
  transition: opacity 320ms ease, transform 320ms ease;
}

.ss-bubble.is-in {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.ss-bubble.is-reply {
  margin-left: auto;
  background: rgba(34, 197, 94, 0.18);
  color: #d9ffe8;
  border-bottom-right-radius: 4px;
}

.ss-bubble:not(.is-reply) {
  border-bottom-left-radius: 4px;
}

.ss-typing {
  display: none;
  align-items: center;
  gap: 5px;
  width: fit-content;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  margin-left: auto;
}

.ss-typing.is-on {
  display: inline-flex;
}

.ss-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(237, 245, 255, 0.7);
  animation: ss-dot 1s ease-in-out infinite;
}

.ss-typing span:nth-child(2) { animation-delay: 0.15s; }
.ss-typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes ss-dot {
  0%, 80%, 100% { opacity: 0.35; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-3px); }
}

/* ---- Scroll-triggered SMS boxes on page ---- */
.sms-box[data-ss-sms-animate] .sms-message {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 360ms ease, transform 360ms ease;
}

.sms-box[data-ss-sms-animate].is-visible .sms-message {
  opacity: 1;
  transform: translateY(0);
}

.sms-box[data-ss-sms-animate].is-visible .sms-message:nth-child(1) { transition-delay: 0ms; }
.sms-box[data-ss-sms-animate].is-visible .sms-message:nth-child(2) { transition-delay: 90ms; }
.sms-box[data-ss-sms-animate].is-visible .sms-message:nth-child(3) { transition-delay: 180ms; }
.sms-box[data-ss-sms-animate].is-visible .sms-message:nth-child(4) { transition-delay: 270ms; }
.sms-box[data-ss-sms-animate].is-visible .sms-message:nth-child(5) { transition-delay: 360ms; }
.sms-box[data-ss-sms-animate].is-visible .sms-message:nth-child(6) { transition-delay: 450ms; }
.sms-box[data-ss-sms-animate].is-visible .sms-message:nth-child(7) { transition-delay: 540ms; }
.sms-box[data-ss-sms-animate].is-visible .sms-message:nth-child(8) { transition-delay: 630ms; }

/* ---- Flow steps ---- */
.flow-visual[data-ss-flow-animate] span {
  opacity: 0.45;
  transform: translateY(6px);
  transition: opacity 280ms ease, transform 280ms ease, border-color 280ms ease, box-shadow 280ms ease, background 280ms ease;
}

.flow-visual[data-ss-flow-animate].is-visible span {
  opacity: 1;
  transform: translateY(0);
}

.flow-visual[data-ss-flow-animate] span.is-active {
  border-color: rgba(13, 109, 255, 0.45);
  background: #f3f8ff;
  box-shadow: 0 0 0 3px rgba(13, 109, 255, 0.1);
  color: var(--blue);
}

.flow-visual[data-ss-flow-animate] span.is-done {
  border-color: rgba(34, 197, 94, 0.35);
  background: #f5fcf7;
  color: #15803d;
}

/* ---- Status pills strip ---- */
.status-pill-strip[data-ss-pills-animate] .pill {
  opacity: 0;
  transform: translateY(8px) scale(0.96);
  transition: opacity 300ms ease, transform 300ms ease;
}

.status-pill-strip[data-ss-pills-animate].is-visible .pill {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.status-pill-strip[data-ss-pills-animate].is-visible .pill:nth-child(1) { transition-delay: 0ms; }
.status-pill-strip[data-ss-pills-animate].is-visible .pill:nth-child(2) { transition-delay: 70ms; }
.status-pill-strip[data-ss-pills-animate].is-visible .pill:nth-child(3) { transition-delay: 140ms; }
.status-pill-strip[data-ss-pills-animate].is-visible .pill:nth-child(4) { transition-delay: 210ms; }
.status-pill-strip[data-ss-pills-animate].is-visible .pill:nth-child(5) { transition-delay: 280ms; }
.status-pill-strip[data-ss-pills-animate].is-visible .pill:nth-child(6) { transition-delay: 350ms; }

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  .ss-demo.is-playing .ss-demo__live-dot,
  .ss-badge.is-pop,
  .ss-typing span {
    animation: none !important;
  }

  .ss-bubble,
  .sms-box[data-ss-sms-animate] .sms-message,
  .flow-visual[data-ss-flow-animate] span,
  .status-pill-strip[data-ss-pills-animate] .pill,
  .ss-board__chip.is-green {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .ss-typing {
    display: none !important;
  }
}
