/* StoredX Creator Final Design — Phase A
   Scoped visual changes only. No API or data changes. */

#content .sx-v4-intro {
  margin: 0 0 10px !important;
  gap: 14px !important;
}
#content .sx-v4-intro h2 {
  font-size: 27px !important;
  letter-spacing: -.8px !important;
}
#content .sx-v4-stat {
  min-height: 74px !important;
  border-radius: 9px !important;
}
#content .sx-v4-context {
  padding: 8px 13px !important;
  margin-bottom: 10px !important;
}
#content .sx-kd {
  display: block !important;
  min-height: 0 !important;
  overflow: visible !important;
  border-radius: 9px !important;
}
#content .sx-kd-side {
  display: none !important;
}
#content .sx-kd-main {
  width: 100% !important;
  min-width: 0 !important;
}
#content .sx-kd-top {
  padding: 12px 16px 8px !important;
}
#content .sx-kd-toolbar {
  padding: 10px 16px !important;
}
#content .sx-kd-date {
  padding: 0 16px 9px !important;
}
#content .sx-kd-results-summary {
  padding: 11px 16px !important;
}
#content .sx-kd-table-scroll {
  max-width: 100% !important;
  overflow-x: auto !important;
  position: relative;
}
#content .sx-kd-table {
  min-width: 1450px !important;
}
#content .sx-kd-table th {
  padding: 12px 9px !important;
}
#content .sx-kd-table td {
  padding: 10px 9px !important;
  height: 69px !important;
}
#content .sx-kd-table th:last-child,
#content .sx-kd-table td:last-child {
  position: sticky;
  right: 0;
  z-index: 3;
  background: #fff !important;
  box-shadow: -3px 0 8px #162c4812;
  min-width: 112px;
}
#content .sx-kd-table thead th:last-child {
  z-index: 4;
  background: #f7f9fd !important;
}
#content .sx-kd-table tbody tr:hover td:last-child {
  background: #f8fbff !important;
}
#content .sx-kd-table .sx-kd-creator-col {
  min-width: 215px !important;
}
#content .sx-kd-history-open {
  white-space: nowrap;
  font-size: 11px;
}
#content .sx-kd-paging {
  padding: 12px 16px !important;
}
@media (max-width: 800px) {
  #content .sx-v4-intro h2 {
    font-size: 23px !important;
  }
  #content .sx-v4-kpis {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  #content .sx-kd-toolbar {
    flex-wrap: wrap !important;
  }
}

/* StoredX Creator V4.5 — video-linked products */
#content .sx-kd-linked-cell {
  min-width: 175px;
}
#content .sx-kd-product-list {
  display:flex;
  align-items:center;
  gap:5px;
  white-space:nowrap;
}
#content .sx-kd-product-item {
  width:43px;
  height:48px;
  flex:none;
  overflow:hidden;
  border:1px solid #dce7f4;
  border-radius:7px;
  background:#f2f6fc;
  display:grid;
  place-items:center;
}
#content .sx-kd-product-item a {
  display:block;
  width:100%;
  height:100%;
}
#content .sx-kd-product-item img {
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
}
#content .sx-kd-product-fallback {
  color:#7893b6;
  font-size:22px;
}
#content .sx-kd-linked-count {
  font-size:10px;
  color:#52739b;
  margin-left:4px;
}

/* StoredX Creator V4.6 numbered pagination */
#content .sx-v46-pages {
  display:flex;
  align-items:center;
  gap:5px;
}
#content .sx-v46-pages button {
  min-width:31px;
  height:32px;
  padding:4px 8px;
  border:1px solid #d9e5f5;
  border-radius:6px;
  background:#fff;
  color:#2a466c;
  font-weight:600;
  cursor:pointer;
}
#content .sx-v46-pages button.sx-v46-current {
  color:#fff;
  background:#1665f5;
  border-color:#1665f5;
}
#content .sx-v46-ellipsis {
  color:#7b8da6;
  padding:0 3px;
}
#content .sx-kd-page-controls {
  display:flex;
  align-items:center;
  gap:7px;
}

