/* Hub Page Styles */
@import '../common/styles.css';

.hub-container {
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.hidden {
  display: none !important;
}

/* Header */
.hub-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.hub-header h1 {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary-color, #323130);
}

/* Week Navigation */
.week-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.week-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 180px;
}

.week-label {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary-color, #323130);
}

.week-dates {
  font-size: 13px;
  color: var(--text-secondary-color, #605e5c);
}

/* Time Card Status */
.timecard-status {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  padding: 12px 16px;
  background-color: var(--hover-background-color, rgba(128, 128, 128, 0.1));
  border-radius: 4px;
}

.status-total {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary-color, #323130);
}

/* Time Card Grid */
.timecard-grid {
  overflow-x: auto;
  margin-bottom: 20px;
}

.timecard-table {
  min-width: 800px;
}

.timecard-table th,
.timecard-table td {
  padding: 10px 8px;
  text-align: center;
  vertical-align: middle;
}

.col-project {
  text-align: left !important;
  min-width: 200px;
}

.col-day {
  width: 70px;
}

.col-total {
  width: 70px;
  background-color: var(--hover-background-color, rgba(128, 128, 128, 0.1));
}

.col-day.today {
  background-color: var(--communication-background, rgba(0, 120, 212, 0.1));
}

/* Project/Task display */
.project-name {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-primary-color, #323130);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-name {
  font-size: 12px;
  color: var(--text-secondary-color, #605e5c);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Day headers */
.timecard-table th.col-day {
  font-size: 12px;
  line-height: 1.3;
}

.timecard-table th.col-day small {
  font-weight: normal;
  color: var(--text-secondary-color, #605e5c);
}

.timecard-table th.col-day.today {
  background-color: var(--communication-background, rgba(0, 120, 212, 0.1));
  color: var(--communication-foreground, #0078d4);
}

/* Totals row */
.totals-row {
  background-color: var(--hover-background-color, rgba(128, 128, 128, 0.1));
  font-weight: 600;
}

.totals-row td {
  border-top: 2px solid var(--border-color, #edebe9);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  background-color: var(--hover-background-color, rgba(128, 128, 128, 0.1));
  border-radius: 8px;
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.empty-state h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary-color, #323130);
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--text-secondary-color, #605e5c);
}

/* Loading */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  gap: 16px;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border-color, #edebe9);
  border-top-color: var(--communication-foreground, #0078d4);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Settings Required State */
#settings-required .empty-state {
  max-width: 400px;
  margin: 60px auto;
}

/* Responsive */
@media (max-width: 768px) {
  .hub-container {
    padding: 12px;
  }

  .hub-header h1 {
    font-size: 20px;
  }

  .week-nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .timecard-grid {
    margin: 0 -12px;
    padding: 0 12px;
  }
}
