/* ── Page heading (shared across all pages) ── */
.page-heading {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
  margin-top: 0;
}

.page-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.page-header-row .page-heading {
  margin-bottom: 0;
}

.page-subheading {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}

.page-header {
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Stat card container */
.stat-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Stat card header row */
.stat-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

/* Stat card title label */
.stat-card-label {
  font-size: 17px;
  font-weight: 600;
  margin: 0;
  line-height: 1.3;
  color: #111827;
}

/* Stat card large number */
.stat-card-value {
  font-size: 32px;
  font-weight: 700;
  margin: 0;
  line-height: 1;
  color: #111827;
  margin-top: -15px;
}

/* Stat card subtitle */
.stat-card-subtitle {
  font-size: 13px;
  margin: 0;
  color: #6b7280;
}

/* Teal rounded-square icon box, shared by stat cards and action cards */
.stat-icon-box,
.action-icon {
  width: 45px;
  height: 45px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #e0f2f1;
}

/* Numbered circle badge (setup steps) */
.step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  background: #f3f4f6;
  color: #6b7280;
  border: 1px solid #e5e7eb;
}

/* Connected account avatar (dashboard, connected state) */
.connected-account-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  padding: 2px;
  background: linear-gradient(135deg, #f58529, #dd2a7b, #8134af, #515bd4);
  background-clip: content-box, border-box;
  box-sizing: border-box;
  border: 2px solid transparent;
}

.connected-account-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e0f2f1;
  color: #0f766e;
}

.connected-account-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.connected-account-verified {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0f766e;
  color: #ffffff;
  border: 2px solid #ffffff;
}

/* ── OnboardingWizard ── */
.onboarding-card {
  background: white;
  border-radius: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  overflow: hidden;
  font-family: "Inter", sans-serif;
}

.onboarding-progress {
  padding: 20px 20px 1px;
}

.onboarding-progress-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0;
}

.onboarding-progress-step {
  display: flex;
  align-items: center;
}

.onboarding-progress-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #e5e7eb;
  color: #6b7280;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
}

.onboarding-progress-circle.active {
  background-color: #000000;
  color: white;
}

.onboarding-progress-line {
  width: 60px;
  height: 2px;
  background-color: #e5e7eb;
  transition: all 0.3s ease;
}

.onboarding-progress-line.active {
  background-color: #000000;
}

.onboarding-header {
  background: #000000;
  padding: 25px;
  text-align: center;
  color: white;
}

.onboarding-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
}

.onboarding-subtitle {
  color: #ffffff;
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}

.onboarding-content {
  padding: 1.5rem;
  overflow-y: auto;
}

.onboarding-nav {
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  padding: 20px;
  border-top: 1px solid #e5e7eb;
}

.onboarding-nav.has-previous {
  justify-content: space-between;
}

.welcome-features {
  display: grid;
  gap: 24px;
  margin: 8px 0 8px;
}

.feature-item h3 {
  color: #1f2937;
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 600;
}

.feature-item p {
  color: #6b7280;
  line-height: 1.6;
  margin: 0;
  font-size: 13px;
}

.error-box {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 13px;
  color: #dc2626;
  margin-top: 4px;
}

/* ── Manage Posts ── */
.posts-toolbar {
  margin: 20px 0 16px;
  padding: 16px 18px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
}

.posts-toolbar s-select {
  display: block;
  width: 100%;
}

.posts-toolbar s-grid-item {
  display: block;
  width: 100%;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

@media (max-width: 900px) {
  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .posts-grid {
    grid-template-columns: 1fr;
  }
}

.post-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #ececef;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.15s ease;
}

.post-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(16, 24, 40, 0.1);
}

.post-card-hidden {
  opacity: 0.55;
}

.post-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #f3f4f6;
  overflow: hidden;
}

.post-thumb img,
.post-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.post-card:hover .post-thumb img,
.post-card:hover .post-thumb video {
  transform: scale(1.04);
}

.post-thumb-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-thumb-gradient {
  position: absolute;
  inset: auto 0 0 0;
  height: 55%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0));
  pointer-events: none;
}

.post-thumb-caption {
  position: absolute;
  inset: auto 10px 10px 10px;
  margin: 0;
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}

/* Manage Posts thumbnail slideshow for an unlocked carousel post — same
   track/slide/nav/dot pattern as the feed preview and storefront carousels,
   sized to this page's square `.post-thumb` instead of a 4/5 tile. */
.post-thumb-carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.3s ease;
}

.post-thumb-carousel-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
}

.post-thumb-carousel-slide img,
.post-thumb-carousel-slide video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-thumb-carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.85);
  color: #111827;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.post-thumb-carousel-nav:hover {
  background: #ffffff;
}

.post-thumb-carousel-nav-prev {
  left: 8px;
}

.post-thumb-carousel-nav-next {
  right: 8px;
}

/* `.post-card:hover .post-thumb img/video` zooms the single-cover thumb on
   hover — each carousel slide sits side by side in the track with no
   per-slide clipping, so zooming one bleeds it into its neighbor (same fix
   as the storefront grid tile). */
.post-card:hover .post-thumb-carousel-slide img,
.post-card:hover .post-thumb-carousel-slide video {
  transform: none;
}

