/* ===== Inline filter dropdowns ===== */

#inline-filters-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    margin-bottom: 4px;
}

/* Reserve 2 rows on desktop to avoid filter-bar CLS while labels update */
@media (min-width: 769px) {
    #inline-filters-bar {
        min-height: 82px;
        align-content: flex-start;
    }
}

.filter-dropdown {
    position: relative;
    display: inline-block;
}

.filter-dropdown-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background-color: #f5f0eb;
    border: 1px solid rgba(83, 42, 33, 0.18);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #532A21;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.15s, border-color 0.15s;
    line-height: 1.4;
}

.filter-dropdown-btn:hover,
.filter-dropdown.open .filter-dropdown-btn {
    background-color: #ede5dc;
    border-color: rgba(83, 42, 33, 0.35);
}

.filter-dropdown-arrow {
    font-size: 0.7rem;
    opacity: 0.7;
    transition: transform 0.15s;
}

.filter-dropdown.open .filter-dropdown-arrow {
    transform: rotate(180deg);
}

.filter-dropdown.has-active .filter-dropdown-btn {
    background-color: #e8ddd4;
    border-color: rgba(83, 42, 33, 0.5);
    font-weight: 600;
}

.filter-dropdown-panel {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 200;
    background: #ffffff;
    border: 1px solid rgba(83, 42, 33, 0.15);
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(78, 44, 35, 0.15);
    padding: 14px 16px;
    min-width: 230px;
    max-height: 340px;
    overflow-y: auto;
}

.filter-dropdown.open .filter-dropdown-panel {
    display: block;
}

.category-search-input {
    width: 100%;
    padding: 6px 10px;
    margin-bottom: 8px;
    border: 1px solid #EAEAEA;
    border-radius: 6px;
    font-size: 0.85rem;
    outline: none;
    box-sizing: border-box;
}

.category-search-input:focus {
    border-color: rgba(83, 42, 33, 0.4);
}

.occupation-search-input {
    width: 100%;
    padding: 6px 10px;
    margin-bottom: 8px;
    border: 1px solid #EAEAEA;
    border-radius: 6px;
    font-size: 0.85rem;
    outline: none;
    box-sizing: border-box;
}

.occupation-search-input:focus {
    border-color: rgba(83, 42, 33, 0.4);
}

.category-filter-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 260px;
    overflow-y: auto;
}

.occupation-filter-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 260px;
    min-height: 210px;
    overflow-y: auto;
}

.occupation-filter-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
}

.occupation-filter-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.occupation-selected-clear {
    font-size: 0.8rem;
    opacity: 0.75;
    flex-shrink: 0;
}

#clear-refinements .ais-ClearRefinements-button {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 7px 14px;
    background: transparent;
    border: 1px solid rgba(83, 42, 33, 0.25);
    border-radius: 20px;
    font-size: 0.85rem;
    color: #532A21;
    cursor: pointer;
    white-space: nowrap;
}

#clear-refinements .ais-ClearRefinements-button:hover {
    background-color: #f5f0eb;
}

/* Override the 2-column layout inside dropdown panels with a proper grid */
.filter-dropdown-panel .ais-RefinementList-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 8px;
    columns: unset;
    -webkit-columns: unset;
    -moz-columns: unset;
    margin-top: 4px;
}

.filter-dropdown-panel .side-filter-value {
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.filter-dropdown-panel .side-filter-value-span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

/* ===== Mobile bottom sheet ===== */

#filter-mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1000;
}

#filter-mobile-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    background: #ffffff;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 24px rgba(78, 44, 35, 0.18);
    max-height: 85vh;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.25s ease;
    /* hidden by default — JS adds sheet-open to slide it up */
    display: none;
}

#filter-mobile-sheet.sheet-open {
    display: flex;
    transform: translateY(0);
}

#filter-mobile-overlay.overlay-open {
    display: block;
}

#filter-mobile-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 12px;
    border-bottom: 1px solid rgba(83, 42, 33, 0.12);
    flex-shrink: 0;
}

#filter-mobile-sheet-title {
    font-size: 1rem;
    font-weight: 600;
    color: #532A21;
}

#filter-mobile-sheet-close {
    background: none;
    border: none;
    font-size: 1.4rem;
    color: #532A21;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

