/**
 * @ioi-dev/vue-table/minimal
 *
 * Functional baseline styles. Provides readable structure without any design
 * opinions — no brand colours, no shadows, no rounded corners, no custom
 * fonts. Pair with `/unstyled` entry point to start from this baseline.
 *
 * Usage:
 *   import { Table } from '@ioi-dev/vue-table/unstyled';
 *   import '@ioi-dev/vue-table/minimal';
 */

.ioi-table {
  position: relative;
  width: 100%;
}

.ioi-table__viewport {
  width: 100%;
  overflow: auto;
}

.ioi-table__table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.ioi-table__header-content {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  font-weight: 600;
  text-align: left;
  box-sizing: border-box;
}

.ioi-table__cell {
  padding: 8px 12px;
  border-bottom: 1px solid #e2e8f0;
  box-sizing: border-box;
  vertical-align: middle;
}

.ioi-table__row {
  height: 36px;
}

.ioi-table__row:hover {
  background-color: rgba(0, 0, 0, 0.025);
}

.ioi-table thead th {
  position: sticky;
  top: 0;
  background-color: #ffffff;
  border-bottom: 1px solid #cbd5e1;
  z-index: 2;
  box-sizing: border-box;
}

.ioi-table__filter-row {
  position: sticky;
  top: var(--ioi-table-header-height, 36px);
  background-color: #ffffff;
  z-index: 1;
}

.ioi-table__filter-cell {
  padding: 0;
}

.ioi-table__filter-input,
.ioi-table__filter-select {
  width: 100%;
  padding: 4px 8px;
  border: 1px solid #cbd5e1;
  box-sizing: border-box;
  font: inherit;
  background-color: #ffffff;
}

.ioi-table__sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ioi-table__row:focus,
.ioi-table__cell:focus,
.ioi-table__cell--focused {
  outline: 2px solid #000000;
  outline-offset: -2px;
}

.ioi-table__resize-handle {
  cursor: col-resize;
  background: transparent;
  border: 0;
  padding: 0;
}

.ioi-table__resize-handle--disabled {
  cursor: default;
  pointer-events: none;
}

.ioi-table__sort-button {
  display: flex;
  align-items: center;
  flex: 1;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.ioi-table__loading-overlay,
.ioi-table__error-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(255, 255, 255, 0.9);
  z-index: 10;
}

.ioi-table__row--expanded {
  background-color: rgba(0, 0, 0, 0.02);
}

.ioi-table__expanded-content {
  padding: 0;
}

.ioi-table__empty {
  text-align: center;
  padding: 2rem;
  color: #94a3b8;
}

.ioi-table__pagination {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-top: 1px solid #e2e8f0;
  font-size: 0.8125rem;
}

.ioi-table__pagination-info {
  margin-right: auto;
  font-size: 0.8125rem;
}

.ioi-table__pagination-size {
  padding: 0.2rem 0.5rem;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font: inherit;
  font-size: 0.75rem;
  background: #ffffff;
  cursor: pointer;
}

.ioi-table__pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #ffffff;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.ioi-table__pagination-btn:hover:not(:disabled) {
  background: #f8fafc;
}

.ioi-table__pagination-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.ioi-table__pagination-pages {
  min-width: 3rem;
  text-align: center;
  font-size: 0.8125rem;
}
