/* ==================================== */
/* GoScores - Sidebar Styles            */
/* ==================================== */

/* Additional sidebar-specific styles beyond shared layout.css */

.goscores-sidebar .section-card {
  padding: 8px;
}

.goscores-sidebar .section-card legend {
  font-size: 10px;
  padding: 0 6px;
}

/* Search results highlight */
.score-item-name mark {
  background: rgba(217, 119, 87, 0.25);
  color: inherit;
  padding: 0 2px;
  border-radius: 2px;
}

/* No results message */
.search-no-results {
  padding: 16px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
}

/* Recent/Popular badge */
.score-item-badge {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}

.score-item-badge.recent {
  background: rgba(93, 138, 102, 0.15);
  color: var(--accent-success);
}

.score-item-badge.popular {
  background: rgba(217, 119, 87, 0.15);
  color: var(--accent-primary);
}

/* Category icons */
.category-icon svg {
  width: 100%;
  height: 100%;
}

/* Categories container - scrollable area styling */
/* (mask-image removed to prevent content cutoff) */

/* Loading state */
.category-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: var(--text-muted);
  font-size: 12px;
}

.category-loading::before {
  content: '';
  width: 16px;
  height: 16px;
  border: 2px solid var(--border-medium);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  margin-right: 8px;
  animation: spin 0.8s linear infinite;
}

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

/* Filter by category in search */
.search-filter-pills {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.search-filter-pill {
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 600;
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-pill);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.search-filter-pill:hover,
.search-filter-pill.active {
  border-color: var(--accent-primary);
  background: rgba(217, 119, 87, 0.1);
  color: var(--accent-primary);
}

/* ==================================== */
/* SEARCH RESULTS DROPDOWN              */
/* ==================================== */
.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  background: var(--bg-canvas);
  border: 1px solid var(--border-medium);
  border-radius: var(--border-radius-md);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  z-index: 200;
  max-height: 300px;
  overflow-y: auto;
}

.search-results .score-item {
  padding: 10px 12px;
  border-radius: 0;
  border-bottom: 1px solid var(--border-light);
}

.search-results .score-item:last-child {
  border-bottom: none;
}

.search-results .score-item:first-child {
  border-radius: var(--border-radius-md) var(--border-radius-md) 0 0;
}

.search-results .score-item:last-child {
  border-radius: 0 0 var(--border-radius-md) var(--border-radius-md);
}

.search-results .score-item:only-child {
  border-radius: var(--border-radius-md);
}

/* ==================================== */
/* HISTORY STYLES                       */
/* ==================================== */
.history-empty {
  padding: 24px 16px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

.history-list {
  display: flex;
  flex-direction: column;
}

.history-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid var(--border-light);
  transition: background var(--transition-fast);
}

.history-item:hover {
  background: var(--bg-sidebar-hover);
}

.history-item:last-child {
  border-bottom: none;
}

.history-item-indicator {
  width: 4px;
  height: 40px;
  border-radius: 2px;
  flex-shrink: 0;
}

.history-item-indicator.level-low {
  background: var(--accent-success);
}

.history-item-indicator.level-intermediate {
  background: #eab308;
}

.history-item-indicator.level-high {
  background: #f97316;
}

.history-item-indicator.level-critical {
  background: var(--accent-danger);
}

.history-item-content {
  flex: 1;
  min-width: 0;
}

.history-item-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 2px;
}

.history-item-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-item-score {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  flex-shrink: 0;
}

.history-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}

.history-item-date {
  color: var(--text-muted);
}

.history-item-interp {
  font-weight: 500;
}

.history-item-interp.level-low {
  color: var(--accent-success);
}

.history-item-interp.level-intermediate {
  color: #ca8a04;
}

.history-item-interp.level-high {
  color: #ea580c;
}

.history-item-interp.level-critical {
  color: var(--accent-danger);
}

.history-item-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.history-item:hover .history-item-actions {
  opacity: 1;
}

.history-action-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--border-radius-sm);
  transition: all var(--transition-fast);
}

.history-action-btn:hover {
  background: var(--bg-sidebar-hover);
  color: var(--accent-primary);
}

.history-action-btn.history-action-delete:hover {
  background: rgba(196, 92, 92, 0.1);
  color: var(--accent-danger);
}