.post-carousel-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  z-index: 3;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-card-overlay-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 6px;
  z-index: 3;
}

/* Informational, not actionable — distinct tone from .post-icon-btn's hide/show
   button so it doesn't read as another clickable action. Compound selector so
   this wins over the plain .post-icon-btn background/color declared below it. */
.post-icon-btn.post-icon-btn-type,
.post-icon-btn.post-icon-btn-type:hover {
  cursor: default;
  background: rgba(0, 0, 0, 0.6);
  color: #ffffff;
  transform: none;
}

.post-icon-btn {
  color: #000000;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(16, 24, 40, 0.15);
  transition: transform 0.15s ease, background 0.15s ease;
}

.post-icon-btn:hover {
  transform: scale(1.08);
  background: #ffffff;
}

.post-icon-btn:disabled,
.post-icon-btn[disabled] {
  opacity: 0.6;
  cursor: wait;
}

.post-status-pill {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  color: #16a34a;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(16, 24, 40, 0.12);
}

.post-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #16a34a;
}

.post-status-pill-hidden {
  color: #6b7280;
}

.post-status-pill-hidden .post-status-dot {
  background: #9ca3af;
}

.post-card-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  gap: 8px;
  padding: 16px;
}

.post-caption {
  font-size: 13px;
  font-weight: 500;
  margin: 0 0 4px;
  color: #111827;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.4;
  height: 18px;
  flex-shrink: 0;
}

.post-date {
  font-size: 11px;
  margin: 0;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.post-tags-area {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.post-tag-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.post-tag-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.post-tag-section-title {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  font-size: 11.5px;
  font-weight: 700;
  color: #1f2937;
}

.post-tag-section-title span:first-of-type {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post-tag-section-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #6b7280;
  font-size: 9.5px;
  font-weight: 700;
  flex-shrink: 0;
}

.post-tag-section-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.post-tag-nav-btn,
.post-tag-add-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  transition: background 0.12s ease;
}

.post-tag-nav-btn:hover,
.post-tag-add-btn:hover {
  background: #f3f4f6;
}

.post-tag-add-btn {
  color: #2563eb;
}

.post-tag-add-btn:disabled {
  opacity: 0.5;
  cursor: wait;
}

.post-tag-scroll {
  display: flex;
  align-items: stretch;
  gap: 6px;
  height: 36px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.post-tag-scroll-collection {
  height: 32px;
}

.post-tag-scroll::-webkit-scrollbar {
  display: none;
}

.post-tag-scroll-empty {
  height: auto;
  align-items: center;
}

.post-tag-row-empty {
  font-size: 11.5px;
  color: #9ca3af;
  font-style: italic;
  white-space: nowrap;
}

.post-tag-item {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
  border-radius: 10px;
  padding: 5px 10px 5px 5px;
  max-width: 180px;
}

.post-tag-item-product {
  border: 1px solid #e5e7eb;
  background: #ffffff;
}

.post-tag-item-collection {
  background: #f3f4f6;
  padding: 0 12px;
}

.post-tag-item-thumb {
  width: 25px;
  height: 25px;
  border-radius: 7px;
  object-fit: cover;
  flex-shrink: 0;
  background: #f3f4f6;
}

.post-tag-item-thumb-fallback {
  background: #f3f4f6;
}

.post-tag-item-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.post-tag-item-product-title {
  font-size: 11px;
  font-weight: 600;
  color: #1f2937;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post-tag-item-product-subtitle {
  font-size: 10px;
  color: #9ca3af;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post-tag-item-collection-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.post-tag-item-collection-title {
  font-size: 11px;
  font-weight: 600;
  color: #1f2937;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.posts-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 25px 0px 0px 0px;
}

.analytics-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 10px 0px 15px;
}

.posts-pagination-number {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: none;
  border-radius: 8px;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.posts-pagination-number:hover {
  background: #f3f4f6;
}

.posts-pagination-number-active,
.posts-pagination-number-active:hover {
  background: #111827;
  color: #ffffff;
}

.posts-pagination-ellipsis {
  min-width: 24px;
  text-align: center;
  color: #9ca3af;
  font-size: 13px;
}

.posts-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 48px 20px;
  text-align: center;
  border: 1px dashed #e5e7eb;
  border-radius: 14px;
}

/* ── Feeds list ── */
.feeds-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 1100px) {
  .feeds-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .feeds-grid {
    grid-template-columns: 1fr;
  }
}

.feed-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #ececef;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.feed-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(16, 24, 40, 0.1);
}

.feed-card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 18px 16px;
}

.feed-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #e0f2f1;
  color: #0f766e;
}

.feed-card-title {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  flex: 1 1 auto;
}

.feed-card-name {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #111827;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feed-card-layout {
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
}

.feed-card-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  border-top: 1px solid #f3f4f6;
}

/* s-button is a custom element whose own `display` comes from its shadow
   DOM, so it's undefined (browser default: inline) until Polaris' web
   component script loads and upgrades it. Without this, the footer lays
   out as plain inline content on first paint (edit/delete sitting right
   next to "Add to theme" on the left), then jumps once the real flex
   sizing (the theme button growing via flex: 1 1 auto) kicks in after
   upgrade. Setting it upfront makes first paint match the upgraded layout. */
