/* Sanctions List Page - GroupMNK Inspired Design */

:root {
  --primary-teal: #106073;
  --accent-teal: #49bfb5;
  --light-teal: #0a9ba5;
  --mint-bg: #F3FFFE;
  --text-dark: #4a4a4a;
  --text-light: #6b6b6b;
  --white: #ffffff;
  --border-light: #e0e0e0;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* Header Section */
.sanctions-header {
  background: linear-gradient(135deg, var(--primary-teal) 0%, var(--light-teal) 100%);
  padding: 3rem 0 2.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.sanctions-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 50px 50px;
  opacity: 0.3;
}

.header-content {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.header-left {
  flex: 1;
  min-width: 250px;
}

.page-title {
  color: white;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.page-subtitle {
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  margin: 0;
  font-weight: 400;
  letter-spacing: 0.3px;
}

.header-right {
  display: flex;
  align-items: center;
}

.update-badge {
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: white;
  font-weight: 500;
  font-size: 0.95rem;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.update-badge:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.update-badge svg {
  color: var(--accent-teal);
}

/* Main Container */
.sanctions-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1rem 4rem;
}

/* Controls Section */
.controls-section {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-md);
}

.controls-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

/* Search Bar */
.search-wrapper {
  flex: 1;
  min-width: 300px;
  max-width: 600px;
}

.search-form {
  display: flex;
  gap: 0.75rem;
  align-items: stretch;
}

.search-input-group {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 1rem;
  color: var(--text-light);
  pointer-events: none;
  z-index: 1;
}

.search-input {
  width: 100%;
  padding: 0.875rem 3rem 0.875rem 3rem;
  border: 2px solid var(--border-light);
  border-radius: 8px;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  background: white;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-teal);
  box-shadow: 0 0 0 3px rgba(16, 96, 115, 0.1);
}

.clear-btn {
  position: absolute;
  right: 1rem;
  color: var(--text-light);
  cursor: pointer;
  font-size: 1.5rem;
  display: none;
  z-index: 1;
  transition: color 0.3s ease;
  line-height: 1;
}

.clear-btn:hover {
  color: var(--primary-teal);
}

.search-input:not(:placeholder-shown) ~ .clear-btn {
  display: block;
}

.btn-search {
  background: linear-gradient(135deg, var(--primary-teal) 0%, var(--light-teal) 100%);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 0.875rem 2rem;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}

.btn-search:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-search:active {
  transform: translateY(0);
}

/* Pagination Controls */
.pagination-controls {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.page-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.page-text {
  color: var(--text-dark);
  font-size: 0.95rem;
}

.page-text strong {
  color: var(--primary-teal);
  font-weight: 600;
}

.page-buttons {
  display: flex;
  gap: 0.5rem;
}

.btn-page {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border: 2px solid var(--primary-teal);
  background: white;
  color: var(--primary-teal);
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-page:hover:not(:disabled) {
  background: var(--primary-teal);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.btn-page:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  border-color: var(--border-light);
  color: var(--text-light);
}

.btn-page svg {
  width: 16px;
  height: 16px;
}

/* Results Info */
.results-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: var(--mint-bg);
  border-left: 4px solid var(--accent-teal);
  border-radius: 8px;
  margin-bottom: 1.5rem;
  color: var(--text-dark);
  font-size: 0.95rem;
}

.results-info svg {
  color: var(--accent-teal);
  flex-shrink: 0;
}

.results-info strong {
  color: var(--primary-teal);
  font-weight: 600;
}

/* Table Card */
.table-card {
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.table-responsive {
  overflow-x: auto;
}

/* Sanctions Table */
.sanctions-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.9rem;
}

.sanctions-table thead {
  background: linear-gradient(135deg, var(--primary-teal) 0%, var(--light-teal) 100%);
  color: white;
}

.sanctions-table thead th {
  padding: 1rem 1.25rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 10;
}

.sanctions-table tbody tr {
  border-bottom: 1px solid var(--border-light);
  transition: all 0.3s ease;
}

.sanctions-table tbody tr:hover {
  background: var(--mint-bg);
  transform: scale(1.01);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.sanctions-table tbody tr:last-child {
  border-bottom: none;
}

.sanctions-table tbody td {
  padding: 1rem 1.25rem;
  color: var(--text-dark);
  vertical-align: top;
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sanctions-table tbody td:first-child {
  font-weight: 600;
  color: var(--primary-teal);
}

/* Badges */
.badge-whitelist,
.badge-regular {
  display: inline-block;
  padding: 0.375rem 0.875rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.badge-whitelist {
  background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
  color: white;
}

.badge-regular {
  background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
  color: white;
}

/* No Results */
.no-results {
  text-align: center;
  padding: 4rem 2rem;
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
}

.no-results svg {
  color: var(--text-light);
  margin-bottom: 1.5rem;
  opacity: 0.5;
}

.no-results h3 {
  color: var(--text-dark);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.no-results p {
  color: var(--text-light);
  font-size: 1rem;
  margin: 0;
}

/* Custom Scrollbar */
.table-responsive::-webkit-scrollbar {
  height: 10px;
}

.table-responsive::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.table-responsive::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, var(--primary-teal) 0%, var(--light-teal) 100%);
  border-radius: 10px;
  transition: background 0.3s ease;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
  background: var(--primary-teal);
}

/* Responsive Design */
@media (max-width: 1200px) {
  .controls-wrapper {
    flex-direction: column;
    align-items: stretch;
  }

  .search-wrapper {
    max-width: 100%;
  }

  .pagination-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .page-buttons {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .sanctions-header {
    padding: 2rem 0 1.5rem;
  }

  .header-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-right {
    width: 100%;
  }

  .update-badge {
    width: 100%;
    justify-content: center;
  }

  .controls-section {
    padding: 1rem;
  }

  .search-form {
    flex-direction: column;
  }

  .btn-search {
    width: 100%;
    padding: 1rem;
  }

  .page-buttons {
    flex-direction: column;
    width: 100%;
  }

  .btn-page {
    width: 100%;
    justify-content: center;
  }

  .sanctions-table {
    font-size: 0.85rem;
  }

  .sanctions-table thead th,
  .sanctions-table tbody td {
    padding: 0.75rem 1rem;
  }
}

@media (max-width: 480px) {
  .page-title {
    font-size: 1.5rem;
  }

  .page-subtitle {
    font-size: 0.9rem;
  }

  .controls-section {
    padding: 0.75rem;
  }

  .results-info {
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
  }

  /* Card-style mobile table */
  .sanctions-table thead {
    display: none;
  }

  .sanctions-table tbody tr {
    display: block;
    margin-bottom: 1rem;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    overflow: hidden;
  }

  .sanctions-table tbody tr:hover {
    transform: none;
  }

  .sanctions-table tbody td {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-light);
    max-width: 100%;
  }

  .sanctions-table tbody td:last-child {
    border-bottom: none;
  }

  .sanctions-table tbody td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--primary-teal);
    margin-right: 1rem;
    flex-shrink: 0;
  }
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.table-card {
  animation: fadeIn 0.5s ease;
}

.controls-section {
  animation: fadeIn 0.4s ease;
}

.results-info {
  animation: fadeIn 0.4s ease 0.1s backwards;
}

/* Loading State */
.search-input:disabled,
.btn-search:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Focus Visible for Accessibility */
.btn-search:focus-visible,
.btn-page:focus-visible,
.search-input:focus-visible {
  outline: 3px solid var(--accent-teal);
  outline-offset: 2px;
}
