/* Activity Log Table Styles */
.activity-log-table-container {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md, 0.75rem);
  border: 2px solid var(--border-color, #e5e5e5);
}

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

.activity-log-table thead {
  background: linear-gradient(135deg, #f21b23 0%, #d91820 100%);
}

.activity-log-table th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  color: white;
  border-bottom: 2px solid var(--border-color, #e5e5e5);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

.activity-log-table th:hover {
  background: rgba(255, 255, 255, 0.1);
}

.activity-log-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color, #e5e5e5);
  color: var(--text-secondary, #4d4d4f);
}

/* Allow long text (form name, description) to wrap so all data is visible */
.activity-log-table td.activity-log-cell-wrap {
  white-space: normal;
  word-break: break-word;
  max-width: 20rem;
  min-width: 10rem;
}

.activity-log-table tbody tr {
  transition: background var(--transition-fast, 0.2s ease);
}

.activity-log-table tbody tr:hover {
  background: var(--hover-overlay, #e5e5e5);
}

.no-activities {
  text-align: center;
  padding: 2rem;
  color: var(--text-secondary, #4d4d4f);
  font-style: italic;
}

/* Night mode: dark theme */
.night-mode .activity-log-table-container {
  border-color: rgba(255, 255, 255, 0.15);
}

.night-mode .activity-log-table th {
  border-bottom-color: rgba(255, 255, 255, 0.2);
}

.night-mode .activity-log-table td {
  border-bottom-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.85);
}

.night-mode .activity-log-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.08);
}

.night-mode .no-activities {
  color: rgba(255, 255, 255, 0.7);
}

@media (max-width: 768px) {
  .night-mode .activity-log-table tbody tr {
    background: #3a3838;
    border-color: rgba(255, 255, 255, 0.12);
  }

  .night-mode .activity-log-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
  }

  .night-mode .activity-log-table td {
    border-bottom-color: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.85);
  }

  .night-mode .activity-log-table td::before {
    color: rgba(255, 255, 255, 0.9);
  }
}

/* Mobile: card layout per row */
@media (max-width: 768px) {
  .activity-log-table-container {
    overflow-x: visible;
    border: none;
    border-radius: 0;
  }

  .activity-log-table,
  .activity-log-table thead,
  .activity-log-table tbody,
  .activity-log-table tr,
  .activity-log-table th,
  .activity-log-table td {
    display: block;
  }

  .activity-log-table thead {
    position: absolute;
    clip: rect(0, 0, 0, 0);
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    border: 0;
  }

  .activity-log-table tbody tr {
    background: var(--bg-card, #fff);
    border: 2px solid var(--border-color, #e5e5e5);
    border-radius: var(--radius-md, 0.75rem);
    margin-bottom: var(--spacing-md, 1rem);
    padding: var(--spacing-sm, 0.75rem);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  }

  .activity-log-table tbody tr:hover {
    background: var(--bg-card, #fff);
    box-shadow: 0 2px 12px rgba(242, 27, 35, 0.15);
  }

  .activity-log-table td {
    padding: 0.5rem 0 0.75rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    color: var(--text-secondary, #4d4d4f);
    font-size: 0.875rem;
  }

  .activity-log-table td:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }

  .activity-log-table td::before {
    content: attr(data-label);
    display: block;
    font-weight: 600;
    color: var(--text-primary, #4d4d4f);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
  }

  .activity-log-table .no-activities {
    display: block;
    padding: 1.5rem;
  }
}