.feed-card-footer s-button {
  display: inline-flex;
}

.feed-card-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  padding: 14px 18px;
  border-top: 1px solid #f3f4f6;
}

.feed-stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.feed-stat-label {
  font-size: 11px;
  font-weight: 500;
  color: #9ca3af;
  text-transform: capitalize;
}

.feed-stat-value {
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feed-card-theme-btn {
  display: block;
  flex: 1 1 auto;
}

/* ── Page spacing (feeds pages) ── */
.page-intro {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}

.feed-form-banner {
  margin-bottom: 20px;
}

.feed-form-banner-spaced {
  margin-top: 16px;
}

s-page s-section {
  display: block;
  margin-bottom: 16px;
}

/* ── Feed form ── */
.feed-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

.layout-style-picker {
  display: flex;
  gap: 12px;
  margin: 10px 0 20px;
}

.layout-style-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 50%;
  padding: 12px 14px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  background: #fafafa;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.layout-style-card:hover {
  border-color: #c7c9cc;
}

.layout-style-card-selected {
  border-color: #111827;
  background: #ffffff;
}

.layout-style-card-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.layout-style-card-label {
  font-size: 13px;
  font-weight: 600;
}

.layout-style-card-description {
  font-size: 12px;
  color: #6b7280;
}

.layout-preview-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
}

.layout-preview-icon-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 3px;
  padding: 6px;
}

.layout-preview-icon-grid .layout-preview-tile {
  border-radius: 2px;
}

.layout-preview-icon-slider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 8px 6px;
}

.layout-preview-icon-slider .layout-preview-tile {
  width: 5px;
  height: 100%;
  border-radius: 2px;
}

.layout-preview-icon-slider .layout-preview-tile:nth-child(2) {
  background: #9ca3af;
}

.layout-preview-tile {
  background: #d1d5db;
}

/* ── Feed editor layout (preview + form) ── */
.feed-preview-panel {
  position: sticky;
  top: 16px;
}

.feed-preview-card {
  border-radius: 16px;
  background: #f1f2f3;
  padding: 16px;
  box-sizing: border-box;
  overflow: hidden;
}

.feed-preview-toolbar {
  display: flex;
  justify-content: flex-start;
}

.feed-preview-divider {
  height: 1px;
  background: #e2e4e7;
  margin: 14px 0;
}

.feed-preview-body {
  background: #ffffff;
  border-radius: 12px;
  padding: 14px;
  min-height: 160px;
  box-sizing: border-box;
}

.feed-preview-body-web {
  width: 100%;
}

.feed-preview-phone {
  position: relative;
  width: 350px;
  max-width: 100%;
  margin: 0 auto;
  padding: 22px 12px 16px;
  background: #ffffff;
  border: 10px solid #c7cacf;
  border-radius: 36px;
  box-sizing: border-box;
}

.feed-preview-phone-notch {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 56px;
  height: 5px;
  border-radius: 999px;
  background: #c7cacf;
}

.feed-preview-phone-screen {
  background: #ffffff;
  height: 580px;
  overflow-y: auto;
  margin-top: 15px;
}

.feed-preview-body-mobile {
  padding: 0;
}

.feed-preview-grid {
  display: grid;
}

.feed-preview-slider {
  display: flex;
  overflow: hidden;
  flex: 1 1 auto;
  min-width: 0;
}

.feed-preview-slider .feed-preview-tile {
  flex-shrink: 0;
  min-width: 0;
}

.feed-preview-carousel {
  position: relative;
  display: flex;
  align-items: stretch;
}

.feed-preview-carousel-viewport {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}

.feed-preview-carousel-track {
  display: flex;
  align-items: flex-start;
}

.feed-preview-carousel-track-exit-next,
.feed-preview-carousel-track-enter-next,
.feed-preview-carousel-track-exit-prev,
.feed-preview-carousel-track-enter-prev {
  position: absolute;
  inset: 0;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
  animation-fill-mode: forwards;
  will-change: transform;
  backface-visibility: hidden;
}

/* Next: current exits to the left, incoming enters from the right. */
.feed-preview-carousel-track-exit-next {
  animation-name: feed-preview-slide-out-left;
}

.feed-preview-carousel-track-enter-next {
  animation-name: feed-preview-slide-in-right;
}

/* Previous: current exits to the right, incoming enters from the left. */
.feed-preview-carousel-track-exit-prev {
  animation-name: feed-preview-slide-out-right;
}

.feed-preview-carousel-track-enter-prev {
  animation-name: feed-preview-slide-in-left;
}

@keyframes feed-preview-slide-out-left {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-100%);
  }
}

@keyframes feed-preview-slide-in-right {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes feed-preview-slide-out-right {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(100%);
  }
}

@keyframes feed-preview-slide-in-left {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

.feed-preview-carousel-track .feed-preview-tile {
  flex-shrink: 0;
  min-width: 0;
}

.feed-preview-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: #ffffff;
  color: #111827;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(17, 24, 39, 0.2);
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  transform: translateY(-50%);
}

.feed-preview-arrow:hover {
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(17, 24, 39, 0.3);
  transform: translateY(-50%) scale(1.08);
}

.feed-preview-arrow:active {
  transform: translateY(-50%) scale(0.96);
}

