/* filters-style.css - Styling for filter functionality */

/* Reset Filters Button */
.reset-filters-btn {
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  color: #4b5563;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 10px;
}

.reset-filters-btn:hover {
  background: #e5e7eb;
  color: #1f2937;
}

/* No Results Message */
.no-results {
  width: 100%;
  padding: 60px 20px;
  text-align: center;
  background: #f9fafb;
  border-radius: 8px;
  color: #6b7280;
}

.no-results i {
  font-size: 3rem;
  margin-bottom: 20px;
  opacity: 0.5;
}

.no-results h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: #4b5563;
}

.no-results p {
  margin-bottom: 20px;
}

/* List View Mode */
.jobs-list-view {
  display: block !important;
}

.jobs-list-view .job-card {
  display: flex;
  flex-direction: row;
  width: 100%;
  margin-bottom: 15px;
}

.jobs-list-view .job-card-header {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  margin: -1px 0 -1px -1px;
  border-radius: 8px 0 0 8px;
  overflow: hidden;
}

.jobs-list-view .job-card-content {
  flex: 1;
  padding: 15px;
}

.jobs-list-view .job-card-content h2 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.jobs-list-view .company-info {
  flex-direction: row;
  flex-wrap: wrap;
}

.jobs-list-view .job-card-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 10px 15px;
}

.jobs-list-view .job-card-footer .apply-btn {
  padding: 8px 15px;
  font-size: 0.85rem;
}

/* Active Filters Display */
.active-filters-display {
  margin-top: 12px;
  padding: 8px 0;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.active-filters-display .filter-tag {
  background: #3b82f6;
  color: white;
  padding: 4px 10px;
  border-radius: 16px;
  font-size: 0.8rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.active-filters-display .filter-tag:hover {
  background: #2563eb;
}

.active-filters-display .clear-all {
  background: #ef4444;
  color: white;
  border: none;
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.active-filters-display .clear-all:hover {
  background: #dc2626;
}

/* Enhanced Dropdown Styling */
.filter-right select, 
.date-filter-group select {
  appearance: none;
  padding-right: 30px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: calc(100% - 10px) center;
  background-size: 14px;
}

/* Date Filter Row */
.date-filter-row {
  display: flex;
  justify-content: flex-end;
  padding: 12px 0;
  margin-top: 16px;
  border-top: 1px solid #e2e8f0;
  position: relative;
}

.date-filter-row::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #3b82f6, transparent);
}

.date-filter-group {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  padding: 10px 16px;
  border-radius: 12px;
  border: 2px solid #e2e8f0;
  transition: all 0.3s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.date-filter-group:hover {
  border-color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.date-filter-group i {
  color: #64748b;
  font-size: 1rem;
  transition: color 0.2s ease;
}

.date-filter {
  background: transparent;
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.95rem;
  font-weight: 500;
  color: #1e293b;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 120px;
  outline: none;
}

.date-filter:hover {
  background: rgba(59, 130, 246, 0.05);
}

.date-filter:focus {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.date-filter:focus + i {
  color: #3b82f6;
}

/* Mobile: avoid calendar icon overlapping label */
@media (max-width: 480px){
  .date-filter-group { position: relative; gap: 8px; }
  .date-filter-group i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); pointer-events: none; z-index: 1; }
  .date-filter-group select { padding-left: 36px !important; }
}

/* Smooth animations for filter interactions */
@keyframes filterFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(59, 130, 246, 0);
  }
}

.jobs-filter-bar {
  animation: filterFadeIn 0.5s ease-out;
}

.search-filter-group .search-input-group input:focus {
  animation: pulseGlow 2s infinite;
}

/* Loading state for filter elements */
.filter-loading {
  position: relative;
  overflow: hidden;
}

.filter-loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Enhanced Mobile Responsive Design */
@media (max-width: 768px) {
  .jobs-filter-bar {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 12px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
  }
  
  .filter-single-row {
    flex-direction: column;
    gap: 15px;
  }
  
  .search-input-group {
    width: 100%;
    position: relative;
  }
  
  .search-input-group i {
    left: 15px;
    color: #0073B1;
    font-size: 1.1rem;
  }
  
  .search-input-group input {
    width: 100%;
    padding: 14px 20px 14px 45px;
    font-size: 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    background: white;
    transition: all 0.3s ease;
  }
  
  .search-input-group input:focus {
    border-color: #0073B1;
    box-shadow: 0 0 0 3px rgba(0, 115, 177, 0.1);
    outline: none;
  }
  
  .date-filter-group,
  .sort-dropdown {
    width: 100%;
    position: relative;
  }
  
  .date-filter-group i,
  .sort-dropdown i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #0073B1;
    font-size: 1rem;
    z-index: 1;
  }
  
  .date-filter,
  .sort-dropdown select {
    width: 100%;
    padding: 14px 20px 14px 45px;
    font-size: 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    background: white;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230073B1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
    transition: all 0.3s ease;
  }
  
  .date-filter:focus,
  .sort-dropdown select:focus {
    border-color: #0073B1;
    box-shadow: 0 0 0 3px rgba(0, 115, 177, 0.1);
    outline: none;
  }
  
  .view-toggle {
    justify-content: center;
    gap: 10px;
    padding: 10px 0;
  }
  
  .view-btn {
    padding: 12px 20px;
    font-size: 1rem;
    min-width: 120px;
    border-radius: 10px;
    border: 2px solid #e1e5e9;
    background: white;
    color: #5A6C7D;
    transition: all 0.3s ease;
    cursor: pointer;
  }
  
  .view-btn.active {
    background: #0073B1;
    color: white;
    border-color: #0073B1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 115, 177, 0.3);
  }
  
  .view-btn i {
    margin-right: 8px;
    font-size: 1.1rem;
  }
  
  /* Active Filters for Mobile */
  .active-filters-display {
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
  }
  
  .filter-tag {
    padding: 8px 12px;
    background: #0073B1;
    color: white;
    border-radius: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  
  .filter-tag .remove-filter {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.8rem;
  }
  
  .clear-all {
    padding: 8px 16px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
  }
  
  .clear-all:hover {
    background: #c82333;
    transform: translateY(-1px);
  }
  
  /* Legacy Mobile Styles */
  .filter-top-row {
    flex-direction: column;
  }
  
  .filter-left {
    width: 100%;
  }
  
  .filter-right {
    width: 100%;
    justify-content: space-between;
    margin-top: 15px;
  }
  
  .jobs-list-view .job-card {
    flex-direction: column;
  }
  
  .jobs-list-view .job-card-header {
    width: 100%;
    height: 120px;
    border-radius: 8px 8px 0 0;
  }
}

/* Extra Small Mobile Screens */
@media (max-width: 480px) {
  .jobs-filter-bar {
    padding: 12px;
    margin: 0 -5px 15px -5px;
  }
  
  .search-input-group input,
  .date-filter,
  .sort-dropdown select {
    padding: 12px 18px 12px 40px;
    font-size: 0.95rem;
  }
  
  .view-toggle {
    flex-direction: column;
    gap: 8px;
  }
  
  .view-btn {
    width: 100%;
    min-width: auto;
    padding: 10px 15px;
  }
  
  .active-filters-display {
    padding: 12px;
  }
  
  .filter-tag {
    font-size: 0.85rem;
    padding: 6px 10px;
  }
}
