/**
 * Redirects Manager Styles
 * Full page table view with premium design
 */

/* Page Container */
.prorank-redirects-manager {
  padding: 20px;
  max-width: 1400px;
  margin: 0 auto;
}

/* Page Header */
.prorank-redirects-manager .prorank-page-header {
  margin-bottom: 32px;
}

.prorank-redirects-manager .prorank-page-header h1 {
  font-size: 32px;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--pr-gray-900, #18181b);
}

.prorank-redirects-manager .prorank-page-description {
  font-size: 16px;
  color: var(--pr-gray-600, #52525b);
  margin: 0;
}

/* Controls Bar */
.prorank-controls-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}

.prorank-controls-left {
  display: flex;
  gap: 12px;
  flex: 1;
  min-width: 300px;
}

.prorank-controls-right {
  display: flex;
  gap: 12px;
}

/* Search Control */
.prorank-search-control {
  min-width: 250px;
}

.prorank-filter-control {
  min-width: 150px;
}

/* Table Card */
.prorank-table-card {
  border: 1px solid var(--pr-gray-200, #e4e4e7);
  border-radius: 12px;
  box-shadow: var(--pr-shadow-xs, 0 1px 3px 0 rgb(0 0 0 / 4%));
  overflow: hidden;
}

.prorank-table-card .components-card__body {
  padding: 0;
}

/* Table Styles */
.prorank-redirects-table {
  width: 100%;
  border-collapse: collapse;
}

.prorank-redirects-table th,
.prorank-redirects-table td {
  text-align: left;
  padding: 16px;
  border-bottom: 1px solid var(--pr-gray-100, #f4f4f5);
}

.prorank-redirects-table th {
  background: var(--pr-gray-50, #fafafa);
  font-weight: 600;
  font-size: 14px;
  color: var(--pr-gray-700, #3f3f46);
}

.prorank-redirects-table tr:hover {
  background: var(--pr-gray-50, #fafafa);
}

/* URL Cell */
.prorank-url-cell {
  font-family: monospace;
  font-size: 13px;
  color: var(--pr-gray-800, #27272a);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Regex Badge */
.prorank-regex-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 6px;
  background: var(--pr-accent-purple, #3b82f6);
  color: white;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  font-family: monospace;
}

/* Status Badge */
.prorank-status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.prorank-status-badge--active {
  background: rgb(16 185 129 / 10%);
  color: var(--pr-accent-green, #10b981);
  border: 1px solid rgb(16 185 129 / 20%);
}

.prorank-status-badge--inactive {
  background: var(--pr-gray-100, #f4f4f5);
  color: var(--pr-gray-600, #52525b);
  border: 1px solid var(--pr-gray-200, #e4e4e7);
}

/* Pro Badge */
.prorank-pro-badge {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 6px;
  background: var(--pr-accent-purple, #3b82f6);
  color: white;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  vertical-align: middle;
}

/* Actions */
.prorank-actions {
  display: flex;
  gap: 8px;
}

.prorank-actions .components-button {
  padding: 4px 8px;
  font-size: 13px;
}

/* Loading State */
.prorank-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  gap: 16px;
}

/* Bulk Actions */
.prorank-bulk-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: var(--pr-gray-50, #fafafa);
  border: 1px solid var(--pr-gray-200, #e4e4e7);
  border-radius: 8px;
  margin-bottom: 16px;
}

.prorank-selected-count {
  font-weight: 500;
  color: var(--pr-gray-700, #3f3f46);
}

.prorank-bulk-controls {
  display: flex;
  gap: 8px;
}

/* Pagination */
.prorank-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-top: 1px solid var(--pr-gray-100, #f4f4f5);
}

.prorank-pagination-info {
  color: var(--pr-gray-600, #52525b);
  font-size: 14px;
}

.prorank-pagination-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.prorank-page-number {
  min-width: 36px;
  height: 36px;
  padding: 0;
  justify-content: center;
  font-size: 14px;
}

.prorank-page-number.is-current {
  background: var(--pr-primary, #2563eb);
  color: white;
  border-color: var(--pr-primary, #2563eb);
}

.prorank-page-dots {
  padding: 0 8px;
  color: var(--pr-gray-400, #a1a1aa);
}

/* Modal Styles */
.prorank-redirect-edit-modal {
  max-width: 600px;
  width: 100%;
}

.prorank-redirect-edit-overlay {
  z-index: 100000;
}

.prorank-redirect-form {
  padding: 20px;
}

.prorank-redirect-form > * + * {
  margin-top: 20px;
}

.prorank-field-error {
  color: var(--pr-accent-red, #ef4444);
  font-size: 13px;
  margin-top: 4px;
  display: block;
}

.prorank-redirect-form .has-error input {
  border-color: var(--pr-accent-red, #ef4444);
}

.prorank-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--pr-gray-200, #e4e4e7);
}

/* Responsive Design */
@media (width <= 768px) {
  .prorank-controls-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .prorank-controls-left,
  .prorank-controls-right {
    width: 100%;
    flex-direction: column;
  }

  .prorank-redirects-table {
    font-size: 14px;
  }

  .prorank-redirects-table th,
  .prorank-redirects-table td {
    padding: 12px 8px;
  }

  /* Hide less important columns on mobile */
  .prorank-redirects-table th:nth-child(6),
  .prorank-redirects-table td:nth-child(6),
  .prorank-redirects-table th:nth-child(7),
  .prorank-redirects-table td:nth-child(7) {
    display: none;
  }

  .prorank-pagination {
    flex-direction: column;
    gap: 16px;
  }
}
