/* ADMIN_POSTS_PROFESSIONAL_V1 */

.posts-admin-head {
  align-items: flex-start;
  display: grid;
  gap: 22px;
}

.posts-admin-heading h2 {
  margin-bottom: 6px;
}

.posts-admin-heading p {
  color: var(--muted);
  margin: 0;
  max-width: 760px;
}

.posts-admin-filter-grid {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns:
    minmax(230px, 1.65fr)
    repeat(6, minmax(125px, 0.75fr));
  width: 100%;
}

.posts-filter {
  display: grid;
  gap: 6px;
}

.posts-filter > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.posts-filter-search {
  min-width: 230px;
}

.posts-date-filter.is-muted {
  opacity: 0.55;
}

.posts-filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  grid-column: 1 / -1;
}

.posts-summary-grid {
  display: grid;
  gap: 14px;
  grid-template-columns:
    repeat(4, minmax(150px, 1fr));
  margin: 18px 0;
}

.posts-summary-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  display: grid;
  gap: 8px;
  min-height: 96px;
  padding: 18px;
}

.posts-summary-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.posts-summary-card strong {
  font-size: 28px;
  line-height: 1;
}

.posts-summary-card.pending {
  border-left: 4px solid #d9a514;
}

.posts-summary-card.approved {
  border-left: 4px solid #168b5b;
}

.posts-summary-card.rejected {
  border-left: 4px solid #c44343;
}

.posts-admin-table-wrap {
  max-height: calc(100vh - 330px);
  overflow: auto;
}

.posts-admin-table {
  min-width: 1320px;
}

.posts-admin-table th {
  position: sticky;
  top: 0;
  z-index: 3;
}

.posts-preview-cell {
  min-width: 112px;
  width: 112px;
}

.posts-preview-button {
  background: transparent;
  border: 0;
  cursor: pointer;
  display: block;
  padding: 0;
  position: relative;
}

.posts-row-thumb {
  background: #0e1117;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: block;
  height: 82px;
  object-fit: cover;
  width: 82px;
}

.posts-video-badge,
.posts-carousel-badge {
  background: rgba(10, 13, 18, 0.84);
  border-radius: 999px;
  bottom: 5px;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 4px 7px;
  position: absolute;
  right: 5px;
}

.posts-no-preview {
  align-items: center;
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--muted);
  display: flex;
  font-size: 11px;
  height: 82px;
  justify-content: center;
  padding: 8px;
  text-align: center;
  width: 82px;
}

.posts-creator-cell {
  min-width: 160px;
}

.posts-creator-cell small {
  color: var(--muted);
  display: block;
  margin-top: 4px;
}

.posts-id {
  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Monaco,
    Consolas,
    monospace;
  font-size: 10px;
  max-width: 175px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.posts-caption-cell {
  max-width: 280px;
  min-width: 230px;
  white-space: normal;
}

.posts-location {
  color: var(--muted);
  display: block;
  margin-top: 8px;
}

.posts-media-label {
  display: block;
  font-weight: 800;
  margin-bottom: 5px;
}

.posts-engagement-cell {
  min-width: 140px;
}

.posts-engagement-cell span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  margin-bottom: 4px;
}

.posts-engagement-cell
.posts-report-count {
  color: #c44343;
  font-weight: 800;
}

.posts-admin-controls {
  min-width: 190px;
}

.posts-admin-controls .mini {
  margin: 2px;
}

.posts-action-approve {
  border-color: rgba(22, 139, 91, 0.38);
  color: #168b5b;
}

.posts-action-reject,
.posts-action-violation {
  border-color: rgba(196, 67, 67, 0.38);
  color: #c44343;
}

.posts-action-restore {
  border-color: rgba(50, 112, 214, 0.38);
  color: #3270d6;
}

.posts-viewer-backdrop {
  align-items: center;
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 24px;
  position: fixed;
  z-index: 10000;
}

