/* Live product-card widgets — GridBook, Atlas Tempo, RollSwipe.
   Shares tokens with styles.css; loaded after it. */

.widget{
  width:100%; height:100%; min-height:200px; padding:16px;
  font-family:var(--body); position:relative; overflow:hidden;
}

/* ---------- phone bezel — wraps Atlas Tempo + RollSwipe (real phone apps) ----------
   Real ~9:19.5 iPhone proportions. Corner radius corrected to ~10-12% of the
   frame's rendered width (a flat 32px read as a tablet/squircle at this
   size); bezel gets a diagonal metal-edge gradient instead of a flat fill;
   volume/mute/power side buttons are the strongest single "this is a phone"
   signal a flat CSS mockup can carry. Notch + status bar sit ON the screen
   (not the bezel margin) so they read against a light background instead of
   disappearing black-on-black. */
.device-frame--phone{
  position:relative; overflow:hidden; border-radius:24px;
  aspect-ratio:9/19.5; width:100%; max-width:220px; margin:0 auto;
  background:linear-gradient(135deg,#2c2e33 0%,#0a0a0a 18%,#0a0a0a 82%,#1a1b1e 100%);
  box-shadow:0 14px 28px rgba(0,0,0,0.28), 0 0 0 1px rgba(255,255,255,0.09);
}
.device-frame--phone .widget-mount{
  position:absolute; inset:8px; min-height:0; padding:0;
  border-radius:17px; overflow:hidden;
  background:var(--bg-elevated); border-color:transparent;
}
.device-frame--notch{
  position:absolute; top:22px; left:50%; transform:translateX(-50%);
  width:58px; height:16px; border-radius:100px; background:#000; z-index:3;
}
.device-frame--home-indicator{
  position:absolute; bottom:14px; left:50%; transform:translateX(-50%);
  width:58px; height:3.5px; border-radius:100px; background:rgba(0,0,0,0.55); z-index:3;
}
.device-frame--btn{
  position:absolute; background:#111214;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,0.06);
}
.device-frame--btn.mute{ left:-3px; top:19%; width:3px; height:3.5%; border-radius:2px 0 0 2px; }
.device-frame--btn.vol-up{ left:-3px; top:26%; width:3px; height:7%; border-radius:2px 0 0 2px; }
.device-frame--btn.vol-down{ left:-3px; top:36%; width:3px; height:7%; border-radius:2px 0 0 2px; }
.device-frame--btn.power{ right:-3px; top:24%; width:3px; height:9%; border-radius:0 2px 2px 0; }

/* Real iOS-style status bar (time + signal/wifi/battery), color-adapted per
   screen — rendered by each widget's own JS into its screen markup. */
.device-frame--status-bar{
  position:absolute; top:24px; left:18px; right:18px; z-index:2;
  display:flex; align-items:center; justify-content:space-between;
  font-family:var(--body); font-size:10px; font-weight:600; letter-spacing:0.01em;
}
.device-frame--status-bar.onlight{ color:#12151C; }
.device-frame--status-bar.ondark{ color:#fff; }
.device-frame--status-icons{ display:flex; align-items:center; gap:3px; }
.device-frame--status-icons svg{ display:block; }
.device-frame--battery{
  width:17px; height:9px; border:1.2px solid currentColor; border-radius:2.5px;
  padding:1.5px; position:relative; opacity:0.95;
}
.device-frame--battery::after{
  content:""; position:absolute; right:-3px; top:2.5px;
  width:1.5px; height:3px; background:currentColor; border-radius:0 1px 1px 0;
}
.device-frame--battery-fill{ height:100%; width:78%; background:currentColor; border-radius:1px; }

/* ---------- GridBook: scripted day schedule ---------- */
.gb-widget{ display:flex; flex-direction:column; gap:6px; }
.gb-date{
  font-family:var(--mono); font-size:10px; letter-spacing:0.08em; text-transform:uppercase;
  color:var(--text-faint); margin-bottom:4px;
}
.gb-row{
  display:flex; align-items:center; gap:10px;
  padding:7px 9px; border-radius:9px; border:1px solid transparent;
  transition:background .3s ease, border-color .3s ease;
}
.gb-row-open{ border:1px dashed var(--border-strong); cursor:pointer; }
.gb-row-open:hover{ border-color:var(--gridbook-sage); background:color-mix(in srgb, var(--gridbook-sage) 6%, transparent); }
.gb-row-booked{ background:color-mix(in srgb, var(--gridbook-sage) 10%, transparent); }
.gb-row-time{
  font-family:var(--mono); font-size:10px; color:var(--text-faint); width:42px; flex-shrink:0;
}
.gb-row-label{ font-size:12.5px; color:var(--text-dim); flex:1; }
.gb-row-booked .gb-row-label{ color:var(--text); font-weight:600; }
.gb-row-avatar{
  width:20px; height:20px; border-radius:50%; flex-shrink:0;
  background:var(--gridbook-sage); color:#fff;
  font-family:var(--mono); font-size:8px; font-weight:600;
  display:flex; align-items:center; justify-content:center;
}
.gb-row-check{ width:14px; height:14px; color:var(--gridbook-sage); flex-shrink:0; }
.gb-pill{
  position:absolute; right:14px; top:50%; transform:translateY(-50%) translateX(8px);
  display:inline-flex; align-items:center; gap:5px;
  background:var(--ink); color:#fff; font-size:10.5px; font-weight:600;
  padding:5px 10px; border-radius:100px;
  opacity:0; transform:translateX(8px);
  transition:opacity .25s ease, transform .25s ease;
  pointer-events:none;
}
.gb-pill.is-visible{ opacity:1; transform:translateY(-50%) translateX(0); }
.gb-pill svg{ width:11px; height:11px; }
.gb-caption{
  margin-top:6px; font-size:11.5px; color:var(--gridbook-sage); font-weight:600;
  opacity:0; transition:opacity .3s ease; min-height:1.4em;
}
.gb-caption.is-visible{ opacity:1; }

/* ---------- RollSwipe: real session-screen recreation
   (rollswipe/src/features/swipe-session/swipe-session-screen.tsx, shared/tokens/colors.ts) ---------- */
.rss-screen{ background:#FAFAF7; height:100%; display:flex; flex-direction:column; padding:44px 8px 8px; font-family:var(--body); }
.rss-header{ display:flex; justify-content:space-between; align-items:center; margin-bottom:6px; flex-shrink:0; }
.rss-title{ font-family:var(--display); font-weight:700; font-size:12.5px; color:#17171A; }
.rss-finish{ font-size:9.5px; font-weight:600; color:#0B8259; }
.rss-actions{ display:flex; justify-content:space-between; gap:6px; padding-top:8px; border-top:1px solid #E7E5E1; flex-shrink:0; }
.rss-actions span{ font-size:8px; font-weight:600; white-space:nowrap; }
.rss-actions .dim{ color:#97959E; }
.rss-actions .delete{ color:#E14F4F; }
.rss-actions .keep{ color:#1C8F63; }

.rs-widget{ display:flex; align-items:center; justify-content:center; flex:1; min-height:0; }
.rs-stack{ position:relative; width:100%; height:100%; touch-action:none; }
.rs-card{
  position:absolute; inset:0; border-radius:16px; overflow:hidden;
  border:3px solid transparent;
  box-shadow:0 8px 20px rgba(15,23,42,0.1);
  transition:transform .2s ease-out, opacity .2s ease-out, border-color .2s ease-out;
  cursor:grab;
}
.rs-card:active{ cursor:grabbing; }
.rs-card-photo{ position:absolute; inset:0; }
.rs-tint{
  position:absolute; inset:0; border-radius:13px; opacity:0;
  transition:opacity .2s ease-out;
}
.rs-tint-keep{ background:linear-gradient(135deg, transparent 40%, color-mix(in srgb, var(--rollswipe-keep) 55%, transparent)); }
.rs-tint-delete{ background:linear-gradient(225deg, transparent 40%, color-mix(in srgb, var(--rollswipe-delete) 55%, transparent)); }
.rs-pill{
  position:absolute; top:12px; right:12px; font-family:var(--mono); font-weight:700; font-size:11px;
  letter-spacing:0.08em; padding:5px 12px; border-radius:100px; color:#fff;
  box-shadow:0 4px 10px rgba(15,23,42,0.18);
  opacity:0; transition:opacity .2s ease-out, background-color .1s ease-out;
}
.rs-pill.keep{ background:var(--rollswipe-keep); }
.rs-pill.delete{ background:var(--rollswipe-delete); }

/* ---------- Atlas Tempo: real Schedule-screen recreation
   (RollReady/mobile/app/(tabs)/schedule.tsx, RollReady/mobile/src/theme/colors.ts) ---------- */
.sched-screen{ background:#08090B; height:100%; padding:44px 10px 10px; font-family:var(--body); color:#F1F2F4; }
.sched-header{ display:flex; align-items:center; justify-content:space-between; margin-bottom:9px; }
.sched-title{ font-family:var(--display); font-weight:700; font-size:14px; }
.sched-icons{ display:flex; gap:5px; }
.sched-icon{ width:20px; height:20px; border-radius:7px; background:#181A20; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.sched-icon svg{ width:10px; height:10px; }
.sched-switcher{ display:flex; background:#181A20; border-radius:9px; padding:2px; margin-bottom:9px; }
.sched-tab{ flex:1; text-align:center; font-size:8px; font-family:var(--mono); letter-spacing:0.02em; padding:4px 0; border-radius:7px; color:#656971; }
.sched-tab.active{ background:#13151A; color:#F1F2F4; }
.sched-week{ display:flex; justify-content:space-between; margin-bottom:10px; }
.sched-day{ text-align:center; font-size:8px; cursor:pointer; padding:2px 1px; border-radius:8px; }
.sched-day .dow{ color:#656971; margin-bottom:4px; }
.sched-day .num{ width:18px; height:18px; line-height:18px; border-radius:50%; margin:0 auto; font-weight:600; transition:background .2s ease, color .2s ease; }
.sched-day.active .num{ background:#C8F135; color:#08090B; }
.sched-day.today:not(.active) .num{ border:1px solid #C8F135; color:#C8F135; }
.sched-rows{ overflow-y:auto; }
.sched-row{ display:flex; align-items:stretch; gap:7px; margin-bottom:6px; }
.sched-time{ font-family:var(--mono); font-size:8px; color:#656971; width:28px; padding-top:7px; flex-shrink:0; }
.sched-event{ flex:1; display:flex; align-items:center; gap:6px; background:#181A20; border-radius:8px; padding:7px 9px; min-width:0; }
.sched-event .bar{ width:3px; align-self:stretch; border-radius:2px; flex-shrink:0; }
.sched-event .title{ font-size:10px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
