/**
 * Redirects Tab Styles
 * Adapted for tab context within Technical SEO
 */

/* Wrapper to contain redirects within tab */
.prorank-redirects-settings-wrapper {
  padding: 20px;
}

/* Tabs Navigation */
.prorank-redirects-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid #e5e7eb;
}

.prorank-redirects-tabs .components-button {
  border-radius: 6px 6px 0 0;
  padding: 10px 20px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.prorank-redirects-tabs .components-button.is-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  border-color: transparent;
  box-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
}

/* Tools Bar */
.prorank-redirects-tools {
  margin-bottom: 20px;
  background: #f9fafb;
}

/* Chain Detection Notice */
.components-notice ul {
  margin: 8px 0 0 20px;
}

.components-notice li {
  margin: 4px 0;
}

/* Header Section */
.prorank-redirects-header {
  margin-bottom: 24px;
}

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

.prorank-redirects-header p {
  font-size: 14px;
  color: var(--pr-gray-600, #52525b);
  margin: 0;
}

/* Dark theme header colors */
body.admin-color-midnight .prorank-redirects-header h3,
body.admin-color-ocean .prorank-redirects-header h3,
body.admin-color-ectoplasm .prorank-redirects-header h3,
body.admin-color-coffee .prorank-redirects-header h3,
body.admin-color-blue .prorank-redirects-header h3,
body.admin-color-modern .prorank-redirects-header h3 {
  color: var(--pr-gray-100, #f4f4f5);
}

body.admin-color-midnight .prorank-redirects-header p,
body.admin-color-ocean .prorank-redirects-header p,
body.admin-color-ectoplasm .prorank-redirects-header p,
body.admin-color-coffee .prorank-redirects-header p,
body.admin-color-blue .prorank-redirects-header p,
body.admin-color-modern .prorank-redirects-header p {
  color: var(--pr-gray-400, #a1a1aa);
}

/* Filters Card */
.prorank-redirects-filters {
  margin-bottom: 20px;
  border-radius: 8px;
}

.prorank-redirects-filters .components-card__body {
  padding: 16px;
}

/* Table Card */
.prorank-redirects-table-card {
  border-radius: 8px;
  overflow: hidden;
}

.prorank-redirects-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: 12px 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: 13px;
  color: var(--pr-gray-700, #3f3f46);
}

/* Dark theme table header */
body.admin-color-midnight .prorank-redirects-table th,
body.admin-color-ocean .prorank-redirects-table th,
body.admin-color-ectoplasm .prorank-redirects-table th,
body.admin-color-coffee .prorank-redirects-table th,
body.admin-color-blue .prorank-redirects-table th,
body.admin-color-modern .prorank-redirects-table th {
  background: var(--pr-gray-800, #27272a);
  color: var(--pr-gray-200, #e4e4e7);
}

body.admin-color-midnight .prorank-redirects-table td,
body.admin-color-ocean .prorank-redirects-table td,
body.admin-color-ectoplasm .prorank-redirects-table td,
body.admin-color-coffee .prorank-redirects-table td,
body.admin-color-blue .prorank-redirects-table td,
body.admin-color-modern .prorank-redirects-table td {
  border-color: var(--pr-gray-700, #3f3f46);
}

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

body.admin-color-midnight .prorank-redirects-table tr:hover,
body.admin-color-ocean .prorank-redirects-table tr:hover,
body.admin-color-ectoplasm .prorank-redirects-table tr:hover,
body.admin-color-coffee .prorank-redirects-table tr:hover,
body.admin-color-blue .prorank-redirects-table tr:hover,
body.admin-color-modern .prorank-redirects-table tr:hover {
  background: var(--pr-gray-800, #27272a);
}

/* Check column */
.prorank-check-column {
  width: 40px;
}

/* URL styles */
.prorank-redirects-table code {
  font-family: monospace;
  font-size: 12px;
  color: var(--pr-gray-800, #27272a);
  background: var(--pr-gray-100, #f4f4f5);
  padding: 2px 6px;
  border-radius: 3px;
}

body.admin-color-midnight .prorank-redirects-table code,
body.admin-color-ocean .prorank-redirects-table code,
body.admin-color-ectoplasm .prorank-redirects-table code,
body.admin-color-coffee .prorank-redirects-table code,
body.admin-color-blue .prorank-redirects-table code,
body.admin-color-modern .prorank-redirects-table code {
  color: var(--pr-gray-200, #e4e4e7);
  background: var(--pr-gray-700, #3f3f46);
}

/* Regex Badge */
.prorank-regex-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 6px;
  margin-left: 8px;
  background: var(--pr-accent-blue, #3b82f6);
  color: white;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

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

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

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

/* Locked columns */
.prorank-locked-column {
  opacity: 0.6;
  font-style: italic;
}

/* Empty state */
.prorank-redirects-empty {
  text-align: center;
  padding: 60px 20px;
}

.prorank-redirects-empty p {
  margin-bottom: 20px;
  font-size: 16px;
  color: var(--pr-gray-600, #52525b);
}

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

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

body.admin-color-midnight .prorank-redirects-pagination,
body.admin-color-ocean .prorank-redirects-pagination,
body.admin-color-ectoplasm .prorank-redirects-pagination,
body.admin-color-coffee .prorank-redirects-pagination,
body.admin-color-blue .prorank-redirects-pagination,
body.admin-color-modern .prorank-redirects-pagination {
  border-color: var(--pr-gray-700, #3f3f46);
}

/* 404 Monitor Card */
.prorank-404-monitor-card {
  margin-top: 24px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(115, 102, 240, 0.05) 0%, rgba(236, 72, 153, 0.05) 100%);
}

.prorank-404-monitor-card.prorank-locked {
  opacity: 0.9;
}

.prorank-404-monitor-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

/* Action buttons */
.prorank-redirects-table .components-button.is-small {
  padding: 4px 8px;
  font-size: 12px;
  min-height: 28px;
}

/* Modal override for tab context */
.prorank-redirect-edit-modal {
  max-width: 600px;
  width: 90%;
}

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

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

/* Responsive adjustments for tab context */
@media (max-width: 1200px) {
  .prorank-redirects-settings-wrapper {
    padding: 16px;
  }
  
  .prorank-redirects-table th,
  .prorank-redirects-table td {
    padding: 10px 12px;
    font-size: 13px;
  }
  
  /* Hide less important columns on smaller screens */
  .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;
  }
}
