/* All Posts Table styles */
.ap-container {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

.ap-controls {
  display: flex;
  justify-content: space-between; /* pushes left and right sections apart */
  align-items: center;
  margin-bottom: 0.75rem;
  gap: 0.1rem;
}

.ap-left-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ap-right-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ap-label {
  font-size: 0.9rem;
}

.ap-input, .ap-select, .ap-button, .ap-reset-button {
  padding: 0.5rem 0.6rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.95rem;
}

.ap-input {
  min-width: 300px;
}

.ap-button {
  background: #111827;
  color: #ffffff;
  cursor: pointer;
  transition: transform 0.05s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.ap-button:hover, .ap-reset-button:hover {
  transform: translateY(-1px);
}
.ap-reset-button {
  background: #f5f5f5;
  color: #111;
  cursor: pointer;
  transition: transform 0.05s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}


.ap-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.ap-table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
}

.ap-table thead th {
  text-align: left;
  font-weight: 600;
  padding: 10px 12px;
  border-bottom: 2px solid #e5e7eb;
}

.ap-table tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5f9;
}

/* Zebra striping for odd rows */
.ap-table tbody tr:nth-child(odd) {
  background: #f5f5f5;
}

/* Sortable header links */
.ap-table thead th a {
  text-decoration: none;
  color: #111827;
}

/* Pagination styles */
.ap-pagination ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0;
  margin-top: 12px;
}

.ap-pagination li a, .ap-pagination li span {
  display: inline-block;
  padding: 6px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  text-decoration: none;
}

.ap-pagination li .current {
  background: #111827;
  color: #fff;
  border-color: #111827;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Responsive labels for small screens */
@media (max-width: 640px) {
  .ap-table thead {
    display: none;
  }
  .ap-table tbody tr {
    display: grid;
    grid-template-columns: 1fr;
    padding: 8px 10px;
  }
  .ap-table tbody td {
    display: flex;
    justify-content: inherit;
    border-bottom: none;
    padding: 6px 0;
  }
  .ap-table tbody td::before {
    content: attr(data-label);
    font-weight: 600;
    margin-right: 12px;
  }
  td, th {
    border-width: 0;
}
  .ap-controls {
    flex-direction: column; /* Stack vertically */
    align-items: stretch;   /* Stretch children horizontally */
    gap: 0.5rem;
  }
  .ap-left-controls,
  .ap-right-controls {
    flex-direction: column; /* Stack inner items vertically */
    align-items: stretch;   /* Stretch inner children full width */
    gap: 0.5rem;
  }
  .ap-left-controls input[type="search"],
  .ap-left-controls button,
  .ap-right-controls select {
    width: 100%; /* Buttons and inputs full width */
    box-sizing: border-box; /* Include padding inside width */
  }
}