.feed-preview-arrow:disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

.feed-preview-arrow svg {
  display: block;
}

.feed-preview-arrow-left {
  left: 8px;
}

.feed-preview-arrow-right {
  right: 8px;
}

.feed-preview-marquee {
  overflow: hidden;
}

.feed-preview-marquee-track {
  animation: feed-preview-marquee-scroll 18s linear infinite;
}

@keyframes feed-preview-marquee-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.feed-preview-tile {
  aspect-ratio: 4 / 5;
  width: 100%;
  display: block;
  cursor: pointer;
}

.feed-preview-tile-image {
  object-fit: cover;
}

/* Hides the big center play-button overlay Safari/Chrome draw on a <video>
   before playback starts, even with no `controls` attribute — this preview
   never shows native video chrome, including in "no autoplay" mode. */
video.feed-preview-tile-image::-webkit-media-controls-start-playback-button,
video.feed-preview-tile-image::-webkit-media-controls-overlay-play-button {
  display: none !important;
  -webkit-appearance: none;
}

.feed-preview-video-wrap {
  position: relative;
  overflow: hidden;
}

.feed-preview-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.feed-preview-play-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  /* Base centering — the keyframes repeat this same translate so the element
     stays centered throughout the animation; without `forwards`, this base
     rule is also what the element falls back to once the animation ends. */
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  color: #ffffff;
  filter: drop-shadow(0 1px 3px rgba(17, 24, 39, 0.5));
  animation: feed-preview-play-hint-pop 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation-fill-mode: forwards;
}

@keyframes feed-preview-play-hint-pop {
  from {
    transform: translate(-50%, -50%) scale(0.6);
    opacity: 0;
  }
  to {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}

.feed-preview-tile-0,
.feed-preview-tile-1,
.feed-preview-tile-2,
.feed-preview-tile-3 {
  background: linear-gradient(145deg, #eef0f2, #dfe2e6);
}

/* Tagged product/collection overlay on a grid tile — mirrors the storefront's
   own black-overlay chip (instareel-feed__info) so the admin preview matches
   live: one item at a time, sliding on change, no card chrome of its own. */
.feed-preview-tile-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 14px 6px 6px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.72) 65%, rgba(0, 0, 0, 0.72) 100%);
}

.feed-preview-tile-info-stage {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}

.feed-preview-tile-info-track {
  display: flex;
  transition: transform 0.32s ease;
}

/* A flex item's default min-width is "auto" (its content's natural size),
   which overrides the explicit percentage width set inline — without this,
   a long nowrap title forces the item wider than its slot and throws off
   every slide's transform math. */
.feed-preview-tile-info-item {
  min-width: 0;
  flex: 0 0 auto;
}

.feed-preview-tile-product {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-width: 0;
}

.feed-preview-tile-product.is-clickable {
  cursor: pointer;
}

/* Smaller than the minimal-popup chip's own thumb — this sits inside a
   compact grid tile, not a full-size popup. */
.feed-preview-tile-product .feed-preview-minimal-card-thumb {
  width: 26px;
  height: 26px;
  border-radius: 6px;
}

.feed-preview-tile-product .feed-preview-minimal-card-thumb--empty svg {
  width: 12px;
  height: 12px;
}

.feed-preview-tile-product-text {
  min-width: 0;
  flex: 1 1 auto;
}

.feed-preview-tile-product-title {
  margin: 0;
  font-size: 11.5px;
  font-weight: 700;
  color: #ffffff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feed-preview-tile-product-price {
  margin: 1px 0 0;
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.78);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.feed-preview-tile-nav {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 22px;
  padding: 0;
  border: none;
  background: none;
  color: #ffffff;
  cursor: pointer;
  opacity: 0.85;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

.feed-preview-tile-nav:hover {
  opacity: 1;
}

.feed-preview-tile-nav svg {
  width: 12px;
  height: 12px;
}

.feed-preview-empty {
  margin: 0;
  padding: 24px 8px;
  text-align: center;
  font-size: 13px;
  color: #9ca3af;
}

@media (max-width: 900px) {
  .feed-editor-grid {
    grid-template-columns: 1fr !important;
  }

  .feed-preview-panel {
    position: static;
    width: 100%;
  }
}

/* ── Post picker (resource-picker style modal) ── */
.feed-source-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.feed-source-select {
  flex: 1 1 auto;
  min-width: 0;
}

.feed-source-picker {
  flex: 0 0 auto;
}

.post-picker-list {
  display: flex;
  flex-direction: column;
  max-height: 420px;
  overflow-y: auto;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
}

.post-picker-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid #f1f2f3;
  cursor: pointer;
}

.post-picker-row:last-child {
  border-bottom: none;
}

.post-picker-row:hover {
  background: #fafafa;
}

.post-picker-thumb {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  overflow: hidden;
  background: #f1f2f3;
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-picker-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-picker-caption {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  color: #374151;
}

/* ── Feed preview: detailed post popup ── */
.feed-preview-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(17, 24, 39, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: 24px;
}

.feed-preview-popup-modal {
  position: relative;
  display: flex;
  width: 100%;
  max-width: 1160px;
  height: 90vh;
  max-height: 940px;
  background: #ffffff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(17, 24, 39, 0.35);
}

.feed-preview-popup-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.55);
  color: #ffffff;
  cursor: pointer;
}

