/* Solution card scenes (template-parts/solutions/stage.php). Each scene runs off one edge of its tile:
   sx-flow-up rises from the bottom, sx-flow-down hangs from the top, sx-flow-left and sx-flow-right slide
   in from a side. assets/js/sol-stage.js adds .is-in when the tile scrolls into view, and the scene moves in
   from its edge. Hover nudges it a little further along the same direction. */

.lx-sol-stage.sx-stage {
  --sx-ink: #182021;
  --sx-muted: #626968;
  --sx-blue: #047857;
  position: relative;
  display: block;
  padding: 0;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.35;
  color: var(--sx-ink);
}

.sx-stage > * {
  position: absolute;
  transition: transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.6s ease;
}

/* Direction: where the scene sits, and where it comes from. */
.sx-flow-up > :first-child { right: 9%; bottom: -16px; left: 9%; }
.sx-flow-down > :first-child { top: -16px; right: 9%; left: 9%; }
.sx-flow-left > :first-child { top: 14%; left: -16px; width: 70%; }
.sx-flow-right > :first-child { top: 12%; right: -16px; width: 72%; }

.sx-stage.sx-js:not(.is-in) > * { opacity: 0; }
.sx-flow-up.sx-js:not(.is-in) > * { transform: translateY(40px); }
.sx-flow-down.sx-js:not(.is-in) > * { transform: translateY(-40px); }
.sx-flow-left.sx-js:not(.is-in) > * { transform: translateX(-50px); }
.sx-flow-right.sx-js:not(.is-in) > * { transform: translateX(50px); }

.sx-stage > :nth-child(2) { transition-delay: 0.18s; }

@media (hover: hover) {
  .lx-sol-card:hover .sx-flow-up > :first-child { transform: translateY(-8px); }
  .lx-sol-card:hover .sx-flow-down > :first-child { transform: translateY(8px); }
  .lx-sol-card:hover .sx-flow-left > :first-child { transform: translateX(8px); }
  .lx-sol-card:hover .sx-flow-right > :first-child { transform: translateX(-8px); }
}

/* ---- Shared pieces ---- */
.sx-card {
  padding: 14px 16px;
  border-radius: 14px;
  background: #FFFFFF;
  box-shadow: 0 1px 2px rgb(24 32 33 / 0.06), 0 18px 40px -14px rgb(4 120 87 / 0.28);
}

.sx-stage :where(p) { margin: 0; }

.sx-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 700;
}

.sx-head span { font-weight: 500; color: var(--sx-muted); }

.sx-tag {
  flex: none;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-style: normal;
  font-weight: 600;
}

