/* ========================================================================
   Surface mockups — Step 3 "in-context" preview surfaces
   ------------------------------------------------------------------------
   Three plausible product surfaces where a Mesh deposit button might live:
   exchange dashboard, fintech mobile app, and e-commerce checkout. Each
   surface is intentionally generic — no Mesh logos, plausible labels — so
   evaluators read the rendered button as "your product surface" and can
   judge contrast, scale, and placement.

   Sizing approach: each surface uses a fixed internal canvas width so the
   layout never collapses; the whole surface scales down to fit narrow
   preview stages via transform: scale().
   ======================================================================== */

/* ---- Shared browser chrome (Exchange + Checkout) ---- */
.surface-browser {
  width: 100%;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid rgba(15,23,42,0.10);
  box-shadow: 0 12px 28px rgba(15,23,42,0.10);
  overflow: hidden;
  font-family: 'Inter Tight', system-ui, sans-serif;
}
.surface-browser-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #F1F5F9;
  border-bottom: 1px solid rgba(15,23,42,0.08);
}
.surface-browser-dots {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.surface-browser-dots span {
  width: 11px; height: 11px; border-radius: 50%;
  background: #D6D3D1;
}
.surface-browser-dots span:nth-child(1) { background: #F87171; }
.surface-browser-dots span:nth-child(2) { background: #FBBF24; }
.surface-browser-dots span:nth-child(3) { background: #34D399; }
.surface-browser-url {
  flex: 1;
  text-align: center;
  font-size: 11.5px;
  color: #64748B;
  background: #ffffff;
  padding: 5px 12px;
  border-radius: 6px;
  border: 1px solid rgba(15,23,42,0.06);
  max-width: 380px;
  margin: 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.surface-browser-url-lock {
  font-size: 9px;
}
.surface-browser-spacer {
  width: 60px;
  flex-shrink: 0;
}

/* ===================================================
   Surface: Exchange dashboard
   =================================================== */
.surface-exchange {
  width: 100%;
  max-width: 760px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.surface-exchange-body {
  display: flex;
  min-height: 360px;
  background: #FAFAF9;
}
.surface-exchange-dark .surface-exchange-body { background: #0F172A; color: #F1F5F9; }
.surface-exchange-dark .surface-browser { background: #0F172A; border-color: #1E293B; }
.surface-exchange-dark .surface-browser-bar { background: #0B1220; border-color: #1E293B; }
.surface-exchange-dark .surface-browser-url { background: #1E293B; color: #94A3B8; border-color: #334155; }

.surface-exchange-nav {
  width: 140px;
  flex-shrink: 0;
  padding: 16px 12px;
  border-right: 1px solid rgba(15,23,42,0.08);
  background: #ffffff;
}
.surface-exchange-dark .surface-exchange-nav { background: #1E293B; border-color: #334155; }

.surface-exchange-logo {
  width: 28px; height: 28px;
  border-radius: 7px;
  background: linear-gradient(135deg, #5B21B6, #7C3AED);
  margin-bottom: 18px;
}
.surface-exchange-nav-items {
  display: flex; flex-direction: column; gap: 2px;
}
.surface-exchange-nav-items span {
  font-size: 12px;
  font-weight: 500;
  color: #64748B;
  padding: 7px 10px;
  border-radius: 6px;
}
.surface-exchange-nav-items .active {
  background: rgba(91,33,182,0.08);
  color: #5B21B6;
  font-weight: 600;
}
.surface-exchange-dark .surface-exchange-nav-items span { color: #94A3B8; }
.surface-exchange-dark .surface-exchange-nav-items .active { background: rgba(124,58,237,0.18); color: #C4B5FD; }

.surface-exchange-main {
  flex: 1;
  padding: 18px 22px;
  overflow: hidden;
}
.surface-exchange-crumbs {
  font-size: 11px;
  color: #94A3B8;
  margin-bottom: 12px;
  letter-spacing: 0.02em;
}
.surface-exchange-balance-card {
  background: #ffffff;
  border: 1px solid rgba(15,23,42,0.08);
  border-radius: 12px;
  padding: 18px 20px 20px;
  margin-bottom: 14px;
}
.surface-exchange-dark .surface-exchange-balance-card { background: #1E293B; border-color: #334155; }
.surface-exchange-balance-label {
  font-size: 11px;
  color: #94A3B8;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.surface-exchange-balance-value {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #0F172A;
  margin-bottom: 2px;
}
.surface-exchange-dark .surface-exchange-balance-value { color: #F1F5F9; }
.surface-exchange-balance-sub {
  font-size: 12.5px;
  color: #64748B;
  margin-bottom: 14px;
}
.surface-exchange-dark .surface-exchange-balance-sub { color: #94A3B8; }


.surface-exchange-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.surface-exchange-tile {
  background: #ffffff;
  border: 1px solid rgba(15,23,42,0.08);
  border-radius: 10px;
  padding: 14px 16px;
}
.surface-exchange-dark .surface-exchange-tile { background: #1E293B; border-color: #334155; }
.surface-exchange-tile-head {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 10px;
}
.surface-exchange-rows { display: flex; flex-direction: column; gap: 6px; }
.surface-exchange-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}
.surface-exchange-row .up { color: #16A34A; font-weight: 500; }
.surface-exchange-row .down { color: #DC2626; font-weight: 500; }
.surface-exchange-empty {
  font-size: 12px;
  color: #94A3B8;
  font-style: italic;
}

/* ===================================================
   Surface: Fintech app (iPhone)
   =================================================== */
.surface-fintech-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}
.surface-iphone {
  width: 280px;
  height: 540px;
  background: #ffffff;
  border-radius: 36px;
  padding: 8px;
  box-shadow:
    0 0 0 2px #1F2937,
    0 0 0 6px #0F172A,
    0 18px 50px rgba(15,23,42,0.25);
  position: relative;
  overflow: hidden;
  font-family: 'Inter Tight', system-ui, sans-serif;
}
.surface-iphone-dark { background: #0F172A; color: #F1F5F9; }
.surface-iphone-notch {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 22px;
  background: #0F172A;
  border-radius: 999px;
  z-index: 5;
}
.surface-iphone-home {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  border-radius: 2px;
  background: rgba(15,23,42,0.3);
}
.surface-iphone-dark .surface-iphone-home { background: rgba(255,255,255,0.4); }
.surface-iphone-screen {
  width: 100%;
  height: 100%;
  background: #F8FAFC;
  border-radius: 28px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.surface-iphone-dark .surface-iphone-screen { background: #1E293B; }
.surface-iphone-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 22px 6px;
  font-size: 11px;
  font-weight: 600;
  color: #0F172A;
}
.surface-iphone-dark .surface-iphone-status { color: #F1F5F9; }
.surface-iphone-status-icons {
  display: inline-flex;
  gap: 6px;
  font-size: 9px;
  letter-spacing: 0.5px;
}

.surface-fintech-body {
  padding: 14px 18px 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.surface-fintech-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.surface-fintech-back, .surface-fintech-help {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(15,23,42,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #64748B;
}
.surface-iphone-dark .surface-fintech-back,
.surface-iphone-dark .surface-fintech-help { background: rgba(255,255,255,0.08); color: #94A3B8; }
.surface-fintech-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.surface-fintech-balance {
  background: #ffffff;
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 16px;
  border: 1px solid rgba(15,23,42,0.06);
}
.surface-iphone-dark .surface-fintech-balance { background: #0F172A; border-color: #334155; }
.surface-fintech-balance-label {
  font-size: 11px;
  color: #94A3B8;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}
.surface-fintech-balance-value {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.surface-fintech-section {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.surface-fintech-section-label {
  font-size: 11px;
  color: #94A3B8;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}
/* All three surface CTA slots share the same sizing rule:
   - Each button hugs its label (no forced width: 100%)
   - All buttons in the stack match the WIDEST sibling (align-items: stretch)
   - Stack as a whole caps at the slot width and truncates if it would overflow
   This way "Smart Deposit" stays compact, "Deposit from exchange or wallet"
   grows uniformly, and a stack with mixed-length labels stays visually balanced. */
.surface-fintech-cta-slot,
.surface-checkout-cta-slot,
.surface-exchange-cta-slot {
  width: 100%;
  min-width: 0;
}
.surface-fintech-cta-slot,
.surface-checkout-cta-slot {
  margin-bottom: 12px;
}
.surface-exchange-cta-slot {
  display: flex;
}
.surface-fintech-cta-slot .route-stack,
.surface-checkout-cta-slot .route-stack,
.surface-exchange-cta-slot .route-stack {
  display: inline-flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
  max-width: 100%;
  min-width: 0;
}
.surface-fintech-cta-slot .route-stack-item,
.surface-checkout-cta-slot .route-stack-item,
.surface-exchange-cta-slot .route-stack-item {
  display: flex;
  justify-content: stretch;
  min-width: 0;
}
.surface-fintech-cta-slot .btn-stack,
.surface-checkout-cta-slot .btn-stack,
.surface-exchange-cta-slot .btn-stack {
  align-items: stretch;
  min-width: 0;
}
.surface-fintech-cta-slot .rendered-btn,
.surface-checkout-cta-slot .rendered-btn,
.surface-exchange-cta-slot .rendered-btn {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
.surface-fintech-cta-slot .rendered-btn-icon,
.surface-checkout-cta-slot .rendered-btn-icon,
.surface-exchange-cta-slot .rendered-btn-icon {
  flex-shrink: 0;
}
.surface-fintech-cta-slot .rendered-btn-label,
.surface-checkout-cta-slot .rendered-btn-label,
.surface-exchange-cta-slot .rendered-btn-label {
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.surface-fintech-foot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #94A3B8;
  margin-top: auto;
  padding-top: 12px;
}

/* ===================================================
   Surface: Checkout (e-commerce)
   =================================================== */
.surface-checkout {
  width: 100%;
  max-width: 760px;
}
.surface-checkout-body {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  min-height: 360px;
  background: #FAFAF9;
  font-family: 'Inter Tight', system-ui, sans-serif;
}
.surface-checkout-dark .surface-checkout-body { background: #0F172A; color: #F1F5F9; }
.surface-checkout-dark .surface-browser { background: #0F172A; border-color: #1E293B; }
.surface-checkout-dark .surface-browser-bar { background: #0B1220; border-color: #1E293B; }
.surface-checkout-dark .surface-browser-url { background: #1E293B; color: #94A3B8; border-color: #334155; }

.surface-checkout-summary {
  padding: 24px 28px;
  border-right: 1px solid rgba(15,23,42,0.08);
}
.surface-checkout-dark .surface-checkout-summary { border-color: #1E293B; }

.surface-checkout-eyebrow {
  font-size: 11px;
  color: #94A3B8;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin-bottom: 16px;
}
.surface-checkout-line {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.surface-checkout-thumb {
  width: 48px; height: 48px;
  border-radius: 8px;
  background: linear-gradient(135deg, #FCD34D, #F97316);
  flex-shrink: 0;
}
.surface-checkout-line-info { flex: 1; }
.surface-checkout-line-name {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 2px;
}
.surface-checkout-line-meta {
  font-size: 11.5px;
  color: #94A3B8;
}
.surface-checkout-line-price {
  font-size: 13px;
  font-weight: 600;
}
.surface-checkout-divider {
  height: 1px;
  background: rgba(15,23,42,0.08);
  margin: 12px 0;
}
.surface-checkout-dark .surface-checkout-divider { background: #1E293B; }
.surface-checkout-totals {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.surface-checkout-row {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  color: #64748B;
}
.surface-checkout-dark .surface-checkout-row { color: #94A3B8; }
.surface-checkout-row.surface-checkout-total {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(15,23,42,0.08);
  font-size: 14px;
  font-weight: 600;
  color: #0F172A;
}
.surface-checkout-dark .surface-checkout-row.surface-checkout-total {
  color: #F1F5F9;
  border-color: #1E293B;
}

.surface-checkout-pay {
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
}
.surface-checkout-pay-desc {
  font-size: 12.5px;
  color: #64748B;
  line-height: 1.5;
  margin-bottom: 14px;
}
.surface-checkout-dark .surface-checkout-pay-desc { color: #94A3B8; }

.surface-checkout-orsep {
  text-align: center;
  font-size: 11px;
  color: #94A3B8;
  margin: 8px 0 10px;
}
.surface-checkout-altpay {
  width: 100%;
  padding: 11px 16px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid rgba(15,23,42,0.12);
  color: #64748B;
  font-size: 13px;
  font-weight: 500;
  cursor: not-allowed;
  font-family: inherit;
}
.surface-checkout-dark .surface-checkout-altpay { border-color: #334155; color: #94A3B8; }

/* ===================================================
   Stage size adjustments per surface
   =================================================== */
.preview-stage-card {
  /* Keep current isolated look */
}
.preview-stage-exchange,
.preview-stage-checkout {
  padding: 22px;
  align-items: flex-start;
  min-height: 460px;
}
.preview-stage-fintech {
  padding: 22px;
  align-items: center;
  min-height: 580px;
}