.feed-preview-popup-close:hover {
  background: rgba(17, 24, 39, 0.8);
}

.feed-preview-popup-media {
  position: relative;
  flex: 0 0 54%;
  width: 54%;
  height: 100%;
  min-width: 0;
  background: #0b0b0c;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Without this, the mute toggle (position: absolute) had no positioned
   ancestor to anchor to — it fell back to the modal itself, landing right on
   its rounded top-left corner and getting clipped by the modal's own
   overflow: hidden. The close button sits over the whole modal (its own
   right:12 is relative to the full media+side width), not this media pane,
   so this is pinned to the media pane's own corner instead — at that larger
   offset it just left a big gap between the icon and the video's real edge. */
.feed-preview-popup-media .feed-preview-minimal-sound-toggle {
  top: 12px;
  left: auto;
  right: 12px;
  width: 32px;
  height: 32px;
}

.feed-preview-popup-media-el {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #0b0b0c;
}

.feed-preview-popup-side {
  flex: 1 1 auto;
  min-width: 320px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Per-post carousel slider shared by both popups' media panes (see
   PostCarouselMedia) — mirrors the storefront's own carousel CSS in
   frontend/extensions/instareel-feed/assets/instareel-feed.css. */
.feed-preview-popup-carousel {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.feed-preview-popup-carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.3s ease;
}

.feed-preview-popup-carousel-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
}

/* Grid/slider tile's slideshow uses `.feed-preview-tile-image`, which has no
   intrinsic sizing of its own (the popups' media-el classes size themselves
   via their own layout) — set it explicitly here so each slide fills its
   track cell instead of collapsing to the image's natural size. */
.feed-preview-popup-carousel-slide > .feed-preview-tile-image {
  display: block;
  width: 100%;
  height: 100%;
}

/* Same slideshow, sized down for a grid/slider tile instead of a popup's
   full media pane. */
.feed-preview-video-wrap .feed-preview-popup-carousel-nav {
  width: 24px;
  height: 24px;
}

.feed-preview-video-wrap .feed-preview-popup-carousel-nav-prev {
  left: 6px;
}

.feed-preview-video-wrap .feed-preview-popup-carousel-nav-next {
  right: 6px;
}

.feed-preview-popup-carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.85);
  color: #111827;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.feed-preview-popup-carousel-nav:hover {
  background: #ffffff;
}

.feed-preview-popup-carousel-nav-prev {
  left: 12px;
}

.feed-preview-popup-carousel-nav-next {
  right: 12px;
}

.feed-preview-popup-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 20px;
  border-bottom: 1px solid #eef0f2;
  flex: 0 0 auto;
}

.feed-preview-popup-avatar {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  object-fit: cover;
  flex: 0 0 auto;
  background: #e5e7eb;
}

.feed-preview-popup-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, #f58529, #dd2a7b, #8134af, #515bd4);
}

.feed-preview-popup-header-text {
  flex: 1 1 auto;
  min-width: 0;
}

.feed-preview-popup-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.feed-preview-popup-account {
  font-size: 16px;
  font-weight: 700;
  color: #16181d;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feed-preview-popup-ig-badge {
  display: flex;
  align-items: center;
  color: #9a9ea6;
  flex: 0 0 auto;
}

.feed-preview-popup-ig-badge svg {
  width: 15px;
  height: 15px;
}

.feed-preview-popup-subtitle {
  margin: 3px 0 0;
  font-size: 13.5px;
  color: #8a8f99;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Tabs (when shown) stay put; only the list underneath scrolls. */
.feed-preview-popup-stage {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.feed-preview-popup-tabs {
  display: flex;
  gap: 20px;
  padding: 12px 20px 0;
  border-bottom: 1px solid #eef0f2;
  flex: 0 0 auto;
}

.feed-preview-popup-tab {
  position: relative;
  padding: 0 0 12px;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #8a8f99;
  cursor: pointer;
}

.feed-preview-popup-tab.is-active {
  color: #16181d;
}

.feed-preview-popup-tab.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: #16181d;
}

.feed-preview-popup-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: 2px;
  border-radius: 999px;
  background: #f1f2f3;
  color: #5b5f68;
  font-size: 10.5px;
  font-weight: 600;
}

.feed-preview-popup-tab.is-active .feed-preview-popup-tab-count {
  background: #eceef1;
  color: #16181d;
}

.feed-preview-popup-stage-list {
  flex: 1 1 auto;
  min-height: 0;
  padding-top: 8px;
  overflow-y: auto;
  /* Thin, light-gray scrollbar instead of the browser's bulky default. */
  scrollbar-width: thin;
  scrollbar-color: #d4d4d8 transparent;
}

.feed-preview-popup-stage-list::-webkit-scrollbar {
  width: 6px;
}

.feed-preview-popup-stage-list::-webkit-scrollbar-track {
  background: transparent;
}

.feed-preview-popup-stage-list::-webkit-scrollbar-thumb {
  background: #d4d4d8;
  border-radius: 999px;
}

.feed-preview-popup-stage-list::-webkit-scrollbar-thumb:hover {
  background: #b8b8bf;
}

