/**
 * BINJ Author Grid styles
 */
.bag-wrapper {
  --bag-gap: 24px;
  --bag-cols: 4;
}
.bag-wrapper[data-cols="1"] { --bag-cols: 1; }
.bag-wrapper[data-cols="2"] { --bag-cols: 2; }
.bag-wrapper[data-cols="3"] { --bag-cols: 3; }
.bag-wrapper[data-cols="4"] { --bag-cols: 4; }
.bag-wrapper[data-cols="5"] { --bag-cols: 5; }

.bag-grid {
  display: grid;
  grid-template-columns: repeat(var(--bag-cols), minmax(0, 1fr));
  gap: var(--bag-gap);
  align-items: stretch;
}

.bag-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px;
  height: 100%;
  display: flex;
}

.bag-card-inner {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 14px;
  align-items: center;
  width: 100%;
}

.bag-avatar-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

.bag-avatar {
  display: block;
}

.bag-avatar img,
.bag-avatar,
.bag-avatar-wrap img {
  width: 80px;
  height: 80px;
  border-radius: 9999px;
  object-fit: cover;
}

.bag-meta {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.bag-name {
  margin: 0 0 6px 0;
  font-size: 1.05rem;
  line-height: 1.2;
}

.bag-cta .bag-view {
  display: inline-block;
  padding: 6px 10px;
  border: 1px solid #111827;
  text-decoration: none;
  font-weight: 600;
  line-height: 1;
}

.bag-cta .bag-view:hover {
  text-decoration: underline;
}

.bag-count {
  opacity: 0.6;
  font-size: 0.9rem;
  margin-top: 6px;
}

/* Pagination */
.bag-pagination {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  margin-top: 18px;
  flex-wrap: wrap;
}

.bag-pagination .bag-page {
  padding: 6px 10px;
  border: 1px solid #d1d5db;
  text-decoration: none;
  border-radius: 6px;
}

.bag-pagination .bag-page.current {
  background: #111827;
  color: #fff;
  border-color: #111827;
}

.bag-pagination .bag-page.disabled {
  pointer-events: none;
  opacity: 0.5;
}

/* Loading state */
.bag-wrapper.bag-loading {
  opacity: 0.7;
  pointer-events: none;
}

/* Responsive */
@media (max-width: 1024px) {
  .bag-wrapper { --bag-cols: 2; }
}

@media (max-width: 640px) {
  .bag-wrapper { --bag-cols: 1; }
  .bag-card-inner {
    grid-template-columns: 64px 1fr;
  }
  .bag-avatar img,
  .bag-avatar,
  .bag-avatar-wrap img {
    width: 64px;
    height: 64px;
  }
}
