/* Analytics Color Scheme */
:root {
    --nav-height: 60px;
    --filter-height-closed: 45px;
    --filter-padding-vertical: 15px;
    --primary-color: #3b82f6;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --blush: #f8fafc;
    --accent: #3b82f6;
    --key-color: #3b82f6;
    --value-color: #1e293b;
}

/* Ensure full-width on mobile and prevent horizontal underflow */

.jobs-container {
   max-width: 1200px;
   margin: 0 auto; /* Centered container, remove top/bottom margin here */
   padding: 0 20px; /* Horizontal padding */
   padding-top: var(--nav-height); /* Padding only for the fixed header */
}

/* Filter and Search Bar Styles */
.filters {
   background: var(--card-bg);
   padding: var(--filter-padding-vertical) 20px; /* Padding for the filter bar */
   border-radius: 0 0 8px 8px; /* Rounded bottom only */
   margin-bottom: 0; /* Removed default margin */
   box-shadow: 0 2px 4px var(--nav-shadow);
   cursor: pointer; /* Indicate clickable */
   transition: all 0.3s ease;
   display: flex; /* Use flexbox */
   justify-content: space-between; /* Space out filter toggle and search bar */
   align-items: center;
   position: sticky; /* Make filter sticky */
   top: 60px; /* Position it right below the header */
   z-index: 999; /* Ensure it's above content but below header */
   flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.filters:hover {
   background-color: var(--bg-secondary);
}

.filters h3 {
     margin: 0; /* Remove default margin */
     color: var(--text-primary);
}

.filter-toggle {
   display: flex;
   align-items: center;
   gap: 10px;
   flex-grow: 0; /* Allow filter toggle to shrink */
}

.filter-arrow i {
    transition: transform 0.3s ease;
}

.filter-search-container {
   
    display: flex;
    align-items: center;
    gap: 10px;
    flex-grow: 1; /* Allow search to take available space */
    margin-left: 20px; /* Add space between filter toggle and search */
    min-width: 150px; /* Adjusted minimum width for search bar */
}

.filter-search-container input {
   width: 100%;
   padding: 6px 12px; /* Match filter padding */
   border: 1px solid var(--border-color);
   border-radius: 20px; /* Pill shape */
   background-color: var(--bg-primary);
   color: var(--text-primary);
   font-size: 0.9rem;
}

.filter-options {
   display: none; /* Hidden by default */
   padding: 20px;
   border-top: 1px solid var(--border-color);
   margin-top: 10px;
   width: 100%; /* Full width when open */
}

.filters.open .filter-options {
   display: block; /* Show when filter is open */
}

.filters.open .filter-arrow i {
   transform: rotate(180deg); /* Rotate arrow when open */
}

.filter-group {
   margin-bottom: 15px;
}

.filter-group label {
   display: block;
   margin-bottom: 5px;
   color: var(--text-secondary);
}

.filter-group select {
   width: 100%;
   padding: 8px;
   border: 1px solid var(--border-color);
   border-radius: 4px;
   background: var(--bg-primary);
   color: var(--text-primary);
}

.jobs-grid {
   
   display: grid;
   grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
   gap: 8px; /* Adjusted gap between job cards */
   margin-top: var(--filter-height-closed); /* Add margin to position below filter bar */
}

.job-card {
   width: 318px;
   padding-left: 20px ;
   background: linear-gradient(180deg, rgba(124,58,237,0.04), rgba(124,58,237,0.02)), var(--card-bg);
   border-radius: 12px;
   box-shadow: 0 2px 6px rgba(0,0,0,0.06);
   transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.job-card:hover {
   transform: translateY(-4px);
   box-shadow: 0 8px 18px rgba(0,0,0,0.08);
}

.job-card-header {
   display: flex;
   align-items: center;
   gap: 12px;
   margin-bottom: 8px;
}

.company-logo {
   width: 50px;
   height: 50px;
   border-radius: 8px;
   margin-right: 15px;
   object-fit: cover;
}

.job-title {
   font-size: 1.1em;
   color: var(--text-primary);
   margin-bottom: 6px;
   background: rgba(124,58,237,0.10);
   padding: 4px 10px;
  
   display: inline-block;
}

.company-name {
   color: var(--text-primary);
   font-size: 0.95em;
   background: rgba(0,0,0,0.06);
   padding: 3px 8px;
   
   display: inline-block;
}

.job-details {
   margin: 15px 0;
}

.job-detail {
   display: flex;
   align-items: center;
   margin-bottom: 8px;
   color: var(--text-secondary);
}

.job-detail i {
   margin-right: 8px;
   color: var(--accent-color);
}

.job-description {
   color: var(--text-secondary);
   margin: 15px 0;
   font-size: 0.9em;
   line-height: 1.5;
}

.apply-button {
   background: var(--accent-color);
   color: white;
   border: none;
   padding: 10px 20px;
   border-radius: 5px;
   cursor: pointer;
   width: 100%;
   transition: all 0.3s ease;
}

.apply-button:hover {
   opacity: 0.9;
   transform: translateY(-2px);
}

.no-jobs-message {
   text-align: center;
   padding: 20px;
   color: var(--text-secondary);
   margin-bottom: 20px;
   border: 1px dashed var(--border-color);
   border-radius: 8px;
}

/* Responsive Design */
@media (max-width: 768px) {
   .jobs-container {
       padding: 0 15px; /*Horizontal padding for mobile */
       padding-top: var(--nav-height); /* Padding only for the fixed header for mobile */
   }

   .jobs-grid {
       display: flex;
       flex-direction: column;
       align-items: center;
       justify-content: flex-start;
       grid-template-columns: none !important;
       margin-left: 15px;
       margin-right: 15px;
   }
   .job-card {
       padding: 20px 20px !important;
       max-width: 370px;
       width: 100%;
       margin: 0 auto 16px auto;
       box-sizing: border-box;
   }

   header {
       flex-direction: row; /* Standard flex direction */
       height: auto; /* Auto height for stacked items */
       padding: 10px;
       justify-content: flex-start; /* Align items to the start */
       align-items: center;
   }

    .filter-toggle {
        flex-grow: 0; /* Allow filter toggle to shrink */
    }

   .filter-search-container {
        flex-grow: 1; /* Allow search to take available space */
        max-width: none; /* Remove max width limit on mobile */
        margin-left: 10px; /* Adjusted margin for mobile */
   }

   .filter-search-container input {
        font-size: 0.9rem;
        padding: 6px 12px;
   }

   .filters {
        flex-direction: row; /* Keep filter toggle and search in a row */
        align-items: center;
        top: var(--nav-height); /* Keep filter below header */
        border-radius: 0 0 8px 8px; /* Rounded bottom only */
        padding: var(--filter-padding-vertical) 10px; /* Padding for the filter bar on mobile */
        flex-wrap: wrap; /* Allow wrapping if needed */
    }

   .filters.open {
        flex-direction: column; /* Stack when open */
        align-items: stretch;
   }

   .filters.open .filter-search-container {
        margin-bottom: 10px; /* Space below search when filters are open */
   }

   .filter-options {
        width: 100%; /* Full width when filter is open */
        margin-top: 10px; /* Add space above options */
   }

   .company-logo {
       width: 56px !important;
       height: 56px !important;
   }
}

@media (min-width: 769px) {
  .jobs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
    justify-items: center;
  }
  .job-card {
    max-width: 370px;
    width: 100%;
    margin: 0 auto;
    padding: 28px 20px;
    box-sizing: border-box;
  }
}

/* Modal styles */
.modal {
   display: none;
   position: fixed;
   z-index: 9999;
   left: 0; top: 0;
   width: 100vw; height: 100vh;
   background: rgba(0,0,0,0.5);
   justify-content: center;
   align-items: center;
}

.modal[style*="display: block"] {
   display: flex !important;
}

.modal-content {
   background: #fff;
   margin: 0;
   padding: 24px;
   border-radius: 10px;
   max-width: 500px;
   width: 90vw;
   position: relative;
   box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.modal-content h2 {
   color: var(--text-primary);
   margin-bottom: 15px;
}

.modal-content p {
   color: var(--text-secondary);
   margin-bottom: 20px;
}

.modal-buttons {
   display: flex;
   justify-content: center;
   gap: 10px;
}

.modal-button {
   padding: 8px 16px;
   border: none;
   border-radius: 4px;
   cursor: pointer;
   font-weight: 500;
   transition: all 0.3s ease;
}

.modal-button.primary {
   background-color: var(--accent-color);
   color: white;
}

.modal-button.secondary {
   background-color: var(--bg-secondary);
   color: var(--text-primary);
}

.modal-button:hover {
   transform: translateY(-2px);
   box-shadow: var(--shadow-sm);
}

.job-modal-header {
   display: flex;
   align-items: center;
   gap: 16px;
   margin-bottom: 12px;
}
.modal-company-logo {
   width: 48px;
   height: 48px;
   border-radius: 50%;
   object-fit: cover;
   border: 2px solid #eee;
   background: #fff;
}
.job-modal-title-block {
   display: flex;
   flex-direction: column;
   gap: 2px;
}
.job-modal-company {
   font-size: 1.25em;
   font-weight: bold;
   color: #1a1a1a;
   margin-bottom: 2px;
}
.job-modal-position {
   font-size: 1.1em;
   color: #444;
   font-weight: 500;
   margin: 0;
}
.job-modal-body {
   margin-bottom: 0;
   overflow-y: auto;
   max-height: 55vh;
   padding-bottom: 12px;
}
.job-modal-field {
   margin-bottom: 6px;
   font-size: 1em;
}
.job-modal-label {
   font-weight: 500;
   color: var(--key-color);
   margin-right: 4px;
}
.job-modal-value {
   color: var(--value-color);
   font-weight: 400;
}
.job-modal-job-image {
   width: 100%;
   max-width: 350px;
   margin: 16px auto 0 auto;
   display: block;
   border-radius: 8px;
   box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}
.modal-content.job-modal-content {
   max-width: 420px;
   width: 95vw;
   max-height: 80vh;
   display: flex;
   flex-direction: column;
   justify-content: flex-start;
   align-items: stretch;
}
.job-modal-footer {
   position: sticky;
   bottom: 0;
   background: transparent;
   z-index: 2;
   padding: 0;
}
.apply-footer-bg {
   background: var(--blush);
   border-radius: 16px;
   margin: 0 8px 8px 8px;
   padding: 18px 0 12px 0;
   display: flex;
   justify-content: center;
   align-items: center;
   box-shadow: 0 -2px 8px rgba(231,84,128,0.07);
}
.apply-btn {
   background: var(--accent);
   color: #fff;
   border: none;
   border-radius: 8px;
   padding: 10px 32px;
   font-size: 1.1em;
   font-weight: 600;
   cursor: pointer;
   transition: background 0.2s;
   box-shadow: 0 2px 8px rgba(231,84,128,0.07);
}
.apply-btn:hover {
   background: #c13c6a;
}
.job-requirements-section ul {
 list-style: none;
 padding-left: 1.5em;
 margin: 0.2em 0 0.2em 0;
}
.job-requirements-section ul li {
 position: relative;
 padding-left: 0.7em;
 margin-bottom: 2px;
}
.job-requirements-section ul li::before {
 content: '*';
 color: #7c3aed;
 position: absolute;
 left: -0.5em;
 top: 4px;
 font-size: 1em;
 line-height: 1.5;
}
.job-detail-row {
 display: flex;
 align-items: center;
 margin-bottom: 4px;
}
.job-detail-label {
 min-width: 110px;
 color: #7c3aed;
 font-weight: 500;
 display: flex;
 align-items: center;
}
.job-detail-value {
 color: #222;
 margin-left: 8px;
 font-weight: 400;
 word-break: break-word;
}
.job-detail-label i {
 margin-right: 10px;
}
#apply-loading-spinner {
 display: none;
 justify-content: center;
 align-items: center;
 margin-top: 12px;
}
.spinner {
 border: 4px solid #ede7f6;
 border-top: 4px solid #7c3aed;
 border-radius: 50%;
 width: 32px;
 height: 32px;
 animation: spin 1s linear infinite;
}
@keyframes spin {
 0% { transform: rotate(0deg); }
 100% { transform: rotate(360deg); }
}

.sticky-filters {
  position: sticky;
  top: var(--nav-height); /* stick just below fixed header */
  z-index: 2000;
  background: var(--card-bg, #fff);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  padding: 12px 0 8px 0;
  margin-bottom: 12px;
}

.filter-bar {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.filter-icon-btn {
  flex: 0 0 auto;
  margin-right: 2px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-input-wrapper {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  position: relative;
  min-width: 0;
}

.search-input {
  width: 100%;
  min-width: 0;
  flex: 1 1 0;
  padding-left: 44px !important;
  height: 36px;
  box-sizing: border-box;
}

.search-input-icon {
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
}

.filter-select {
  flex: 1 1 120px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid #e0e0e0;
  background: #fff;
  font-size: 1rem;
  color: #333;
  outline: none;
  transition: border 0.2s;
}
.filter-select:focus {
  border: 1.5px solid var(--accent, #7c3aed);
}

@media (max-width: 900px) {
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .search-input, .filter-select {
    width: 100%;
    min-width: 0;
  }
}

/* Loading spinner for infinite scroll */
#infinite-scroll-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px 0;
}
#infinite-scroll-spinner .spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--accent, #7c3aed);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@media (max-width: 600px) {
  .sticky-filters {
    padding: 8px 0 4px 0;
    margin-bottom: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  }
  .filter-bar {
    flex-direction: row;
    align-items: center;
    gap: 4px;
    width: 100%;
  }
  .filter-icon-btn {
    height: 32px;
    min-width: 32px;
    margin-right: 2px;
  }
  .search-input-wrapper {
    flex: 1 1 0;
    min-width: 0;
  }
  .search-input {
    font-size: 0.97em;
    padding: 8px 8px 8px 38px !important;
    border-radius: 12px;
    height: 32px;
  }
  .search-input-icon {
    width: 24px;
    height: 24px;
    font-size: 1em;
    left: 7px;
    top: 50%;
    transform: translateY(-50%);
  }
  .jobs-container {
    padding: 0 4px;
  }
  .jobs-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .job-card {
    padding: 14px 14px;
    font-size: 1em;
    border-radius: 10px;
    margin-bottom: 8px;
  }
  .job-card-header {
    gap: 8px;
    margin-bottom: 6px;
  }
  .company-logo {
    width: 40px;
    height: 40px;
    margin-right: 8px;
  }
  .job-title {
    font-size: 1.1em;
  }
  .company-name {
    font-size: 0.95em;
  }
  .modal-content, .modal-content.job-modal-content {
    max-width: 98vw;
    width: 98vw;
    padding: 10px 4px;
  }
  .job-modal-job-image {
    max-width: 95vw;
  }
  .bottom-nav {
    font-size: 0.95em;
  }
  .filter-bar {
    flex-direction: row;
    align-items: center;
    gap: 4px;
  }
  .filter-panel {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
    max-width: 100vw;
    margin-top: 2px;
    padding: 2px 0 0 0;
  }
  .filter-panel .filter-select {
    width: 48%;
    height: 12px;
    min-width: 70px;
    max-width: 48%;
    font-size: 0.92em;
    padding: 7px 4px;
    border-radius: 7px;
    margin-bottom: 2px;
  }
  .search-bar-container {
    height: 38px;
    padding-left: 10px;
    margin: 0 16px 0 16px;
  }
  .search-input-modern {
    font-size: 1em;
    color: #222;
    padding-top: 0;
    padding-bottom: 0;
    height: 38px;
    line-height: normal;
    display: block;
  }
  .filter-icon-btn-modern {
    width: 36px;
    height: 36px;
    font-size: 1.1em;
    margin-right: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

.filter-icon-btn {
  background: none;
  border: none;
  padding: 0 8px 0 0;
  font-size: 1.3em;
  color: var(--accent, #7c3aed);
  cursor: pointer;
  display: flex;
  align-items: center;
  height: 40px;
}
.filter-icon-btn:active {
  color: #4b2997;
}

.filter-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
  transition: max-height 0.3s, opacity 0.3s;
  max-height: 400px;
  opacity: 1;
}
.filter-panel[style*="display: none"] {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
}
.filter-panel .filter-select {
  flex: 1 1 120px;
  min-width: 90px;
  max-width: 48%;
  font-size: 0.97em;
  padding: 7px 8px;
  border-radius: 10px;
}
@media (max-width: 600px) {
  .filter-bar {
    flex-direction: row;
    align-items: center;
    gap: 6px;
  }
  .filter-icon-btn {
    font-size: 1.1em;
    height: 36px;
    padding: 0 4px 0 0;
  }
  .search-input {
    font-size: 1em;
    padding: 10px 10px;
    border-radius: 14px;
  }
  .filter-panel {
    flex-direction: column;
    gap: 6px;
    max-width: 100vw;
    margin-top: 2px;
    padding: 2px 0 0 0;
  }
  .filter-panel .filter-select {
    height: 12px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    font-size: 0.95em;
    padding: 8px 6px;
    border-radius: 8px;
  }
}

.filter-bar-modern {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  width: 100%;
  margin-bottom: 8px;
  position: sticky; /* keep the bar itself sticky */
  top: var(--nav-height);
  z-index: 2001;
  background: var(--card-bg, #fff);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.search-bar-container {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 999px;
  padding: 0 0 0 18px;
  height: 48px;
  flex: 1 1 0;
  box-shadow: 0 1px 6px rgba(0,0,0,0.08);
  border: none;
  position: relative;
  margin: 0 12px;
}
.search-bar-container {
  border: 1px solid transparent; /* reserve space to avoid jump on focus */
}
.search-bar-container:has(.search-input-modern:focus) {
  border-color: var(--accent-color, #7c3aed);
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.15);
}
.search-input-modern {
  background: transparent;
  border: none;
  outline: none;
  color: #222;
  font-size: 1.13em;
  flex: 1 1 0;
  height: 100%;
  padding: 0 0 0 0;
  padding-top: 0;
  padding-bottom: 0;
  display: block;
  box-sizing: border-box;
}
.search-input-modern::placeholder {
  color: #888;
  opacity: 1;
}
.search-icon-btn {
  background: #f3f3f3;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  color: var(--accent, #7c3aed);
  font-size: 1.2em;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.search-icon-btn:hover {
  background: var(--accent, #7c3aed);
  color: #fff;
}
.filter-icon-btn-modern {
  background: #f3f3f3;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent, #7c3aed);
  font-size: 1.3em;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.filter-icon-btn-modern:hover {
  background: var(--accent, #7c3aed);
  color: #fff;
}
@media (max-width: 600px) {
  .filter-bar-modern {
    gap: 7px;
    margin-bottom: 6px;
  }
  .search-bar-container {
    height: 38px;
    padding-left: 10px;
    margin: 0 16px 0 16px;
  }
  .search-input-modern {
    font-size: 1em;
    color: #222;
    padding-top: 0;
    padding-bottom: 0;
    height: 38px;
    line-height: normal;
    display: block;
  }
  .search-icon-btn {
    width: 32px;
    height: 32px;
    font-size: 1em;
    margin-left: 4px;
  }
  .filter-icon-btn-modern {
    width: 36px;
    height: 36px;
    font-size: 1.1em;
    margin-right: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

.filter-modal {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.18);
  z-index: 2000;
  display: none;
  align-items: stretch;
  justify-content: flex-end;
  transition: background 0.2s;
}
.filter-modal.open {
  display: flex;
}
.filter-modal-content {
  background: #fff;
  width: 50vw;
  max-width: 420px;
  min-width: 240px;
  height: auto;
  max-height: 90vh;
  margin: auto 0;
  box-shadow: -4px 0 24px rgba(0,0,0,0.13);
  border-radius: 18px 0 0 18px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 24px 18px 18px 18px;
  animation: slideInRight 0.25s cubic-bezier(.4,1.4,.6,1) 1;
  overflow-y: auto;
}
@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}
.close-filter-modal {
  position: absolute;
  top: 14px; right: 18px;
  background: none;
  border: none;
  font-size: 2em;
  color: #888;
  cursor: pointer;
  z-index: 10;
  transition: color 0.2s;
}
.close-filter-modal:hover {
  color: var(--accent, #7c3aed);
}
.filter-modal-row {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
  align-items: center;
  justify-content: center;
  margin-top: 0;
  overflow-x: visible;
  padding-top: 45px;
  height: 40vh;
}
.filter-modal-row .filter-select {
  min-width: 0;
  max-width: 100%;
  width: 100%;
  font-size: 0.85em;
  height: 24px;
  padding: 0 6px;
  border-radius: 6px;
  line-height: 24px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

@media (max-width: 900px) {
  .filter-modal-content {
    width: 50vw;
    max-width: 420px;
    min-width: 240px;
    height: auto;
    max-height: 90vh;
    margin: auto 0;
    border-radius: 12px 0 0 12px;
    padding: 16px 6px 24px 6px;
    overflow-y: auto;
    box-sizing: border-box;
    
  }
  .filter-modal-row .filter-select {
    font-size: 0.95em;
    padding: 4px 6px;
    border-radius: 7px;
    height: 24px;
  }
}
@media (max-width: 600px) {
  .filter-modal-content {
    width: 50vw;
    max-width: 420px;
    min-width: 240px;
    height: auto;
    max-height: 90vh;
    margin: auto 0;
    border-radius: 12px 0 0 12px;
    padding: 16px 6px 24px 6px;
    overflow-y: auto;
    box-sizing: border-box;
  }
  .filter-modal-row {
    gap: 8px;
    margin-top: 0;
    padding-top: 45px;
    height: 40vh;
  }
  .filter-modal-row .filter-select {
    font-size: 0.93em;
    padding: 0px 4px;
    border-radius: 6px;
    height: 24px;
  }
}

/* New Full-Screen Filter Modal Styles */
.new-filter-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
  z-index: 9999;
  backdrop-filter: blur(5px);
}

.new-filter-modal.open {
  display: flex;
  align-items: center;
  justify-content: center;
}

.new-filter-modal-content {
  background-color: var(--card-bg);
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
}

.filter-header h2 {
  margin: 0;
  color: var(--text-primary);
  font-size: 1.5em;
  font-weight: 600;
}

.close-filter-modal {
  background: none;
  border: none;
  font-size: 1.5em;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.close-filter-modal:hover {
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

.filter-body {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  max-height: calc(90vh - 140px);
}

.filter-section {
  margin-bottom: 32px;
}

.filter-section h3 {
  margin: 0 0 16px 0;
  color: var(--text-primary);
  font-size: 1.2em;
  font-weight: 600;
  border-bottom: 2px solid var(--accent-color);
  padding-bottom: 8px;
}

.filter-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background-color: var(--bg-secondary);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.95em;
  font-weight: 500;
}

.filter-option:hover {
  border-color: var(--accent-color);
  background-color: rgba(124, 58, 237, 0.1);
  transform: translateY(-1px);
}

.filter-option input[type="checkbox"] {
  margin: 0;
  width: 18px;
  height: 18px;
  accent-color: var(--accent-color);
  cursor: pointer;
}

.filter-option span {
  flex: 1;
  color: var(--text-primary);
  cursor: pointer;
}

.filter-option:has(input:checked) {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
  color: white;
}

.filter-option:has(input:checked) span {
  color: white;
}

.filter-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
  gap: 16px;
}

.clear-filters-btn {
  background-color: transparent;
  border: 2px solid var(--border-color);
  color: var(--text-secondary);
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
}

.clear-filters-btn:hover {
  border-color: var(--text-primary);
  color: var(--text-primary);
}

.apply-filters-btn {
  background-color: var(--accent-color);
  border: none;
  color: white;
  padding: 12px 32px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1em;
  transition: all 0.2s ease;
  flex: 1;
  max-width: 200px;
}

.apply-filters-btn:hover {
  background-color: #6d28d9;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .new-filter-modal-content {
    width: 95%;
    max-height: 95vh;
  }
  
  .filter-body {
    padding: 20px;
  }
  
  .filter-options {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  
  .filter-option {
    padding: 10px 14px;
    font-size: 0.9em;
  }
  
  .filter-footer {
    flex-direction: column;
    gap: 12px;
  }
  
  .apply-filters-btn {
    max-width: none;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .filter-header {
    padding: 16px 20px;
  }
  
  .filter-header h2 {
    font-size: 1.3em;
  }
  
  .filter-body {
    padding: 16px;
  }
  
  .filter-section {
    margin-bottom: 24px;
  }
  
  .filter-section h3 {
    font-size: 1.1em;
  }
}

/* Search Bar Enhancements */
.search-input-modern {
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.search-input-modern:focus {
  outline: none;
  box-shadow: none;
}

.search-icon-btn {
  transition: all 0.2s ease;
}

.search-icon-btn:hover {
  background-color: var(--accent-color);
  color: white;
  transform: scale(1.05);
}
.sticky-filters{
  position: sticky; /* Make filter sticky */
  top : 0px ;
  left : 0px
  
}