
.filter-bar {
    display: flex;
    gap: 20px;
    align-items: center;
    position: inherit !important;
    bottom: inherit !important;
    margin-top: 20px;
    width: inherit !important;
    justify-content: inherit !important;
}
.filter-item select,
.search-input {
    padding: 8px 12px;
    border-radius: 20px;
    border: 1px solid #ccc;
}
.search-group {
    position: relative;
    flex-grow: 1;
}
.search-input {
    width: 100%;
    padding-right: 35px;
}
.search-icon-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    color: #000;
}
.all-filters-btn {
    color:#fff;
    border: 1px solid transparent;
    padding: 8px 16px;
    border-radius: 20px;
    background: linear-gradient(to right, #3b82f6, #346ce5);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}
#filterPopup {
    position: fixed;
    top: 50%;
    left: 50%;
    min-height: 500px;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 550px;
    background: #fff;
    border-radius: 16px;
    padding: 30px 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    z-index: 99999;
    transition: all 0.3s ease;
}
#filterPopup.hidden {
    display: none;
}
/* Title */
#filterPopup h3 {
    font-size: 22px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 24px;
    color: #222;
}
/* Dropdown Styling */
#filterPopup select {
  width: 100%;
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 16px;
  border: 1px solid #ddd;
  border-radius: 12px;
  appearance: none;
  background-color: #ffffff;
  /* Updated arrow icon SVG */
  background-image: url("data:image/svg+xml,%3Csvg fill='gray' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath d='M12 15.5c-.3 0-.5-.1-.7-.3l-5-5a1 1 0 011.4-1.4L12 13.6l4.3-4.3a1 1 0 011.4 1.4l-5 5c-.2.2-.5.3-.7.3z'/%3E%3C/svg%3E");
  
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
  transition: border-color 0.2s;
  box-shadow: inset 0 0 0 .0625rem #ffffff;
}
#filterPopup select:focus {
    border-color: #3b82f6;
    outline: none;
    background-color: #fff;
}
/* Apply Button */
.apply-button {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}
.apply-button:hover {
        transform: scale(1.02);
    transition-duration: .4s;
    background: linear-gradient(to right, #2563eb, #1d4ed8);
}

.filter-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}
.filter-control {
    flex: 1 1 calc(50% - 8px);
    display: flex;
    flex-direction: column;
}
.filter-control.full {
    flex: 1 1 100%;
}
.filter-control label {
    font-weight: 500;
    margin-bottom: 6px;
    font-size: 14px;
    color: #555;
    display: flex;
    align-items: center;
    gap: 6px;
}
.filter-control select {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #ccc;
    font-size: 14px;
    background: #f9f9f9;
}
.filter-popup.fade-in {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
}
.filter-popup.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0.95);
    transition: all 0.3s ease;
}
.hidden {
    display: none;
}
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
}
/* Close Button (optional but nice UX) */
.close-btn {
    position: absolute;
    top: 16px;
    right: 18px;
    font-size: 22px;
    background: none;
    border: none;
    cursor: pointer;
    color: #000;
    z-index: 1001;
}
.close-btn:hover {
    color: #333;
}
.suggestion-popup {
   border: 1px solid #ddd;
  border-radius: 8px;
  background: white;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  position: absolute;
  width: 100%;
  z-index: 998;
    padding: 10px 15px;
}
.suggestion-popup.hidden {
    display: none;
}
/* Tabs */
.filter-tabs {
    display: flex;
    border-bottom: 1px solid #eee;
    margin-bottom: 10px;
}
.filter-tabs .tab {
    padding: 8px 12px;
    cursor: pointer;
    font-weight: 500;
    color: #555;
}
.filter-tabs .tab.active {
    border-bottom: 2px solid #3b82f6;
    color: #3b82f6;
}
/* Tab Content */
.tab-content {
    display: none;
}
.tab-content.active {
    display: block;
}
/* Responsive width */
.search-group {
    position: relative;
    flex-grow: 1;
}
.suggestion-item {
     padding: 13px 7px;
     font-weight: 500;
    cursor: pointer;
    color:#3a3a3a;
    font-size: 16px;
    border-bottom: 1px solid #eee;
}
.suggestion-item  span
{
    font-weight: 400;
    color:#696969;
    font-size: 15px;
}
.suggestion-item:last-child
{
    border-bottom: none !important;
}
.suggestion-item:hover {
  background-color: #f3f4f6;
}
.suggestion-item .type {
  font-size: 12px;
  color: gray;
  margin-left: 6px;
}
.role
{
    width: 100%;
    display: block;
    padding-top: 0;
    background-color: #fff;
    font-weight: 510;
    font-size: 1rem;
    text-align: left;
    padding: 13px 7px;
    margin-bottom: 0;
    color: #000000;
    text-transform: uppercase;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 998;
  display: none;
}
.modal-backdrop.visible {
  display: block;
}
.filter-popup {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}
.filter-popup.hidden {
  display: none;
}
#filterPopupSuggestions .tab-content.active
{
    max-height: 410px;
    overflow-y: auto;
}
/* Responsive */
@media (max-width: 767px) {
    .filter-bar
    {
        display: inherit !important;
       position: relative !important;
    }
    .filter-control
    {
            flex: 1 1 100%;
    }
    #filterPopup select
    {
        margin-bottom: 10px;
    }
    #filterPopup 
    {
        position: fixed;
        top: inherit !important;
        bottom: 0;
        left: 0;
        width: 100%;
        padding: 20px;
        border-radius: 16px 16px 0 0;
        background: #fff;
        z-index: 9999;
        animation: slideUp 0.4s ease-out;
        transform: translateY(100%);
        animation-fill-mode: forwards;
    }
    .all-filters-btn {
        padding: 8px 12px;
        font-size: 14px;
        border-radius: 0 10px;
    }
    .filter_btns
    {
        position: absolute;
        top: 0;
        right: 0;
    }
    .filter-item select, .search-input
    {
            font-size: 14px;
    }
    #filterPopup h3 
    {
        font-size: 20px;
    }
    .filter-bar
    {
        flex-direction: row !important;
    }
    .search-group 
    {
        flex: 1 !important;
        margin-top: 30px;
    }
    @keyframes slideUp 
    {
        from {
        transform: translateY(100%);
        opacity: 0;
        }
        to {
        transform: translateY(0);
        opacity: 1;
        }
    }
   .suggestion-item
   {
      font-size: 15px !important;
   }
    .filter-tabs {
        display: flex;
        overflow-x: auto;
        white-space: nowrap;
        scrollbar-width: none;
        -ms-overflow-style: none;
        border-bottom: 1px solid #ddd;
    }
    .filter-tabs::-webkit-scrollbar {
        display: none;
    }
    .filter-tabs .tab {
        flex: 0 0 auto;
        padding: 12px 16px;
        cursor: pointer;
    }
    .tab-content {
        padding: 12px 16px 12px 0;
    }
    .role
    {
        font-size: 15px;
        font-weight: 600;
    }
    .filter-tabs .tab
    {
        font-size: 15px;
    }
}

.btn-clear-filter
{
    background: linear-gradient(to right, #959595, #aaaaaa) !important;
}
/* Sort by dropdown styling */
/* Custom styling for the <select> */
#sort_by {
      padding-right: 2rem; /* space for the arrow */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: url('data:image/svg+xml;utf8,<svg fill="%23212121" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>') no-repeat right 0.6rem center;
    background-size: 1.2rem; /* increase arrow size */
    border: 1px solid #ccc;
    border-radius: 2rem;
    height: 42px;
    font-size: 14px;
    cursor: pointer;
}

.sort-box {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.1);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.sort-box label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 500;
  color: #333;
  margin: 0;
}

.sort-box select {
  border: none;
  background: transparent;
  font-size: 14px;
  outline: none;
  color: #333;
  cursor: pointer;
  padding-right: 8px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.sort-box select:focus {
  outline: none;
}

/* Optional: Add dropdown icon */
.sort-box select {
  background-image: url("data:image/svg+xml,%3Csvg fill='gray' height='16' viewBox='0 0 24 24' width='16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 16px 16px;
  padding-right: 24px;
}
