/* ===========================================
   REPOSITORY CARD COMPONENT
=========================================== */

/* Repository List Container */
.repo-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
  width: 100%;
}

/* Repository Card */
.repo-card {
  background: var(--canvas-overlay);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 1rem;
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
}

.repo-card:hover {
  border-color: var(--accent-fg);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.repo-card:focus-visible {
  outline: 2px solid var(--accent-fg);
  outline-offset: 2px;
}

/* Card Header */
.repo-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.repo-card-content {
  flex: 1;
  min-width: 0; /* Prevents flexbox overflow */
}

/* Repository Title */
.repo-title {
  font-family: var(--font-head);
  font-size: var(--text-lg);
  font-weight: var(--w-semi);
  color: var(--accent-fg);
  margin: 0 0 0.25rem 0;
  word-break: break-word;
}

/* Repository Description */
.repo-description {
  font-size: var(--text-sm);
  color: var(--fg-muted);
  margin: 0 0 0.75rem 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Repository Metadata */
.repo-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: var(--text-xs);
  color: var(--fg-muted);
}

.repo-meta-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Visibility Badge */
.repo-visibility {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.125rem 0.375rem;
  border-radius: var(--radius-sm);
  background: var(--accent-subtle);
  color: var(--accent-fg);
  font-size: var(--text-xs);
  font-weight: var(--w-med);
}

/* Delete Button */
.repo-delete-button {
  background: transparent;
  border: none;
  padding: 0.25rem;
  color: var(--fg-muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.repo-delete-button:hover {
  color: var(--danger-fg);
  background: var(--danger-subtle);
}

.repo-delete-button:focus-visible {
  outline: 2px solid var(--danger-fg);
  outline-offset: 2px;
}

/* Star Icon */
.repo-star-icon {
  width: 0.75rem;
  height: 0.75rem;
  fill: currentColor;
}

/* Delete Icon */
.repo-delete-icon {
  width: 1rem;
  height: 1rem;
  fill: currentColor;
}

/* Empty State */
.repo-list-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--fg-muted);
}

.repo-list-empty-icon {
  font-size: 2.5rem;
  color: var(--fg-subtle);
  margin-bottom: 1rem;
  opacity: 0.5;
}

/* Responsive Design */
@media (max-width: 768px) {
  .repo-list {
    grid-template-columns: 1fr;
  }
  
  .repo-card {
    padding: 0.75rem;
  }
  
  .repo-meta {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
}