/**
 * Components - Hovfaret 13 Dashboard
 * Reusable UI components.
 */

/* ===== BUTTONS ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  background: var(--text-accent);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn-primary:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn-secondary:hover {
  background: var(--bg-hover);
  border-color: var(--border-medium);
}

/* ===== BADGES ===== */
.type-badge {
  display: inline-flex;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.6rem;
  font-weight: 500;
  text-transform: uppercase;
}

.type-internal { background: rgba(139, 92, 246, 0.15); color: var(--type-internal); }
.type-external { background: rgba(14, 165, 233, 0.15); color: var(--type-external); }
.type-workshop { background: rgba(245, 158, 11, 0.15); color: var(--type-workshop); }
.type-presentation { background: rgba(16, 185, 129, 0.15); color: var(--type-presentation); }
.type-decision { background: rgba(239, 68, 68, 0.15); color: var(--type-decision); }
.type-other { background: rgba(107, 114, 128, 0.15); color: var(--type-other); }

.module-badge {
  font-size: 0.65rem;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 500;
  flex-shrink: 0;
}

.module-badge.count {
  background: var(--bg-main);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
}

.module-badge.new {
  background: #dcfce7;
  color: #166534;
}

.category-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
  background: var(--bg-accent);
  color: var(--text-accent);
}

/* ===== SEARCH & FILTERS ===== */
.search-container {
  position: relative;
  margin-bottom: var(--space-3);
}

.search-icon {
  position: absolute;
  left: var(--space-3);
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: var(--space-3) var(--space-3) var(--space-3) 2.5rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  transition: all var(--transition-fast);
  background: var(--bg-main);
}

.search-input:focus {
  outline: none;
  border-color: var(--text-accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  background: var(--bg-card);
}

.filter-row {
  display: flex;
  gap: var(--space-2);
}

.filter-select {
  flex: 1;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: var(--text-secondary);
  background: var(--bg-card);
  cursor: pointer;
}

.filter-select:focus {
  outline: none;
  border-color: var(--text-accent);
}

/* ===== CARDS ===== */
.info-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
}

.info-card-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border-light);
}

.info-card-icon {
  color: var(--text-accent);
}

.info-card-title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
}

.info-card-count {
  margin-left: auto;
  background: var(--bg-main);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* ===== STATS ===== */
.stat {
  text-align: center;
}

.stat-value {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-accent);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-stat {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  text-align: center;
}

.detail-stat-value {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-accent);
}

.detail-stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ===== LISTS ===== */
.item-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.item-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3);
  background: var(--bg-main);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  line-height: 1.5;
}

.item-bullet {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-accent);
  margin-top: 6px;
  flex-shrink: 0;
}

.item-bullet.green { background: var(--success); }
.item-bullet.red { background: var(--error); }
.item-bullet.orange { background: var(--warning); }

.item-text {
  flex: 1;
  color: var(--text-secondary);
}

/* ===== PARTICIPANTS ===== */
.participants-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.participant-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2);
  background: var(--bg-main);
  border-radius: var(--radius-sm);
}

.participant-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.75rem;
  color: white;
  flex-shrink: 0;
}

.participant-info {
  flex: 1;
  min-width: 0;
}

.participant-name {
  font-weight: 500;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.participant-org {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* ===== LOADING & EMPTY STATES ===== */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-8);
  color: var(--text-muted);
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border-light);
  border-top-color: var(--text-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: var(--space-4);
}

.detail-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
  text-align: center;
  padding: var(--space-8);
}

.detail-empty-icon {
  font-size: 4rem;
  margin-bottom: var(--space-4);
  opacity: 0.3;
}

.detail-empty h3 {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}

/* ===== ICONS ===== */
.module-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.module-icon.timeline { background: #dbeafe; }
.module-icon.meetings { background: #dcfce7; }
.module-icon.stakeholders { background: #fce7f3; }
.module-icon.scenarios { background: #fef3c7; }
.module-icon.documents { background: #e0e7ff; }
.module-icon.sustainability { background: #d1fae5; }
.module-icon.analytics { background: #ede9fe; }
.module-icon.overview { background: #f1f5f9; }
.module-icon.story { background: linear-gradient(135deg, #fef3c7, #fde68a); }
.module-icon.command-center { background: linear-gradient(135deg, var(--text-accent), #7c3aed); color: white; }

.document-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.document-icon.pdf { background: #fef2f2; }
.document-icon.doc { background: #eff6ff; }
.document-icon.xls { background: #f0fdf4; }
.document-icon.img { background: #fefce8; }
.document-icon.other { background: var(--bg-main); }

/* ===== SCROLLABLE CONTENT ===== */
.scrollable-content {
  max-height: 300px;
  overflow-y: auto;
}

/* ===== UTILITY CLASSES ===== */
.full-width {
  grid-column: 1 / -1;
}

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

.text-accent {
  color: var(--text-accent);
}

.text-success {
  color: var(--success);
}