/* V4.7 — approved horizontal creator filter toolbar */
#content .sx-v47-filters {
  display:flex;
  flex-wrap:wrap;
  gap:9px;
  align-items:end;
  padding:12px 16px;
  background:#f8fbff;
  border-top:1px solid #e7edf6;
  border-bottom:1px solid #e7edf6;
}
#content .sx-v47-filters label {
  display:flex;
  flex-direction:column;
  gap:5px;
  color:#526783;
  font-size:11px;
  font-weight:650;
}
#content .sx-v47-filters input,
#content .sx-v47-filters select {
  min-width:106px;
  height:35px;
  padding:5px 9px;
  border:1px solid #cddcee;
  border-radius:6px;
  background:white;
  color:#233b59;
  font:inherit;
  font-size:12px;
}
#content .sx-v47-actions {
  display:flex;
  gap:7px;
  align-items:center;
}
#content .sx-v47-actions button {
  height:35px;
  padding:0 13px;
  border-radius:6px;
  border:1px solid #cddcee;
  background:#fff;
  color:#245080;
  font-weight:650;
  cursor:pointer;
}
#content #sx-v47-apply {
  background:#1665ef;
  border-color:#1665ef;
  color:white;
}

/* V4.8 — creator identity styling */
#content .sx-kd-person {
  gap:10px !important;
}
#content .sx-kd-avatar {
  width:42px !important;
  height:42px !important;
  min-width:42px !important;
  overflow:hidden;
  border-radius:50% !important;
}
#content .sx-v48-avatar img {
  width:100%;
  height:100%;
  object-fit:cover;
  border-radius:50%;
}
#content .sx-v48-avatar span:not([hidden]) {
  display:grid;
  place-items:center;
  width:100%;
  height:100%;
}
#content .sx-v4-intro,
#content .sx-kd,
#content .sx-v47-filters {
  font-family:inherit !important;
}

/* V4.8B — retain V4.7 toolbar; hide obsolete filters */
#content .sx-v47-filters ~ .sx-kd-date + .sx-kd-legacy-filters {
  display:none !important;
}

/* Approved Creator Intelligence design */
#content .sx-v47-filters {
  border-radius:0;
  background:#f8fbff;
}
#content .sx-v47-filters input,
#content .sx-v47-filters select {
  border-color:#d6e2f1;
}
#content .sx-kd-person-text strong {
  font-weight:700;
  color:#142b4b;
}

/* V4.8D — hide obsolete secondary filter fields.
   Keep the working V4.7 toolbar and quick-filter controls. */
#content .sx-kd-main .sx-kd-filters {
  display:none !important;
}

/* Compact toolbar styling aligned with the approved design */
#content .sx-v47-filters {
  padding:13px 16px !important;
  gap:10px !important;
  background:#f8fbff !important;
  border-bottom:1px solid #e2eaf5 !important;
}
#content .sx-v47-filters label {
  font-size:11px !important;
  font-weight:650 !important;
  color:#465f7d !important;
}
#content .sx-v47-filters input,
#content .sx-v47-filters select {
  height:36px !important;
  background:#fff !important;
  border:1px solid #d4e0f0 !important;
  border-radius:6px !important;
}


/* STOREDX_CREATOR_GALLERY_TREND_FINAL_R1: Creator detail thumbnail sizing */
#content .sx-kdv8-product-previews .sx-kd-product-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}

#content .sx-kdv8-product-previews .sx-kd-product-item {
  flex: 0 0 104px;
  width: 104px;
  height: 104px;
  overflow: hidden;
  border-radius: 12px;
}

#content .sx-kdv8-product-previews .sx-kd-product-item a {
  display: block;
  width: 100%;
  height: 100%;
}

#content .sx-kdv8-product-previews .sx-kd-product-item img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

#content .sx-kdv8-product-previews .sx-kd-linked-count {
  flex: 0 0 auto;
}


/* STOREDX_CREATOR_MODAL_GALLERY_R2: applies to creator modal outside #content */
.sx-kdv8-product-previews .sx-kd-product-list {
  display: flex !important;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px;
}

.sx-kdv8-product-previews .sx-kd-product-item {
  display: block;
  flex: 0 0 112px;
  width: 112px !important;
  height: 112px !important;
  max-width: 112px;
  overflow: hidden;
  border: 1px solid #e1e9f5;
  border-radius: 12px;
  background: #fff;
}

.sx-kdv8-product-previews .sx-kd-product-item a {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
}

.sx-kdv8-product-previews .sx-kd-product-item img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
}

.sx-kdv8-product-previews .sx-kd-linked-count {
  align-self: center;
}
