/* SellerGrid public Integrations page — sgi-* prefix */

/* ---------- Hero ---------- */
.sgi-hero {
  padding: calc(var(--header-h) + var(--space-2xl)) 0 var(--space-xl);
  background:
    radial-gradient(60% 120% at 15% 0%, var(--accent-soft) 0%, transparent 60%),
    var(--off-white);
}

.sgi-breadcrumb {
  font-size: 0.85rem;
  color: var(--muted);
  display: flex;
  gap: 0.5rem;
  margin-bottom: var(--space-lg);
}

.sgi-breadcrumb a { color: var(--accent); text-decoration: none; }
.sgi-breadcrumb a:hover { text-decoration: underline; }

.sgi-title {
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.1;
}

.sgi-subtitle {
  margin-top: var(--space-md);
  max-width: 48rem;
  font-size: 1.075rem;
  line-height: 1.65;
  color: var(--ink-soft);
}

.sgi-hero-meta {
  margin-top: var(--space-lg);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.sgi-hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border, #e2e8f0);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.sgi-hero-pill .sgi-live-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: #10b981;
  flex: none;
}

/* ---------- Toolbar ---------- */
.sgi-toolbar {
  padding: var(--space-lg) 0 var(--space-lg);
  background: var(--off-white);
  position: sticky;
  top: var(--header-h);
  z-index: 5;
  border-bottom: 1px solid var(--border, #e2e8f0);
}

.sgi-toolbar-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.sgi-search-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
  justify-content: space-between;
}

.sgi-search {
  position: relative;
  flex: 1 1 18rem;
  max-width: 24rem;
}

.sgi-search input {
  width: 100%;
  padding: 0.65rem 0.9rem 0.65rem 2.4rem;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 0.75rem;
  background: #fff;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.sgi-search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.sgi-search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
  display: inline-flex;
}

.sgi-count {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.sgi-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.sgi-filter {
  appearance: none;
  border: 1px solid var(--border, #e2e8f0);
  background: #fff;
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.sgi-filter:hover { border-color: var(--accent); color: var(--accent); }

.sgi-filter[aria-pressed='true'] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.sgi-filter:focus-visible,
.sgi-search input:focus-visible,
.sgi-cta-row a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- Grid ---------- */
.sgi-grid-section { padding: var(--space-lg) 0 var(--space-2xl); background: var(--off-white); }

.sgi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr));
  gap: 0.9rem;
}

.sgi-card {
  background: #fff;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 1rem;
  padding: 1.1rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 9.5rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.sgi-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 10px 30px -18px rgba(15, 23, 42, 0.35);
}

.sgi-card__logo {
  width: 3rem;
  height: 3rem;
  border-radius: 0.85rem;
  border: 1px solid var(--border, #e2e8f0);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex: none;
}

.sgi-card__logo img {
  width: 2.1rem;
  height: 2.1rem;
  object-fit: contain;
}

.sgi-card__logo--fallback {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.sgi-card__name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}

.sgi-card__tags {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.sgi-card__tag {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  white-space: nowrap;
}

/* Entrance animation */
@media (prefers-reduced-motion: no-preference) {
  .sgi-card.sgi-enter {
    animation: sgi-card-in 0.35s ease both;
    animation-delay: calc(var(--i, 0) * 35ms);
  }

  @keyframes sgi-card-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

/* ---------- Status / empty ---------- */
.sgi-status {
  padding: var(--space-2xl) 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}

.sgi-skeleton {
  border-radius: 1rem;
  border: 1px solid var(--border, #e2e8f0);
  background: linear-gradient(100deg, #f1f5f9 40%, #e9eef5 50%, #f1f5f9 60%);
  background-size: 200% 100%;
  min-height: 9.5rem;
}

@media (prefers-reduced-motion: no-preference) {
  .sgi-skeleton { animation: sgi-shimmer 1.2s linear infinite; }

  @keyframes sgi-shimmer {
    from { background-position: 200% 0; }
    to { background-position: -200% 0; }
  }
}

/* ---------- CTA ---------- */
.sgi-cta-section {
  padding: var(--space-2xl) 0 calc(var(--space-2xl) + var(--space-xl));
  background: var(--off-white);
}

.sgi-cta-panel {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border-radius: 1.5rem;
  padding: clamp(1.75rem, 4vw, 3rem);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  align-items: flex-start;
}

.sgi-cta-title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.sgi-cta-text {
  color: #cbd5e1;
  font-size: 1rem;
  line-height: 1.6;
  max-width: 42rem;
}

.sgi-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: var(--space-sm);
}

@media (max-width: 640px) {
  .sgi-grid { grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: 0.6rem; }
  .sgi-card { min-height: 8.5rem; padding: 0.85rem 0.75rem; }
  .sgi-card__logo { width: 2.5rem; height: 2.5rem; border-radius: 0.7rem; }
  .sgi-card__logo img { width: 1.7rem; height: 1.7rem; }
  .sgi-card__name { font-size: 0.9rem; }
  .sgi-toolbar { position: static; }
}