#filter-mobile-sheet-content {
    overflow-y: auto;
    padding: 16px 20px 24px;
    flex: 1;
}

/* When the panel is inside the sheet, undo its absolute positioning */
#filter-mobile-sheet-content .filter-dropdown-panel {
    position: static;
    box-shadow: none;
    border: none;
    border-radius: 0;
    padding: 0;
    max-height: none;
    overflow-y: visible;
    min-width: 0;
}

/* ===== End mobile bottom sheet ===== */

/* ===== End inline filter dropdowns ===== */

.mainsearchbox .ais-SearchBox-input{
   width: 90%;
   margin-left: 1rem;
   border: none;
}

.mainsearchbox .ais-SearchBox-submit{
   position: absolute;
   left: 0.5rem;
   top: 30%;
   width: fit-content;
}
.mainsearchbox .ais-SearchBox-resetIcon{
   position: absolute;
   right: 1rem;
   top: 30%;
   width: fit-content;
}

.filter-dropdown-panel .ais-SearchBox-input, #burgerMenu .ais-SearchBox-input, .ais-RangeInput-input{
   padding: 0.25rem 0.75rem;
   border: 1px solid #EAEAEA;
   border-radius: 5px;
   font-size: 80%;
}

.filter-dropdown-panel .ais-SearchBox-input:focus, #burgerMenu .ais-SearchBox-input:focus, .ais-RangeInput-input:focus{
   outline: none;
}
.ais-CurrentRefinements-label{
   display: none;
}
.ais-CurrentRefinements-list, .ais-ClearRefinements{
   text-align: left;
}
.ais-CurrentRefinements-category{
   margin: 0 0.25rem;
   border: 1px solid;
   border-radius: 10px;
   padding: 0 0.25rem;
}
.ais-RangeInput-form{
   display: block;
   width: 98%;
}
.ais-SearchBox-form {
   position: relative;
   width: 98%;
}
.ais-RangeInput-separator{
   display:none;
}
.ais-RangeInput-input--max{
   display:none;
}

.ais-RangeInput-label {
   width: 100%;
}
.ais-RangeInput-input{
   width: 100%;
}

.ais-RangeInput-submit{
   display:none;
}
.ais-CurrentRefinements-list, .ais-CurrentRefinements-item{
   display: flex;
   flex-flow: wrap;
}

@media (max-width: 768px) {
   .mainsearchbox::after {
      display: none;
   }
   #search-inputs .search-bar-filter-btn {
      padding: 8px 12px;
      margin-right: 4px;
      border: none;
      border-radius: 10px;
      background-color: #f5f0eb;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      color: #532A21;
   }
}

/* On desktop, the filter bar is always visible */
#burgerMenu {
   display: block;
   position: relative;
   width: 100%;
   /* padding-bottom: 1rem; */
}

/* On mobile, hide by default — JS toggles display:block */
@media (max-width: 768px) {
   #burgerMenu {
      display: none;
      padding: 0.25rem 0;
      margin-top: 0.25rem;
   }
}

.close-btn {
   position: absolute;
   right: 1rem;
   border: none;
   background: none;
   color: var(--remotive-chocolate);
   font-size: 20px;
   cursor: pointer;
   font-weight: bold;
}

.close-btn-top {
   top: 0.5rem;
}

.close-btn-bottom {
   bottom: 0.5rem;
}

/* Allow v2 breadcrumbs to wrap on small screens */
nav.back[aria-label="Breadcrumb"] {
   display: flex;
   flex-wrap: wrap;
   align-items: center;
   gap: 0.15rem 0;
   white-space: normal;
   overflow-wrap: anywhere;
   word-break: break-word;
}

nav.back[aria-label="Breadcrumb"] a,
nav.back[aria-label="Breadcrumb"] span[aria-current="page"] {
   display: inline;
   min-width: 0;
}

nav.back[aria-label="Breadcrumb"] .breadcrumb-separator {
   margin: 0 0.35rem;
   flex: 0 0 auto;
}


.search-btn {
   position: absolute;
   bottom: 20px;
   left: 50%;
   transform: translateX(-50%);
   font-size: 20px;
   /* padding: 10px 20px; */
   /* cursor: pointer; */
}

.blurred {
 filter: blur(1px);
}

.blurred .blurred-text {
 filter: blur(5px);
}

.blurred .jt-expandable {
 display: none;
}
