/* Card & RSVP workspace (pages/rsvp/*): Card Studio layout and the phone preview.
   The invitation itself is styled by card.css. */
.cs-grid { display: grid; grid-template-columns: minmax(0, 1fr) 410px; gap: 16px; align-items: start; }
.cs-edit { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.cs-edit .nav-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.cs-edit .nav-link { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.cs-rows { display: flex; flex-direction: column; gap: 8px; }
.cs-row { display: flex; align-items: center; gap: 6px; }
.cs-row .form-control { min-width: 0; }
.cs-row .sp-more:disabled { opacity: .35; }
.cs-themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.cs-theme { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 10px; border: 1.5px solid var(--sp-border); border-radius: var(--sp-radius-md); background: var(--sp-surface); color: var(--sp-text); text-align: left; transition: border-color .15s, box-shadow .15s; }
.cs-theme:hover { border-color: var(--sp-border-strong); }
.cs-theme.is-on { border-color: var(--sp-primary); box-shadow: 0 0 0 3px var(--sp-primary-ring); }
.cs-theme b { font-size: var(--sp-fs-sm); font-weight: 600; }
.cs-sw { display: flex; gap: 4px; width: 100%; height: 44px; padding: 8px; border-radius: var(--sp-radius-sm); }
.cs-sw i { flex: 1; border-radius: 6px; }
.cs-theme small { font-size: var(--sp-fs-xs); line-height: 1.35; color: var(--sp-muted); }
.cs-event { display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 10px; border: 1.5px dashed var(--sp-border-strong); border-radius: var(--sp-radius-md); color: var(--sp-text); text-decoration: none; transition: border-color .15s, background-color .15s; }
.cs-event:hover { border-color: var(--sp-primary); background: var(--sp-surface); }
.cs-event .cs-sw { width: 120px; flex-shrink: 0; }
.cs-event b { display: block; font-size: var(--sp-fs-sm); }
.cs-event small { font-size: var(--sp-fs-xs); color: var(--sp-muted); }
.cs-event iconify-icon { margin-left: auto; font-size: 18px; color: var(--sp-muted); }
.cs-frame { display: block; width: 100%; height: 100%; border: 0; background: #1a1a1f; }
.cs-link { display: block; padding: 8px 10px; border-radius: var(--sp-radius-sm); background: var(--sp-surface-2); font-size: var(--sp-fs-xs); word-break: break-all; }
.cs-state { display: inline-flex; align-items: center; gap: 6px; font-size: var(--sp-fs-xs); color: var(--sp-muted); }
.cs-state i { width: 8px; height: 8px; border-radius: 50%; background: var(--sp-success); transition: background-color .2s; }
.cs-state.is-dirty i { background: var(--sp-warning); }
.cs-state.is-dirty { color: var(--sp-text); }

.cs-preview { position: sticky; top: calc(var(--sp-topbar-h) + 12px); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.cs-preview-bar { display: flex; align-items: center; justify-content: space-between; width: 375px; max-width: 100%; }
.cs-live { display: inline-flex; align-items: center; gap: 6px; font-size: var(--sp-fs-xs); font-weight: 600; color: var(--sp-text-2); }
.cs-live i { width: 8px; height: 8px; border-radius: 50%; background: var(--sp-danger); box-shadow: 0 0 0 0 color-mix(in srgb, var(--sp-danger) 50%, transparent); animation: cs-pulse 1.8s ease-out infinite; }
@keyframes cs-pulse { 70% { box-shadow: 0 0 0 7px transparent; } }
.cs-phone { position: relative; width: 375px; max-width: 100%; height: min(760px, calc(100vh - var(--sp-topbar-h) - 150px)); min-height: 560px; padding: 12px; border-radius: 46px; background: #111216; box-shadow: 0 0 0 2px #2b2d33, var(--sp-shadow-lg); }
.cs-screen { position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: 36px; background: #fdf8f4; }
.cs-notch { position: absolute; top: 18px; left: 50%; z-index: 20; width: 110px; height: 26px; transform: translateX(-50%); border-radius: 20px; background: #111216; pointer-events: none; }
.cs-replies { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: 375px; max-width: 100%; }
.cs-rep { padding: 10px; border: 1px solid var(--sp-border); border-radius: var(--sp-radius-md); background: var(--sp-surface); text-align: center; }
.cs-rep b { display: block; font-size: var(--sp-fs-lg); font-variant-numeric: tabular-nums; }
.cs-rep span { font-size: var(--sp-fs-2xs); color: var(--sp-muted); }
.cs-rep-link { grid-column: 1 / -1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: var(--sp-fs-xs); font-weight: 600; text-decoration: none; }
@media (max-width: 1199.98px) { .cs-grid { grid-template-columns: minmax(0, 1fr); } .cs-preview { position: static; } }
@media (prefers-reduced-motion: reduce) { .cs-live i { animation: none; } }
