/* Linux BenchTools - Components */

/* Skeleton Loader */
.skeleton {
  background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-secondary) 50%, var(--bg-tertiary) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

.skeleton-text {
  height: 1rem;
  margin-bottom: var(--spacing-sm);
}

.skeleton-text.short {
  width: 60%;
}

.skeleton-text.long {
  width: 90%;
}

.skeleton-card {
  height: 100px;
  border-radius: var(--radius-md);
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Smooth transitions */
.fade-in {
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hardware Summary Component */
.hardware-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-md);
}

.hardware-item {
  background-color: var(--bg-tertiary);
  padding: var(--spacing-md);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--color-info);
}

.hardware-item-label {
  color: var(--text-secondary);
  font-size: 0.8rem;
  text-transform: uppercase;
  margin-bottom: var(--spacing-xs);
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.hardware-item-value {
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 500;
}

/* Score Grid Component */
.score-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: var(--spacing-sm);
  margin-top: var(--spacing-md);
}

.score-item {
  text-align: center;
  padding: var(--spacing-md);
  background-color: var(--bg-tertiary);
  border-radius: var(--radius-sm);
}

.score-label {
  color: var(--text-secondary);
  font-size: 0.75rem;
  text-transform: uppercase;
  margin-bottom: var(--spacing-xs);
}

.score-value {
  font-size: 1.5rem;
  font-weight: bold;
}

/* Tabs Component */
.tabs {
  display: flex;
  gap: var(--spacing-xs);
  border-bottom: 2px solid var(--bg-tertiary);
  margin-bottom: var(--spacing-lg);
}

.tab {
  padding: var(--spacing-sm) var(--spacing-lg);
  background-color: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
}

.tab:hover {
  color: var(--text-primary);
}

.tab.active {
  color: var(--color-success);
  border-bottom-color: var(--color-success);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Device Card Component */
.device-card {
  background-color: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
  border-left: 4px solid var(--color-success);
  transition: all 0.2s;
  cursor: pointer;
}

.device-card:hover {
  background-color: var(--bg-tertiary);
  transform: translateX(4px);
}

.device-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-md);
}

.device-card-title {
  font-size: 1.2rem;
  color: var(--color-success);
}

.device-card-meta {
  display: flex;
  gap: var(--spacing-md);
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: var(--spacing-md);
}

.device-card-scores {
  display: flex;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
}

/* Benchmark History Component */
.benchmark-history {
  max-height: 400px;
  overflow-y: auto;
}

.benchmark-item {
  background-color: var(--bg-tertiary);
  padding: var(--spacing-md);
  border-radius: var(--radius-sm);
  margin-bottom: var(--spacing-sm);
  border-left: 3px solid var(--color-info);
}

.benchmark-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-sm);
}

.benchmark-date {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* Document List Component */
.document-list {
  list-style: none;
}

.document-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-md);
  background-color: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  margin-bottom: var(--spacing-sm);
}

.document-info {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.document-icon {
  font-size: 1.5rem;
  color: var(--color-danger);
}

.document-name {
  color: var(--text-primary);
  font-weight: 500;
}

.document-meta {
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.document-actions {
  display: flex;
  gap: var(--spacing-xs);
}

/* Link List Component */
.link-list {
  list-style: none;
}

.link-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-md);
  background-color: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  margin-bottom: var(--spacing-sm);
}

.link-info a {
  color: var(--color-info);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
}

.link-label {
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.link-actions {
  display: flex;
  gap: var(--spacing-xs);
}

/* Upload Component */
.upload-area {
  border: 2px dashed var(--bg-tertiary);
  border-radius: var(--radius-md);
  padding: var(--spacing-xl);
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.upload-area:hover {
  border-color: var(--color-success);
  background-color: var(--bg-tertiary);
}

.upload-area.dragover {
  border-color: var(--color-success);
  background-color: var(--bg-tertiary);
}

.upload-icon {
  font-size: 3rem;
  color: var(--text-muted);
  margin-bottom: var(--spacing-md);
}

.upload-text {
  color: var(--text-secondary);
  margin-bottom: var(--spacing-sm);
}

.upload-hint {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* Search Bar Component */
.search-bar {
  position: relative;
  margin-bottom: var(--spacing-lg);
}

.search-input {
  width: 100%;
  padding: var(--spacing-md);
  padding-left: 2.5rem;
  background-color: var(--bg-secondary);
  border: 2px solid var(--bg-tertiary);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
}

.search-input:focus {
  outline: none;
  border-color: var(--color-success);
}

.search-icon {
  position: absolute;
  left: var(--spacing-md);
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.2rem;
}

/* Pagination Component */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-lg);
}

.pagination-btn {
  padding: var(--spacing-sm) var(--spacing-md);
  background-color: var(--bg-secondary);
  border: 1px solid var(--bg-tertiary);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s;
}

.pagination-btn:hover:not(:disabled) {
  background-color: var(--color-success);
  color: var(--bg-primary);
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-info {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Modal Component */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
}

.modal.active {
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background-color: var(--bg-secondary);
  padding: var(--spacing-xl);
  border-radius: var(--radius-md);
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-lg);
  padding-bottom: var(--spacing-md);
  border-bottom: 1px solid var(--bg-tertiary);
}

.modal-title {
  font-size: 1.5rem;
  color: var(--color-success);
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  color: var(--color-danger);
}

.modal-body {
  margin-bottom: var(--spacing-lg);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--spacing-sm);
}

/* Tags Component */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-xs);
}

.tag {
  display: inline-block;
  padding: var(--spacing-xs) var(--spacing-sm);
  background-color: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.75rem;
  border: 1px solid var(--bg-tertiary);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.tag-primary {
  background-color: var(--color-info);
  color: var(--bg-primary);
  border-color: var(--color-info);
}

.tag .remove-tag {
  background: transparent;
  border: none;
  color: inherit;
  cursor: pointer;
  font-size: 0.8rem;
  padding: 0;
  line-height: 1;
}

/* Alert Component */
.alert {
  padding: var(--spacing-md);
  border-radius: var(--radius-sm);
  margin-bottom: var(--spacing-md);
  border-left: 4px solid;
}

.alert-success {
  background-color: rgba(166, 226, 46, 0.1);
  border-left-color: var(--color-success);
  color: var(--color-success);
}

.alert-warning {
  background-color: rgba(253, 151, 31, 0.1);
  border-left-color: var(--color-warning);
  color: var(--color-warning);
}

.alert-danger {
  background-color: rgba(249, 38, 114, 0.1);
  border-left-color: var(--color-danger);
  color: var(--color-danger);
}

.alert-info {
  background-color: rgba(102, 217, 239, 0.1);
  border-left-color: var(--color-info);
  color: var(--color-info);
}

/* Tooltip */
.tooltip {
  position: relative;
  display: inline-block;
  cursor: help;
}

.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: var(--spacing-xs) var(--spacing-sm);
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 0.75rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  margin-bottom: var(--spacing-xs);
}

.tooltip:hover::after {
  opacity: 1;
}
