/* ── Table Widget ───────────────────────────────────────────────────────── */

/* Search */
.pkae-table-search-wrap { margin-bottom: 16px; }
.pkae-table-search {
  width: 100%;
  padding: 8px 14px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: .9rem;
  outline: none;
  transition: border-color .2s;
  box-sizing: border-box;
}
.pkae-table-search:focus { border-color: #6040e0; }

/* Scroll wrapper */
.pkae-table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Table */
.pkae-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}

/* Header */
.pkae-table thead th {
  background: #6040e0;
  color: #fff;
  padding: 14px 16px;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid #e5e5e5;
  position: relative;
  user-select: none;
}

/* Sortable */
.pkae-table--sortable thead th { cursor: pointer; }
.pkae-table--sortable thead th:hover { background: #4f32c0; }
.pkae-sort-icon { margin-left: 6px; font-size: .75em; opacity: .6; }
.pkae-table thead th.pkae-sort-asc  .pkae-sort-icon::after { content: ' ↑'; }
.pkae-table thead th.pkae-sort-desc .pkae-sort-icon::after { content: ' ↓'; }

/* Body */
.pkae-table tbody td,
.pkae-table tbody th {
  padding: 12px 16px;
  border: 1px solid #e5e5e5;
  vertical-align: middle;
}
.pkae-table tbody tr { background: #fff; transition: background .2s; }

/* Striped */
.pkae-table--striped tbody tr:nth-child(odd) { background: #f8f7ff; }

/* Hover */
.pkae-table--hover tbody tr:hover { background: #ede9ff; }

/* Footer */
.pkae-table tfoot th {
  background: #f5f5f5;
  padding: 12px 16px;
  font-weight: 600;
  border: 1px solid #e5e5e5;
}

/* Cell icon */
.pkae-cell-icon {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  margin-right: 6px;
}
.pkae-cell-icon i   { font-size: inherit; line-height: 1; }
.pkae-cell-icon svg { width: 1em; height: 1em; display: inline-block; vertical-align: middle; fill: currentColor; }

/* Hidden rows (search) */
.pkae-table tbody tr.pkae-hidden { display: none; }

/* Links in cells */
.pkae-table td a { color: #6040e0; text-decoration: none; }
.pkae-table td a:hover { text-decoration: underline; }

/* ── Pagination ─────────────────────────────────────────────────────────── */
.pkae-table-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 12px;
  justify-content: flex-end;
}
.pkae-table-page-btn {
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
  color: #333;
  font-size: .85rem;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
  line-height: 1;
}
.pkae-table-page-btn:hover:not(.pkae-disabled) { background: #6040e0; color: #fff; border-color: #6040e0; }
.pkae-table-page-btn.pkae-active { background: #6040e0; color: #fff; border-color: #6040e0; font-weight: 700; }
.pkae-table-page-btn.pkae-disabled { opacity: .4; cursor: default; }

/* ── Cell Image ─────────────────────────────────────────────────────────── */
.pkae-cell-img {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  margin-right: 6px;
}
.pkae-cell-img img {
  display: block;
  width: 32px;
  height: auto;
  object-fit: cover;
  vertical-align: middle;
}
