/* ====================================================================== */
/* Help Wanted Quests (HWQ) Styles                                       */
/* Custom styling for HWQ dashboard section                              */
/* ====================================================================== */

/* ============================================================================ */
/* ------------------- HWQ Stats Grid ------------------- */
/* ============================================================================ */

.hwq-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding: 0 0.5rem;
}

@media (max-width: 768px) {
  .hwq-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 0;
  }
}

@media (max-width: 480px) {
  .hwq-stats-grid {
    grid-template-columns: 1fr;
  }
}

.hwq-stat-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(26, 26, 26, 0.95), rgba(20, 20, 20, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.hwq-stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--stat-gradient);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.hwq-stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  border-color: rgba(255, 255, 255, 0.15);
}

.hwq-stat-card:hover::before {
  opacity: 1;
}

.hwq-stat-card.completed {
  --stat-gradient: linear-gradient(90deg, #4caf50, #2e7d32);
}

.hwq-stat-card.expired {
  --stat-gradient: linear-gradient(90deg, #f44336, #c62828);
}

.hwq-stat-card.total {
  --stat-gradient: linear-gradient(90deg, #2196f3, #1565c0);
}

.hwq-stat-card.completion-rate {
  --stat-gradient: linear-gradient(90deg, #9c27b0, #6a1b9a);
}

.hwq-stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 14px;
  background: var(--stat-gradient);
  box-shadow: 0 4px 16px rgba(var(--stat-color-rgb), 0.3);
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.hwq-stat-card:hover .hwq-stat-icon {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(var(--stat-color-rgb), 0.4);
}

.hwq-stat-icon i {
  font-size: 1.75rem;
  color: white;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.hwq-stat-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
  min-width: 0;
}

.hwq-stat-content h3 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  line-height: 1;
  letter-spacing: -0.02em;
}

.hwq-stat-content p {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Color variables for stat cards */
.hwq-stat-card.completed {
  --stat-color-rgb: 76, 175, 80;
}

.hwq-stat-card.expired {
  --stat-color-rgb: 244, 67, 54;
}

.hwq-stat-card.total {
  --stat-color-rgb: 33, 150, 243;
}

.hwq-stat-card.completion-rate {
  --stat-color-rgb: 156, 39, 176;
}

/* ============================================================================ */
/* ------------------- HWQ Filters ------------------- */
/* ============================================================================ */

.hwq-filter-container .search-filter-bar {
  background: linear-gradient(135deg, rgba(26, 26, 26, 0.95), rgba(20, 20, 20, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(10px);
  gap: 1rem;
}

.hwq-filter-container .search-filter-control label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.7);
}

.hwq-filter-container .search-filter-control input,
.hwq-filter-container .search-filter-control select {
  background: rgba(26, 26, 26, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  color: #ffffff;
}

.hwq-filter-container .search-filter-control input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.hwq-filter-container .search-filter-control input:focus,
.hwq-filter-container .search-filter-control select:focus {
  background: rgba(26, 26, 26, 1);
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(var(--accent-color-rgb), 0.15);
}

.hwq-filter-container .search-filter-control select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2300A3DA' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 2.5rem;
}

.hwq-filter-container .clear-filters-btn {
  justify-self: flex-end;
  align-self: flex-end;
  padding: 0.875rem 1.5rem;
  background: linear-gradient(135deg, rgba(244, 67, 54, 0.15), rgba(244, 67, 54, 0.08));
  border: 1px solid rgba(244, 67, 54, 0.3);
  border-radius: 10px;
  color: #f44336;
  font-size: 0.95rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.hwq-filter-container .clear-filters-btn:hover {
  background: linear-gradient(135deg, rgba(244, 67, 54, 0.25), rgba(244, 67, 54, 0.15));
  border-color: rgba(244, 67, 54, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(244, 67, 54, 0.2);
}

/* ============================================================================ */
/* ------------------- HWQ Results Info ------------------- */
/* ============================================================================ */

.hwq-results-info {
  text-align: center;
  padding: 1rem 1.5rem;
  margin: 1rem 1.5rem 1.5rem 1.5rem;
  background: linear-gradient(135deg, rgba(0, 163, 218, 0.1), rgba(0, 242, 254, 0.1));
  border: 1px solid rgba(0, 163, 218, 0.2);
  border-radius: 12px;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 15px rgba(0, 163, 218, 0.1);
  animation: slideInDown 0.3s ease-out;
}

.hwq-results-info p {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.5;
}

.hwq-results-info strong {
  color: var(--accent-color);
  font-weight: 700;
}

/* ============================================================================ */
/* ------------------- HWQ Pagination ------------------- */
/* ============================================================================ */

.hwq-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  padding: 1.5rem;
  width: 100%;
  margin: 1rem 0 3rem 0;
  background: rgba(20, 20, 20, 0.7);
  border: 1px solid rgba(75, 75, 75, 0.3);
  border-radius: var(--card-radius);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hwq-pagination-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 0.5rem;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  height: 2.5rem;
  min-width: 2.5rem;
  padding: 0 1rem;
  transition: all 0.2s ease;
  text-align: center;
}

.hwq-pagination-button:hover:not(:disabled) {
  border-color: var(--botw-blue);
  color: var(--text-primary);
  background: #4a4f5b;
}

.hwq-pagination-button:active:not(:disabled) {
  transform: scale(0.98);
}

.hwq-pagination-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.hwq-page-info {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  padding: 0 0.5rem;
}

/* ============================================================================ */
/* ------------------- Responsive Design ------------------- */
/* ============================================================================ */

@media (max-width: 1024px) {
  .hwq-pagination {
    padding: 1.25rem;
    margin: 1rem 0 2.5rem 0;
  }
  
  .hwq-pagination-button {
    height: 2.25rem;
    min-width: 2.25rem;
    padding: 0 0.75rem;
    font-size: 0.85rem;
  }
  
  .hwq-page-info {
    font-size: 0.85rem;
  }
}

@media (max-width: 1024px) {
  .hwq-filter-container .search-filter-bar {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

@media (max-width: 768px) {
  .hwq-filter-container .search-filter-bar {
    padding: 1rem;
    gap: 0.75rem;
    grid-template-columns: 1fr;
  }
  
  .hwq-filter-container .search-filter-control {
    width: 100%;
  }
  
  .hwq-filter-container .clear-filters-btn {
    width: 100%;
    justify-content: center;
  }
  
  .hwq-pagination {
    padding: 1rem;
    margin: 0.75rem 0 2rem 0;
    gap: 0.4rem;
  }
  
  .hwq-pagination-button {
    height: 2rem;
    min-width: 2rem;
    padding: 0 0.6rem;
    font-size: 0.8rem;
    border-radius: 0.4rem;
  }
  
  .hwq-page-info {
    font-size: 0.8rem;
  }
}

@media (max-width: 640px) {
  .hwq-pagination {
    padding: 0.75rem;
    margin: 0.75rem 0;
    gap: 0.3rem;
  }
  
  .hwq-pagination-button {
    height: 1.75rem;
    min-width: 1.75rem;
    padding: 0 0.5rem;
    font-size: 0.75rem;
    border-radius: 0.35rem;
  }
  
  .hwq-page-info {
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  .hwq-pagination {
    padding: 0.5rem;
    margin: 0.5rem 0;
    gap: 0.25rem;
  }
  
  .hwq-pagination-button {
    height: 1.5rem;
    min-width: 1.5rem;
    padding: 0 0.4rem;
    font-size: 0.7rem;
    border-radius: 0.3rem;
  }
  
  .hwq-page-info {
    font-size: 0.7rem;
  }
}

/* Touch-friendly interactions */
@media (hover: none) and (pointer: coarse) {
  .hwq-pagination-button {
    min-height: 44px;
    min-width: 44px;
  }
  
  .hwq-pagination-button:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
  }
  
  .hwq-pagination-button:disabled:active {
    transform: none;
  }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .hwq-pagination-button {
    transition: none;
  }
  
  .hwq-pagination-button:active {
    transform: none;
  }
}

/* ============================================================================ */
/* ------------------- Dark/Light Theme Support ------------------- */
/* ============================================================================ */

[data-theme="light"] .hwq-stat-card {
  background: linear-gradient(135deg, #ffffff, #f8f9fa);
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .hwq-stat-card:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .hwq-filter-container .search-filter-bar {
  background: linear-gradient(135deg, #ffffff, #f8f9fa);
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .hwq-filter-container .search-filter-control input,
[data-theme="light"] .hwq-filter-container .search-filter-control select {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.2);
  color: #1a1a1a;
}

[data-theme="light"] .hwq-filter-container .search-filter-control input::placeholder {
  color: rgba(0, 0, 0, 0.4);
}

[data-theme="light"] .hwq-filter-container .search-filter-control input:focus,
[data-theme="light"] .hwq-filter-container .search-filter-control select:focus {
  background: #ffffff;
  border-color: var(--accent-color);
}

[data-theme="light"] .hwq-filter-container .search-filter-control select option {
  background: #ffffff;
  color: #1a1a1a;
}

[data-theme="light"] .hwq-results-info {
  background: linear-gradient(135deg, rgba(0, 163, 218, 0.08), rgba(0, 242, 254, 0.08));
  border-color: rgba(0, 163, 218, 0.2);
  box-shadow: 0 4px 15px rgba(0, 163, 218, 0.08);
}

[data-theme="light"] .hwq-results-info p {
  color: #1a1a1a;
}

[data-theme="light"] .hwq-results-info strong {
  color: var(--accent-color);
}

[data-theme="light"] .hwq-pagination {
  background: rgba(248, 249, 250, 0.95);
  border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .hwq-pagination-button {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .hwq-pagination-button:hover:not(:disabled) {
  background: #f8f9fa;
  border-color: var(--botw-blue);
}

[data-theme="light"] .hwq-pagination-button:disabled {
  background: rgba(0, 0, 0, 0.05);
}

