@use '../../../shared/styles/settings-shared' as settings;

.main-container {
  @include settings.settings-page-container;
}

@include settings.settings-page-header;

.settings-title {
  @include settings.settings-page-title;
  margin-bottom: 0.75rem;
}

.settings-description {
  @include settings.settings-page-description;
}

.settings-card {
  @include settings.settings-card;
  gap: 1rem;
}

.section-header {
  @include settings.settings-section-header;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.section-title {
  @include settings.settings-section-title;
}

.section-body {
  @include settings.settings-section-body;
  padding-left: 0;
}

.filter-controls {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

::ng-deep .action-filter {
  min-width: 180px;
}

::ng-deep .user-filter {
  min-width: 140px;
}

::ng-deep .date-range-filter {
  min-width: 220px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--p-content-border-color);
  border-radius: 6px;
  background: transparent;
  color: var(--p-text-muted-color);
  cursor: pointer;
  transition: all 0.2s;

  &:hover {
    background: var(--p-content-hover-background);
    color: var(--p-text-color);
  }

  &.active {
    background: color-mix(in srgb, var(--p-primary-color) 15%, transparent);
    color: var(--p-primary-color);
    border-color: var(--p-primary-color);
  }
}

::ng-deep .p-datatable-table {
  table-layout: fixed;
}


.timestamp-cell {
  white-space: nowrap;
  font-size: 0.875rem;
  color: var(--p-text-muted-color);
  cursor: default;
}

.description-cell {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;

  &.expanded {
    white-space: normal;
    word-break: break-word;
  }
}

.ip-cell {
  font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
  font-size: 0.8rem;
  color: var(--p-text-muted-color);
}

.flag-emoji {
  font-size: 1.15rem;
  margin-right: 0.25rem;
  vertical-align: middle;
}

::ng-deep .p-datatable.p-datatable-sm .p-datatable-tbody > tr > td.empty-message {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--p-text-muted-color);

  .pi {
    display: block;
    font-size: 2rem;
    margin-bottom: 0.5rem;
  }
}