.feed-preview-popup-products {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 2px 16px 16px;
}

/* ── Product row: image + body in a flat divided list — the image and title
   are both real links to the product/collection page. Compact by design —
   this list can run to several rows, so every row keeps its height tight. ── */
.feed-preview-popup-product {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid #f0f1f3;
}

/* A collection row has no variant picker/cart row below the title, so its
   body is shorter than the thumbnail — center it against the image instead
   of pinning it to the top. */
.feed-preview-popup-product--collection {
  align-items: center;
}

.feed-preview-popup-products .feed-preview-popup-product:last-child {
  border-bottom: none;
}

.feed-preview-popup-product-link {
  display: block;
  flex: 0 0 auto;
  border-radius: 10px;
}

.feed-preview-popup-product-thumb {
  display: block;
  width: 80px;
  height: 100px;
  border-radius: 10px;
  object-fit: cover;
  background: #f4f5f6;
}

.feed-preview-popup-product-thumb--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #b4b7bd;
}

.feed-preview-popup-product-thumb--empty svg {
  width: 18px;
  height: 18px;
}

.feed-preview-popup-product-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.feed-preview-popup-product-title-link {
  display: block;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.feed-preview-popup-product-title-link[aria-disabled="true"] {
  cursor: default;
}

.feed-preview-popup-view-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 400;
  color: #16181d;
  text-decoration: none;
}

.feed-preview-popup-view-link svg {
  flex: 0 0 auto;
}

.feed-preview-popup-view-link[aria-disabled="true"] {
  color: #b4b7bd;
  cursor: default;
}

.feed-preview-popup-product-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #16181d;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feed-preview-popup-product-price {
  margin: 2px 0 0;
  font-size: 13px;
  font-weight: 400;
  color: #5b5f68;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.feed-preview-popup-variant-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
}

.feed-preview-popup-option-header {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 11px;
  font-weight: 400;
  color: #16181d;
  text-transform: none;
  letter-spacing: normal;
}

.feed-preview-popup-option-sep {
  color: #b4b7bd;
}

.feed-preview-popup-option-value {
  font-weight: 500;
  color: #5b5f68;
  text-transform: none;
  letter-spacing: normal;
}

.feed-preview-popup-option-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 3px;
}

.feed-preview-popup-pill {
  position: relative;
  min-width: 30px;
  height: 28px;
  padding: 0 10px;
  border-radius: 7px;
  border: 1px solid #e2e4e8;
  background: #ffffff;
  color: #16181d;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  overflow: hidden;
}

.feed-preview-popup-pill:hover {
  border-color: #c7cad1;
}

.feed-preview-popup-pill.is-selected {
  background: #16181d;
  border-color: #16181d;
  color: #ffffff;
}

.feed-preview-popup-pill.is-soldout {
  color: #b4b7bd;
  background: #fafafb;
  cursor: not-allowed;
}

.feed-preview-popup-pill.is-soldout::after {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  border-top: 1px solid #d4d4d8;
  transform: rotate(-18deg);
}

.feed-preview-popup-variant-field {
  display: inline-flex;
  flex-direction: column;
  align-self: flex-start;
  gap: 3px;
  margin-top: 6px;
  font-size: 10px;
  font-weight: 600;
  color: #8a8f99;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.feed-preview-popup-variant-select {
  -webkit-appearance: none;
  appearance: none;
  width: auto;
  max-width: 160px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  color: #16181d;
  text-transform: none;
  letter-spacing: normal;
  padding: 7px 28px 7px 10px;
  border: 1px solid #e2e4e8;
  border-radius: 8px;
  background: #fafafb
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M6 9l6 6 6-6' stroke='%235b5f68' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    no-repeat right 10px center;
  cursor: pointer;
}

.feed-preview-popup-product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.feed-preview-popup-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex: 0 0 auto;
  padding: 6px 14px;
  border: 1.5px solid transparent;
  border-radius: 10px;
  font-size: 11.5px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.feed-preview-popup-btn svg {
  flex: 0 0 auto;
  width: 11px;
  height: 11px;
}

.feed-preview-popup-btn:disabled {
  cursor: not-allowed;
}

.feed-preview-popup-btn-add {
  background: transparent;
  color: #16181d;
  border-color: #dcdcdc;
}

.feed-preview-popup-btn-buy {
  background: #ffffff;
  color: #000000;
  border: 1.5px solid #dcdcdc;
}

@media (max-width: 749px) {
  .feed-preview-popup-overlay {
    padding: 0;
    align-items: flex-end;
  }

  .feed-preview-popup-modal {
    flex-direction: column;
    max-width: 100%;
    width: 100%;
    height: 94vh;
    max-height: 94vh;
    border-radius: 18px 18px 0 0;
  }

  .feed-preview-popup-media,
  .feed-preview-popup-side {
    flex: 0 0 auto;
  }

  .feed-preview-popup-media {
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 9 / 16;
    max-height: 56vh;
  }

  .feed-preview-popup-side {
    flex: 1 1 auto;
    width: 100%;
    height: auto;
    min-height: 0;
    min-width: 0;
  }

  .feed-preview-popup-product-actions {
    flex-wrap: wrap;
  }
}

