/**
 * Donation Inventory Table Styles
 * Provides elegant styling for category filters and sortable table
 */

/* Search Box Styles */
.search-box-wrapper {
  position: relative;
  margin-bottom: 25px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.search-input {
  width: 100%;
  padding: 15px 50px 15px 20px;
  font-size: 16px;
  border: 2px solid #e0e0e0;
  border-radius: 30px;
  outline: none;
  transition: all 0.3s ease;
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.search-input:focus {
  border-color: #667eea;
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.2);
  transform: translateY(-2px);
}

.search-input::placeholder {
  color: #999;
}

.search-icon {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  pointer-events: none;
  opacity: 0.5;
}

/* Category Filter Styles */
.category-filter-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
  padding: 20px;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.category-btn {
  padding: 10px 20px;
  background: #ffffff;
  border: 2px solid #e0e0e0;
  border-radius: 25px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.category-btn:hover {
  background: #f8f9fa;
  border-color: #007bff;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 123, 255, 0.2);
}

.category-btn.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-color: #667eea;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.category-btn.active:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.5);
}

.category-count {
  background: rgba(0, 0, 0, 0.1);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.category-btn.active .category-count {
  background: rgba(255, 255, 255, 0.3);
}

/* Table Container */
.table-responsive {
  overflow-x: auto;
  margin-top: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Donation Table Styles */
.donation-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  font-size: 15px;
}

.donation-table thead {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
}

.donation-table thead th {
  padding: 18px 20px;
  text-align: left;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
}

.donation-table thead th.sortable {
  cursor: pointer;
  user-select: none;
  transition: background 0.2s ease;
}

.donation-table thead th.sortable:hover {
  background: rgba(255, 255, 255, 0.1);
}

.donation-table thead th.sorted {
  background: rgba(255, 255, 255, 0.15);
}

.sort-indicator {
  display: inline-block;
  margin-left: 5px;
  font-size: 12px;
  color: #ffffff;
}

.donation-table tbody tr {
  border-bottom: 1px solid #e9ecef;
  transition: all 0.2s ease;
}

.donation-table tbody tr:hover {
  background: linear-gradient(90deg, #f8f9fa 0%, #e9ecef 100%);
  transform: scale(1.01);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

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

.donation-table tbody td {
  padding: 16px 20px;
  color: #333;
}

.item-description {
  font-weight: 500;
  color: #2c3e50;
}

.item-category {
  color: #667eea;
  font-weight: 500;
  font-size: 14px;
}

.no-results {
  text-align: center;
  padding: 40px 20px !important;
  color: #999;
  font-style: italic;
  font-size: 16px;
}

/* Stats Card Styling */
.inventory-stats {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.stat-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 25px 40px;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  min-width: 200px;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(102, 126, 234, 0.4);
}

.stat-number {
  font-size: 48px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1;
  margin-bottom: 10px;
}

.stat-label {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
  .category-filter-container {
    padding: 15px;
    gap: 8px;
  }

  .category-btn {
    padding: 8px 16px;
    font-size: 13px;
  }

  .donation-table {
    font-size: 14px;
  }

  .donation-table thead th,
  .donation-table tbody td {
    padding: 12px 15px;
  }

  .stat-card {
    padding: 20px 30px;
    min-width: 150px;
  }

  .stat-number {
    font-size: 36px;
  }

  .stat-label {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .category-filter-container {
    flex-direction: column;
  }

  .category-btn {
    width: 100%;
    justify-content: space-between;
  }

  .donation-table thead th,
  .donation-table tbody td {
    padding: 10px;
    font-size: 13px;
  }

  .stat-card {
    width: 100%;
  }
}

/* Animation for table load */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.donation-table tbody tr {
  animation: fadeInUp 0.3s ease forwards;
}

.donation-table tbody tr:nth-child(1) { animation-delay: 0.05s; }
.donation-table tbody tr:nth-child(2) { animation-delay: 0.1s; }
.donation-table tbody tr:nth-child(3) { animation-delay: 0.15s; }
.donation-table tbody tr:nth-child(4) { animation-delay: 0.2s; }
.donation-table tbody tr:nth-child(5) { animation-delay: 0.25s; }

/* Scrollbar Styling */
.table-responsive::-webkit-scrollbar {
  height: 8px;
}

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

.table-responsive::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 10px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* Donation Info Section Styles */
.donation-info-section {
  background: #f8f9fa;
  padding: 30px;
  border-radius: 8px;
  margin-bottom: 30px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.donation-info-section h3 {
  color: #333;
  font-size: 24px;
  font-weight: 600;
  margin-top: 25px;
  margin-bottom: 15px;
}

.donation-info-section h3:first-child {
  margin-top: 0;
}

.donation-info-section p {
  font-size: 16px;
  line-height: 1.7;
  color: #555;
  margin-bottom: 15px;
}

.donation-info-section p.lead {
  font-size: 18px;
  font-weight: 400;
  color: #444;
  margin-bottom: 20px;
}

.donation-benefits {
  list-style: none;
  padding-left: 0;
  margin: 20px 0;
}

.donation-benefits li {
  padding: 12px 0 12px 30px;
  position: relative;
  font-size: 16px;
  line-height: 1.6;
  color: #555;
}

.donation-benefits li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #4CAF50;
  font-weight: bold;
  font-size: 20px;
}

.donation-benefits li strong {
  color: #333;
}

.donation-info-section a {
  color: #007bff;
  text-decoration: none;
  font-weight: 500;
}

.donation-info-section a:hover {
  color: #0056b3;
  text-decoration: underline;
}