/* satellite-table.css - Responsive table design and status indicators */

.data-section {
  margin-top: var(--spacing-lg);
}

.satellite-table-container {
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(10px);
  overflow: hidden;
}

.table-header {
  padding: var(--spacing-lg);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--spacing-md);
}

.table-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

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

.view-toggle {
  display: flex;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.view-toggle-btn {
  padding: var(--spacing-sm) var(--spacing-md);
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-transform: uppercase;
}

.view-toggle-btn.active {
  background: var(--primary-color);
  color: white;
}

/* Table styles */
.satellite-table-wrapper {
  overflow-x: auto;
  max-height: 500px;
  overflow-y: auto;
}

.satellite-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.satellite-table th {
  position: sticky;
  top: 0;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  padding: var(--spacing-md);
  text-align: left;
  border-bottom: 2px solid var(--border-color);
  z-index: 10;
}

.satellite-table td {
  padding: var(--spacing-md);
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.satellite-table tbody tr {
  transition: all var(--transition-fast);
  cursor: pointer;
}

.satellite-table tbody tr:hover {
  background: rgba(37, 99, 235, 0.1);
}

.satellite-table tbody tr.selected {
  background: rgba(37, 99, 235, 0.2);
  border-left: 3px solid var(--primary-color);
}

.satellite-table tbody tr.visible {
  background: rgba(16, 185, 129, 0.05);
}

/* Table cell content */
.satellite-name {
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.satellite-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  flex-shrink: 0;
}

.satellite-icon.iss {
  background: var(--error-color);
  animation: pulse-icon 2s infinite;
}

.satellite-icon.active {
  background: var(--accent-color);
}

.satellite-icon.inactive {
  background: var(--text-muted);
}

@keyframes pulse-icon {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-indicator.visible {
  background: var(--success-color);
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
}

.status-indicator.approaching {
  background: var(--warning-color);
  animation: blink 1.5s infinite;
}

.status-indicator.hidden {
  background: var(--text-muted);
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0.3; }
}

.status-text {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: capitalize;
}

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

.status-text.approaching {
  color: var(--warning-color);
}

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

/* Position data */
.position-data {
  font-family: 'Monaco', 'Menlo', monospace;
  font-size: 0.75rem;
  color: var(--text-primary);
}

.elevation-positive {
  color: var(--success-color);
  font-weight: 600;
}

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

.azimuth-corrected {
  color: var(--secondary-color);
  font-weight: 500;
}

/* Pass time data */
.pass-time {
  font-size: 0.75rem;
}

.pass-time.soon {
  color: var(--warning-color);
  font-weight: 600;
}

.pass-time.today {
  color: var(--accent-color);
}

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

/* Empty state */
.table-empty {
  padding: var(--spacing-xl);
  text-align: center;
  color: var(--text-muted);
}

/* Responsive design */
@media (max-width: 768px) {
  .table-header {
    flex-direction: column;
    align-items: stretch;
    gap: var(--spacing-md);
  }
  
  .satellite-table th,
  .satellite-table td {
    padding: var(--spacing-sm);
  }
  
  .satellite-table .hide-mobile {
    display: none;
  }
  
  .view-toggle {
    width: 100%;
  }
  
  .view-toggle-btn {
    flex: 1;
    text-align: center;
  }
}
