/* ============================================================
   ISSUES SIDEBAR — Styles for the recent issues panel
   ============================================================ */

.issues-sidebar {
  width: 320px;
  background: rgba(30, 22, 15, 0.85);
  border: 1px solid rgba(255, 191, 71, 0.12);
  border-radius: 8px;
  padding: 1.5rem;
  max-height: 80vh;
  overflow-y: auto;
  position: sticky;
  top: 100px;
}

.issues-sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 191, 71, 0.15);
}

.issues-sidebar-header h3 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--amber);
  font-weight: 600;
}

.issues-sidebar-header a {
  color: var(--cream);
  text-decoration: none;
  font-size: 0.85rem;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.issues-sidebar-header a:hover {
  opacity: 1;
  color: var(--amber);
}

/* Loading state */
.issues-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  color: var(--cream);
  opacity: 0.6;
}

.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255, 191, 71, 0.2);
  border-top-color: var(--amber);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 1rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.issues-loading p {
  margin: 0;
  font-size: 0.9rem;
}

/* Empty state */
.issues-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
  color: var(--cream);
  opacity: 0.6;
}

.issues-empty svg {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  color: var(--amber);
  opacity: 0.5;
}

.issues-empty p {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
}

.issues-empty span {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  opacity: 0.7;
}

/* Error state */
.issues-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
  color: var(--cream);
}

.issues-error svg {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  color: #ff6b6b;
}

.issues-error p {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
  color: #ff6b6b;
}

.issues-error span {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  opacity: 0.7;
}

/* Issues list */
.issues-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Issue card */
.issue-card {
  display: block;
  background: rgba(20, 15, 10, 0.5);
  border: 1px solid rgba(255, 191, 71, 0.1);
  border-radius: 6px;
  padding: 0.875rem;
  text-decoration: none;
  color: var(--cream);
  transition: all 0.2s ease;
}

.issue-card:hover {
  background: rgba(30, 22, 15, 0.7);
  border-color: rgba(255, 191, 71, 0.25);
  transform: translateX(2px);
}

/* Pinned issue styling */
.issue-card.issue-pinned {
  background: rgba(255, 191, 71, 0.08);
  border: 1px solid rgba(255, 191, 71, 0.25);
  box-shadow: 0 2px 8px rgba(255, 191, 71, 0.15);
}

.issue-card.issue-pinned:hover {
  background: rgba(255, 191, 71, 0.12);
  border-color: rgba(255, 191, 71, 0.4);
  box-shadow: 0 4px 12px rgba(255, 191, 71, 0.25);
}

.issue-card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.issue-pinned-badge {
  margin-left: auto;
  font-size: 1rem;
  filter: drop-shadow(0 0 4px rgba(255, 191, 71, 0.5));
  animation: subtle-pulse 2s ease-in-out infinite;
}

@keyframes subtle-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.issue-icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: var(--amber);
  opacity: 0.7;
}

.issue-icon svg {
  width: 100%;
  height: 100%;
}

.issue-number {
  font-size: 0.75rem;
  color: var(--cream);
  opacity: 0.5;
  font-weight: 500;
}

.issue-title {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--cream);
  margin-bottom: 0.5rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.issue-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-bottom: 0.5rem;
}

.issue-label {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 500;
  line-height: 1.5;
}

.issue-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--cream);
  opacity: 0.5;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 191, 71, 0.08);
}

.issue-author {
  font-weight: 500;
}

.issue-time {
  font-style: italic;
}

/* Scrollbar styling */
.issues-sidebar::-webkit-scrollbar {
  width: 6px;
}

.issues-sidebar::-webkit-scrollbar-track {
  background: rgba(20, 15, 10, 0.3);
  border-radius: 3px;
}

.issues-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 191, 71, 0.3);
  border-radius: 3px;
}

.issues-sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 191, 71, 0.5);
}

/* Mobile responsiveness */
@media (max-width: 1200px) {
  .issues-sidebar {
    width: 100%;
    max-width: 100%;
    position: static;
    margin-top: 2rem;
    max-height: 500px;
  }
}

@media (max-width: 700px) {
  .issues-sidebar {
    padding: 1rem;
  }
  
  .issue-card {
    padding: 0.75rem;
  }
  
  .issue-title {
    font-size: 0.85rem;
  }
}