.posts-viewer-modal {
  max-height: 92vh;
  max-width: 1120px;
  overflow: auto;
  width: min(1120px, 96vw);
}

.posts-viewer-layout {
  display: grid;
  gap: 22px;
  grid-template-columns:
    minmax(0, 1.25fr)
    minmax(300px, 0.75fr);
}

.posts-viewer-media {
  display: grid;
  gap: 14px;
  grid-template-columns:
    repeat(
      auto-fit,
      minmax(220px, 1fr)
    );
}

.posts-viewer-media-card {
  align-items: center;
  background: #080b10;
  border-radius: 16px;
  display: flex;
  justify-content: center;
  min-height: 360px;
  overflow: hidden;
  position: relative;
}

.posts-viewer-media-card img,
.posts-viewer-media-card video {
  display: block;
  max-height: 68vh;
  max-width: 100%;
  object-fit: contain;
  width: 100%;
}

.posts-viewer-index {
  background: rgba(0, 0, 0, 0.72);
  border-radius: 999px;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 5px 9px;
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 2;
}

.posts-viewer-details {
  align-content: start;
  display: grid;
  gap: 10px;
}

.posts-detail-row {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 5px;
  padding: 8px 0 12px;
}

.posts-detail-row span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.posts-detail-row strong {
  font-size: 14px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.posts-admin-empty {
  align-items: center;
  color: #fff;
  display: flex;
  justify-content: center;
  min-height: 300px;
  padding: 30px;
  text-align: center;
}

@media (max-width: 1250px) {
  .posts-admin-filter-grid {
    grid-template-columns:
      repeat(3, minmax(160px, 1fr));
  }

  .posts-filter-search {
    grid-column: span 2;
  }
}

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

  .posts-viewer-layout {
    grid-template-columns: 1fr;
  }

  .posts-viewer-media-card {
    min-height: 280px;
  }
}

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

  .posts-filter-search {
    grid-column: auto;
  }

  .posts-summary-grid {
    grid-template-columns: 1fr 1fr;
  }

  .posts-viewer-backdrop {
    padding: 8px;
  }
}

/* ADMIN_POSTS_VISUAL_V1_1 */

.posts-admin-head {
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.posts-admin-filter-grid {
  box-sizing: border-box;
  grid-template-columns:
    repeat(
      auto-fit,
      minmax(150px, 1fr)
    );
  max-width: 100%;
  min-width: 0;
}

.posts-admin-filter-grid > * {
  min-width: 0;
}

.posts-filter-search {
  grid-column: span 2;
  min-width: 0;
}

.posts-filter .search,
.posts-filter .select {
  box-sizing: border-box;
  max-width: 100%;
  min-width: 0;
  width: 100%;
}

.posts-filter-buttons {
  max-width: 100%;
  min-width: 0;
}

.posts-admin-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: auto;
  scrollbar-gutter: stable;
  width: 100%;
}

.posts-admin-table {
  width: max-content;
}

.posts-admin-table th:last-child,
.posts-admin-table td:last-child {
  background: var(--panel);
  box-shadow: -10px 0 18px
    rgba(0, 0, 0, 0.12);
  position: sticky;
  right: 0;
  z-index: 2;
}

.posts-admin-table th:last-child {
  z-index: 5;
}

@media (max-width: 1100px) {
  .posts-admin-filter-grid {
    grid-template-columns:
      repeat(
        3,
        minmax(150px, 1fr)
      );
  }

  .posts-filter-search {
    grid-column: span 2;
  }
}

@media (max-width: 760px) {
  .posts-admin-filter-grid {
    grid-template-columns:
      repeat(
        2,
        minmax(130px, 1fr)
      );
  }

  .posts-filter-search {
    grid-column: 1 / -1;
  }
}

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

  .posts-filter-search {
    grid-column: auto;
  }

  .posts-admin-table th:last-child,
  .posts-admin-table td:last-child {
    position: static;
  }
}