.sx-tag--blue { background: #ebfbf5; color: var(--sx-blue); }
.sx-tag--green { background: #E6F4EB; color: #1E7A45; }
.sx-tag--amber { background: #FBF0DC; color: #946414; }

.sx-btn {
  display: inline-block;
  margin-top: 10px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--sx-blue);
  color: #FFFFFF;
  font-size: 11.5px;
  font-weight: 600;
}

.sx-check {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #24824C;
  color: #FFFFFF;
  font-size: 10px;
  font-style: normal;
}

.sx-stage img { display: block; object-fit: cover; }

/* ---- Clients ---- */
.sx-list ul { display: grid; gap: 9px; margin: 0; padding: 0 0 18px; list-style: none; }
.sx-list li { display: flex; align-items: center; gap: 10px; }
.sx-list li b { flex: 1; font-weight: 600; }
.sx-av {
  display: grid;
  flex: none;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #FFFFFF;
  font-size: 10.5px;
  font-weight: 700;
}
.sx-av--blue { background: #3E6B8C; }
.sx-av--green { background: #6E8A63; }
.sx-av--amber { background: #C0703F; }

/* ---- Sessions ---- */
.sx-session { padding: 0; overflow: hidden; }
.sx-session .sx-cover { width: 100%; height: 110px; }
.sx-session-body { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.sx-session-body > span:nth-child(2) { display: grid; flex: 1; }
.sx-session-body small { color: var(--sx-muted); }
.sx-date {
  display: grid;
  flex: none;
  place-items: center;
  width: 42px;
  height: 46px;
  border-radius: 10px;
  background: var(--sx-blue);
  color: #FFFFFF;
}
.sx-date b { font-size: 9px; text-transform: uppercase; }
.sx-date strong { font-size: 18px; line-height: 1; }

/* ---- Calendar ---- */
.sx-cal { padding-top: 26px; }
.sx-cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.sx-cal-grid span {
  display: grid;
  align-content: start;
  gap: 2px;
  min-height: 34px;
  padding: 4px;
  border-radius: 6px;
  background: #F2F4F7;
}
.sx-cal-grid b { font-size: 9.5px; font-weight: 600; color: var(--sx-muted); }
.sx-cal-grid .is-on { background: var(--sx-blue); }
.sx-cal-grid .is-on b,
.sx-cal-grid .is-on i { color: #FFFFFF; }
.sx-cal-grid i { font-size: 9px; font-style: normal; font-weight: 700; }

/* ---- Messages ---- */
.sx-chat { display: grid; gap: 8px; justify-items: start; padding-bottom: 22px; }
.sx-bubble {
  max-width: 78%;
  padding: 8px 12px;
  border-radius: 14px 14px 14px 4px;
  background: #FFFFFF;
  box-shadow: 0 10px 24px -12px rgb(24 32 33 / 0.3);
  font-size: 12px;
}
.sx-bubble--me { justify-self: end; border-radius: 14px 14px 4px 14px; background: var(--sx-blue); color: #FFFFFF; }
.sx-bubble--photo { width: 60%; padding: 4px; }
.sx-bubble--photo img { width: 100%; height: 70px; border-radius: 10px; }

/* ---- Email ---- */
.sx-mail-to { font-size: 11px; color: var(--sx-muted); }
.sx-mail-to span { font-weight: 700; color: var(--sx-ink); }
.sx-mail-subject { margin: 4px 0 10px; font-size: 14px; font-weight: 700; }
.sx-mail-hero { width: 100%; height: 90px; border-radius: 10px; }

/* ---- Forms ---- */
.sx-form { padding-bottom: 30px; }
.sx-q { margin-top: 8px; font-size: 11px; font-weight: 700; color: var(--sx-muted); }
.sx-a { margin-top: 3px; padding: 7px 10px; border-radius: 8px; background: #F2F4F7; }

/* ---- Documents ---- */
.sx-doc { padding-top: 30px; }
.sx-doc-text { margin-bottom: 6px; font-size: 11px; color: var(--sx-muted); }
.sx-sign { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; padding-top: 8px; border-top: 1px solid #E6E8EB; }
.sx-sign em { font-family: "Segoe Script", "Bradley Hand", cursive; font-size: 16px; color: var(--sx-blue); }

/* ---- Quotes ---- */
.sx-quote { display: flex; gap: 14px; align-items: center; }
.sx-quote .sx-thumb { flex: none; width: 92px; height: 112px; border-radius: 10px; }
.sx-quote > div { display: grid; }
.sx-quote small { color: var(--sx-muted); }
.sx-quote b { font-size: 13px; }
.sx-quote strong { font-size: 24px; letter-spacing: -0.02em; }
.sx-quote .sx-btn { justify-self: start; }

/* ---- Invoices ---- */
.sx-invoice { padding-bottom: 30px; }
.sx-line { display: flex; justify-content: space-between; padding: 7px 0; border-top: 1px solid #EEF0F3; }
.sx-line span { color: var(--sx-muted); }
.sx-line--due span,
.sx-line--due b { font-size: 14px; font-weight: 700; color: var(--sx-ink); }
.sx-line--due b { color: var(--sx-blue); }

/* ---- Payments ---- */
.sx-paycard {
  display: grid;
  align-content: space-between;
  aspect-ratio: 1.6;
  padding: 16px 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, #1D2427 0%, #33404A 100%);
  box-shadow: 0 24px 40px -18px rgb(24 32 33 / 0.6);
  color: #FFFFFF;
}
.sx-chip { width: 34px; height: 26px; border-radius: 6px; background: linear-gradient(135deg, #E5C78A, #B8924B); }
.sx-paycard-num { font-size: 15px; letter-spacing: 0.08em; }
.sx-paycard-name { font-size: 11px; color: rgb(255 255 255 / 0.7); }
.sx-toast { right: 6%; bottom: 12%; display: flex; gap: 10px; align-items: center; padding: 10px 14px; }
.sx-toast span { display: grid; }
.sx-toast small { color: var(--sx-muted); }

/* ---- Expenses ---- */
.sx-bars { padding-bottom: 28px; }
.sx-bar-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; align-items: end; height: 96px; }
.sx-bar-row span {
  position: relative;
  height: var(--h);
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, #10b981, var(--sx-blue));
}
.sx-bar-row i {
  position: absolute;
  top: -16px;
  left: 50%;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  transform: translateX(-50%);
}
.sx-bar-labels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 6px; font-size: 10px; text-align: center; color: var(--sx-muted); }

/* ---- Galleries ---- */
.sx-flow-down > .sx-gallery { top: -24px; right: -10px; left: -10px; }
.sx-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; transform-origin: top; }
.sx-gallery span { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 8px; }
.sx-gallery img { width: 100%; height: 100%; }
.sx-gallery i {
  position: absolute;
  right: 6px;
  bottom: 6px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #FFFFFF;
  color: #E0245E;
  font-size: 12px;
  font-style: normal;
}
.sx-float {
  right: 8%;
  bottom: 10%;
  padding: 7px 12px;
  border-radius: 999px;
  background: #FFFFFF;
  box-shadow: 0 12px 26px -10px rgb(24 32 33 / 0.4);
  color: #E0245E;
  font-weight: 700;
}

/* ---- Client portal ---- */
.sx-portal { padding: 0; overflow: hidden; }
.sx-portal .sx-cover { width: 100%; height: 70px; }
.sx-portal-hi { padding: 10px 14px 4px; font-size: 13px; font-weight: 700; }
.sx-portal ul { display: grid; gap: 6px; margin: 0; padding: 4px 14px 14px; list-style: none; }
.sx-portal li { display: flex; align-items: center; justify-content: space-between; padding: 6px 10px; border-radius: 8px; background: #F5F6F8; }

/* ---- Print shop ---- */
.sx-flow-up > .sx-frame { right: auto; bottom: -24px; left: 12%; width: 46%; }
.sx-frame { padding: 10px; border-radius: 4px; background: #FFFFFF; box-shadow: 0 0 0 6px #2B2420, 0 24px 40px -14px rgb(24 32 33 / 0.5); }
.sx-frame img { width: 100%; aspect-ratio: 4 / 5; }
.sx-price { top: 18%; right: 9%; display: grid; gap: 2px; }
.sx-price small { color: var(--sx-muted); }
.sx-price strong { font-size: 22px; }
.sx-sizes { display: flex; gap: 4px; margin-top: 6px; }
.sx-sizes i { padding: 3px 7px; border-radius: 6px; background: #F2F4F7; font-size: 10px; font-style: normal; font-weight: 600; }
.sx-sizes i.is-on { background: var(--sx-blue); color: #FFFFFF; }

/* ---- Workflows ---- */
.sx-flow-left > .sx-flow { top: 50%; width: auto; margin-top: -21px; }
.sx-flow { display: flex; align-items: center; white-space: nowrap; }
.sx-node {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #FFFFFF;
  box-shadow: 0 12px 26px -12px rgb(24 32 33 / 0.3);
  font-weight: 600;
}
.sx-node--on { background: var(--sx-blue); color: #FFFFFF; }
.sx-link { width: 26px; height: 2px; background: #b9f5dd; }

@media (prefers-reduced-motion: reduce) {
  .sx-stage > * { transition: none; }
  .sx-stage.sx-js:not(.is-in) > * { opacity: 1; transform: none; }
}