.feed-preview-minimal-modal {
  position: relative;
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  aspect-ratio: 9 / 16;
  border-radius: 18px;
  overflow: hidden;
  background: #0b0b0c;
  box-shadow: 0 24px 64px rgba(17, 24, 39, 0.35);
  display: flex;
  flex-direction: column;
}

.feed-preview-minimal-media {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  background: #0b0b0c;
}

.feed-preview-minimal-media-el {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.feed-preview-minimal-sound-toggle {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.5);
  color: #ffffff;
  cursor: pointer;
  transition: background 0.15s ease;
}

.feed-preview-minimal-sound-toggle:hover {
  background: rgba(17, 24, 39, 0.75);
}

/* One flat black overlay fading up from the media's bottom edge, holding the
   nav arrows + tagged-item slider — not a white card floating on top of it. */
.feed-preview-minimal-stage {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 28px 10px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.72) 65%, rgba(0, 0, 0, 0.72) 100%);
}

.feed-preview-minimal-stage-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
}

.feed-preview-minimal-stage-viewport {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}

.feed-preview-minimal-stage-track {
  display: flex;
  transition: transform 260ms ease;
}

.feed-preview-minimal-stage-item {
  flex: 0 0 100%;
  min-width: 0;
}

/* Bare icon, no pill background — it already sits on the stage's own black
   overlay. */
.feed-preview-minimal-nav {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 28px;
  padding: 0;
  border: none;
  background: none;
  color: #ffffff;
  cursor: pointer;
  opacity: 0.85;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.feed-preview-minimal-nav:hover {
  opacity: 1;
}

.feed-preview-minimal-nav:active {
  transform: scale(0.94);
}

.feed-preview-minimal-nav:disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

.feed-preview-minimal-nav svg {
  display: block;
}

/* Plain content sitting directly on the stage's black overlay — no
   card/border/shadow of its own. */
.feed-preview-minimal-card {
  box-sizing: border-box;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
}

.feed-preview-minimal-card.is-clickable {
  cursor: pointer;
}

.feed-preview-minimal-card-thumb {
  width: 44px;
  height: 44px;
  border-radius: 9px;
  object-fit: cover;
  flex: 0 0 auto;
  background: #ffffff;
}

/* No tagged image — a plain "missing image" glyph in its place. */
.feed-preview-minimal-card-thumb--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9a9ea6;
  background: #eceef0;
}

.feed-preview-minimal-card-body {
  flex: 1 1 auto;
  min-width: 0;
}

.feed-preview-minimal-card-title {
  margin: 0;
  font-size: 14.5px;
  font-weight: 700;
  color: #ffffff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feed-preview-minimal-card-price {
  margin: 2px 0 0;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.78);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Billing page */
.billing-page {
  display: flex;
  flex-direction: column;
  padding: 4px 0 48px;
}

.billing-intro {
  margin-bottom: 36px;
  text-align: center;
}

.billing-intro__heading {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 700;
}

.billing-intro__subtext {
  margin: 0 auto;
  max-width: 480px;
  font-size: 15px;
  line-height: 1.5;
  color: #6b7280;
}

/* Outer white panel housing the plan comparison */
.billing-panel {
  background: #ffffff;
  border: 1px solid #ecedf0;
  border-radius: 20px;
  padding: 28px;
}

/* Cards are a fixed width (matching what a 3-up row would give each card)
   and the row centers however many plans actually exist. */
.billing-plans-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 24px;
}

.billing-plan-card {
  position: relative;
  background: #ffffff;
  border: 1px solid #e9eaed;
  border-radius: 18px;
  padding: 32px 26px 26px;
  width: 290px;
  flex: 0 0 310px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.03);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.billing-plan-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(16, 24, 40, 0.08);
}

.billing-plan-card--featured {
  border-color: #c7cad1;
  box-shadow: 0 8px 20px rgba(16, 24, 40, 0.07);
}

.billing-plan-card--current {
  border-color: #111827;
  box-shadow: 0 0 0 2px #111827;
}

.billing-plan-card--current:hover {
  transform: none;
  box-shadow: 0 0 0 2px #111827;
}

.billing-plan-card__current-badge {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: #111827;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 4px 10px rgba(17, 24, 39, 0.25);
}

.billing-plan-card__current-badge--popular {
  background: #008060;
  box-shadow: 0 4px 10px rgba(0, 128, 96, 0.3);
}

.billing-plan-card__name-pill {
  align-self: flex-start;
  background: #f4f5f7;
  color: #374151;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 6px 14px;
  border-radius: 999px;
}

.billing-plan-card--featured .billing-plan-card__name-pill {
  background: #ecfdf5;
  color: #047857;
}

.billing-plan-card__price-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.billing-plan-card__price {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #0f1115;
}

.billing-plan-card__period {
  font-size: 14px;
  font-weight: 500;
  color: #9ca3af;
}

.billing-plan-card__trial {
  margin: -10px 0 0;
  font-size: 12.5px;
  font-weight: 600;
  color: #008060;
}

.billing-plan-card__divider {
  width: 100%;
  border: none;
  border-top: 1px solid #f0f1f3;
  margin: 2px 0 4px;
}

.billing-plan-card__features {
  margin: 0 0 15px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 13px;
  flex: 1 1 auto;
}

