/* Modal container */
.sf-modal {
    position: fixed;
    inset: 0;
    z-index: 1050;
    display: none
}

.sf-modal[aria-hidden="false"] {
    display: block
}

.sf-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .4)
}

.sf-modal__panel {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 420px;
    max-width: 90%;
    background: #fff;
    box-shadow: -2px 0 12px rgba(0, 0, 0, .2);
    display: flex;
    flex-direction: column
}

.sf-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #eee
}

.sf-modal__header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700
}

.sf-modal__close {
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer
}

.sf-modal__content {
    padding: 16px 20px;
    overflow: auto;
    height: 100%
}

/* Fields */
/*.suppliers-filters .sf-field {
    margin-bottom: 16px
}*/

.sf-field__title {
    margin: 0 0 8px 0;
    font-weight: 600;
    font-size: 14px
}

.suppliers-filters select.form-control {
    width: 100%
}

/* Custom select look */
.suppliers-filters .sf-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23000' d='M1.41.59 6 5.17 10.59.59 12 2 6 8 0 2z'/%3E%3C/svg%3E") no-repeat right 12px center/12px 8px;
    border: 1px solid #d8d8d8;
    border-radius: 2px;
    padding: 10px 36px 10px 14px;
    font-size: 14px;
    line-height: 20px;
    color: #1f1f1f;
    cursor: pointer;
}

.suppliers-filters .sf-select:focus,
.suppliers-filters .sf-select:hover {
    outline: none;
    background-color: var(--text-primary);
    border-color: var(--text-primary);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, .06);
    color: var(--background-secondary);
}

.suppliers-filters .sf-select option {
    padding: 8px 10px
}

/* Custom dropdown structure */
.suppliers-filters .sf-native-hidden {
    display: none
}

.suppliers-filters .sf-custom-select {
    position: relative
}

.suppliers-filters .sf-custom-toggle {
    display: block;
    width: 100%;
    text-align: left;
    background: transparent;
    border: 1px solid #d8d8d8;
    border-radius: 2px;
    padding: 10px 36px 10px 14px;
    font-size: 14px;
    line-height: 20px;
    color: #1f1f1f;
    cursor: pointer;
    position: relative;
    background-image: none
}

#suppliers .suppliers-filters .sf-custom-toggle.select-title {
    width: 100%;
    border-radius: 0px;
    justify-content: space-between;
}

#suppliers .suppliers-filters .sf-custom-toggle.select-title .material-icons {
    height: inherit;
    line-height: inherit;
}


.suppliers-filters .sf-custom-toggle:focus,
.suppliers-filters .sf-custom-toggle:hover {
    outline: none;
    background-color: var(--text-primary);
    border-color: var(--text-primary);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, .06);
    color: var(--background-secondary);
    background-image: none;
}

/* arrow that inherits current text color */
/*.suppliers-filters .sf-custom-toggle::after{content:"";position:absolute;right:12px;top:50%;width:8px;height:8px;margin-top:-5px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(45deg);pointer-events:none}*/
.suppliers-filters .sf-custom-select.is-open .sf-custom-toggle::after{transform:rotate(-135deg);margin-top:-3px}

.suppliers-filters .sf-custom-menu {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--background-primary);
    border: 1px solid #d8d8d8;
    border-top: none;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .08);
    max-height: 280px;
    overflow: auto;
    display: none;
    z-index: 50;
    transition: all .2s ease-in-out;
}

.suppliers-filters .sf-custom-select.is-open .sf-custom-menu {
    display: block
}

.suppliers-filters .sf-custom-item {
    padding: 10px 14px;
    font-size: 14px;
    cursor: pointer;
    transition: all .2s ease-in-out;
}

.suppliers-filters .sf-custom-item:hover, .suppliers-filters .sf-custom-item.is-focused {
    background: #111;
    color: var(--background-secondary);
}

.suppliers-filters .sf-custom-item.is-selected {
    font-weight: 600
}

/* Actions */
.sf-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-start;
        margin-top: 0;
    margin-bottom: 20px;
}

/* Desktop toggler placeholder (hook into your button) */
#sf-open-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px
}

/* Filters sidebar (faceted-like) */
.filters-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: 420px;
    max-width: 90%;
    background: #fff;
    box-shadow: -2px 0 12px rgba(0, 0, 0, .2);
    z-index: 1050;
    overflow: auto;
    display: none
}

.filters-sidebar[aria-hidden="false"] {
    display: block
}

/* dropdown positions inside sidebar */
/* lock scrolling when custom select is open */
.filters-sidebar.sf-no-scroll{overflow:hidden}

.filters-sidebar-header {
    display: flex;
    justify-content: flex-end;
/*    padding: 12px 14px;*/
/*    border-bottom: 1px solid #eee*/
}

/*.close-filters {
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer
}*/

@media (max-width: 767px) {
    .sf-modal__panel {
        width: 100%
    }

    .filters-sidebar {
        width: 100%
    }

    /* keep close button visible on mobile */
    .filters-sidebar-header{position: sticky; top: 0; z-index: 200;}

    body#supplier #sf-open-btn {
        display: block;
    }
    #supplier section#suppliers {
        position: relative;
    }
}