.billing-plan-card__features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  line-height: 1.4;
  color: #374151;
}

.billing-plan-card__features li.billing-plan-card__features--muted {
  color: #c1c6cd;
}

.billing-plan-card__features svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

@media (max-width: 620px) {
  .billing-intro {
    text-align: left;
  }

  .billing-intro__subtext {
    margin: 0;
  }

  .billing-plans-grid {
    justify-content: stretch;
  }

  .billing-plan-card {
    width: 100%;
    flex: 1 1 100%;
  }

  .billing-plan-card:hover {
    transform: none;
  }
}

.upgrade-modal-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.upgrade-modal-pill {
  align-self: flex-start;
  background: #008060;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 999px;
}

.upgrade-modal-tagline {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #16181d;
}

.upgrade-modal-divider {
  width: 100%;
  border: none;
  border-top: 1px solid #eef0f2;
  margin: 0;
}

.upgrade-modal-included-label {
  margin: 0 0 -4px;
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
}

.upgrade-modal-features {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.upgrade-modal-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  line-height: 1.4;
  color: #16181d;
}

.upgrade-modal-features svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

.upgrade-modal-price-row {
  display: flex;
  align-items: baseline;
}

.upgrade-modal-price {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #111827;
}

.upgrade-modal-period {
  font-size: 14px;
  font-weight: 500;
  color: #9ca3af;
  margin-left: 2px;
}

.upgrade-modal-trial {
  margin: -6px 0 0;
  font-size: 12.5px;
  font-weight: 600;
  color: #008060;
}

.upgrade-modal-error {
  margin: -4px 0 0;
  font-size: 12.5px;
  font-weight: 600;
  color: #d82c0d;
}

/* ── Analytics page ── */
.analytics-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.analytics-refresh-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #4b5563;
  cursor: pointer;
}

.analytics-refresh-button:hover {
  background: #f9fafb;
}

.analytics-refresh-button:disabled {
  opacity: 0.6;
  cursor: default;
}

.analytics-refresh-button svg.is-spinning {
  animation: analytics-spin 0.8s linear infinite;
}

@keyframes analytics-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* ── Analytics: date range filter ── */
.analytics-daterange {
  position: relative;
}

.analytics-daterange-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  font-size: 13px;
  font-weight: 600;
  color: #111827;
  cursor: pointer;
}

.analytics-daterange-trigger:hover {
  background: #f9fafb;
}

.analytics-daterange-icon {
  display: flex;
  color: #6b7280;
}

.analytics-daterange-popover {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 50;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(16, 24, 40, 0.14);
  overflow: hidden;
}

.analytics-daterange-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid #e5e7eb;
}

.analytics-daterange-cancel,
.analytics-daterange-apply {
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.analytics-daterange-cancel {
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #4b5563;
}

.analytics-daterange-apply {
  border: none;
  background: #111827;
  color: #ffffff;
}

/* ── Analytics: top posts / top products / top collections ── */
.analytics-top-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  align-items: start;
}

@media (max-width: 960px) {
  .analytics-top-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 620px) {
  .analytics-top-grid {
    grid-template-columns: 1fr;
  }
}

.analytics-top-card {
  background: #ffffff;
  border: 1px solid #ebecef;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.03);
  min-width: 0;
  overflow: hidden;
}

.analytics-top-card__header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid #f1f2f4;
}

.analytics-trend-card {
  margin-bottom: 16px;
}

.analytics-trend-card__body {
  padding: 16px 18px;
}

.analytics-empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 18px;
  text-align: center;
}

.analytics-top-card__heading {
  flex: 1;
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  color: #111827;
}

.analytics-top-card__count {
  padding: 3px 11px;
  border-radius: 999px;
  background: #f4f5f7;
  color: #6b7280;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

.analytics-list {
  display: flex;
  flex-direction: column;
}

.analytics-list-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  transition: background-color 0.15s ease;
}

.analytics-list-row:not(:last-child) {
  border-bottom: 1px solid #f1f2f4;
}

.analytics-list-row:hover {
  background: #f8f9fb;
}

.analytics-list-thumb {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  object-fit: cover;
  background: #f3f4f6;
  flex-shrink: 0;
}

.analytics-list-thumb--icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.analytics-list-thumb--posts {
  background: #eaf1fb;
  color: #2a78d6;
}

.analytics-list-thumb--products {
  background: #fdeee3;
  color: #d9731c;
}

.analytics-list-thumb--collections {
  background: #e7f6ee;
  color: #1baf7a;
}

.analytics-list-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.analytics-list-title {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  color: #111827;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analytics-list-subtitle {
  margin: 0;
  font-size: 12.5px;
  color: #9ca3af;
}

.analytics-list-metrics {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}


.analytics-metric-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #6b7280;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.analytics-list-metrics > *:not(:last-child)::after {
  content: "";
  display: inline-block;
  width: 1px;
  height: 12px;
  margin-left: 8px;
  background: #e5e7eb;
  vertical-align: middle;
}

.analytics-metric-pill svg {
  flex-shrink: 0;
  color: #9ca3af;
}

.analytics-metric-pill strong {
  color: #111827;
  font-weight: 700;
}

.analytics-type-pill {
  color: #6b7280;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}



