@import './treeselectjs.css';

.treeselect-input {
    font-size: 0.875rem;
    color: rgba(var(--gray-950), var(--tw-text-opacity));
    transition-duration: 75ms;
    border-style: none;
    line-height: 1.5rem;
    outline: 2px solid transparent;
    outline-offset: 2px;
    background: transparent;
}

html.dark .treeselect > .treeselect-input {
    color: rgb(255 255 255 / var(--tw-text-opacity)) !important;
}

.treeselect-input--opened.treeselect-input--bottom {
    border: inherit;
    border-radius: inherit;
}

.treeselect-input__edit {
    background: transparent;
}

.treeselect-list__empty-icon {
    display: none;
}

.treeselect-input__edit::placeholder, .treeselect-list__empty {
    --tw-text-opacity: 1;
    color: rgba(var(--gray-400), var(--tw-text-opacity));
    cursor: default;
}

.treeselect-input__clear svg {
    display: none;
}

.treeselect-input__clear {
    background-color: transparent;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMSIgaGVpZ2h0PSIyMSI+PGcgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJtMi41OTIuMDQ0IDE4LjM2NCAxOC4zNjQtMi41NDggMi41NDhMLjA0NCAyLjU5MnoiLz48cGF0aCBkPSJNMCAxOC4zNjQgMTguMzY0IDBsMi41NDggMi41NDhMMi41NDggMjAuOTEyeiIvPjwvZz48L3N2Zz4=');
    background-position: 50%;
    background-repeat: no-repeat;
    background-size: .7142em .7142em;
    border-width: 0;
    inset-inline-end: 0;
    margin-inline-end: 2.25rem;
    opacity: .5;
    outline: 2px solid transparent;
    outline-offset: 2px;
    padding: 0;
    position: absolute;
    text-indent: -9999px;
    top: calc(50% - 0.38em);
    transition-duration: 75ms;
    transition-property: opacity;
    transition-timing-function: cubic-bezier(.4,0,.2,1);
    width: 1rem;
    height: 10px;
}

.dark .treeselect-input__clear {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMSAyMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSIjZmZmIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yLjU5Mi4wNDRsMTguMzY0IDE4LjM2NC0yLjU0OCAyLjU0OEwuMDQ0IDIuNTkyeiIvPjxwYXRoIGQ9Ik0wIDE4LjM2NEwxOC4zNjQgMGwyLjU0OCAyLjU0OEwyLjU0OCAyMC45MTJ6Ii8+PC9nPjwvc3ZnPg==');
}

.treeselect-list__empty {
    padding-top: 18px;
    padding-bottom: 18px;
}

.treeselect-input__tags-count {
    margin-left: 9px;
}

.treeselect-list {
    font-size: 0.875rem;
    line-height: 1.25rem;
    margin-top: 0.5rem;
    border-radius: 0.5rem;
    padding: 0.25rem;
    --tw-bg-opacity: 1;
    --tw-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
        0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color),
        0 4px 6px -4px var(--tw-shadow-color);
    --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0
        var(--tw-ring-offset-width) var(--tw-ring-offset-color);
    --tw-ring-shadow: var(--tw-ring-inset) 0 0 0
        calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);
    --tw-ring-color: rgba(var(--gray-950), 0.05);
    background-color: rgb(255 255 255 / var(--tw-bg-opacity));
    border-radius: 0.5rem;
    box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000),
        var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
    box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow),
        var(--tw-shadow, 0 0 #0000);
    border: none;
}

.treeselect-list__item {
    padding: 1.1rem;
    border-radius: 0.475rem;
}

.treeselect-list.treeselect-list--single-select
    .treeselect-list__item--single-selected {
    --tw-bg-opacity: 1;
    background-color: var(--gray-50) !important;
}

.treeselect-list__item:hover,
.treeselect-list__item--focused {
    --tw-bg-opacity: 1;
    background-color: var(--gray-50) !important;
}

.treeselect-list.treeselect-list--single-select
    .treeselect-list__item--single-selected {
    font-weight: 500;
}

html.dark .treeselect-list {
    --tw-bg-opacity: 1;
    --tw-ring-color: hsla(0, 0%, 100%, 0.1);
    background-color: var(--gray-900);
}

html.dark .treeselect-list {
    --tw-bg-opacity: 1;
    --tw-ring-color: hsla(0, 0%, 100%, 0.1);
    background-color: var(--gray-900);
}

.treeselect-input__edit {
    border: transparent !important;
    --tw-ring-color: none !important;
    --tw-ring-shadow: none !important;
}

html.dark
    .treeselect-list.treeselect-list--single-select
    html.dark.treeselect-list__item--single-selected,
html.dark .treeselect-list__item--focused,
html.dark .treeselect-list__item:hover,
html.dark
    .treeselect-list.treeselect-list--single-select
    .treeselect-list__item--single-selected,
html.dark .treeselect-list__item--focused,
html.dark .treeselect-list__item:hover {
    background-color: hsla(0, 0%, 100%, 0.05) !important;
}

html.dark .treeselect-list__item--checked,
.treeselect-list__item--checked {
    background: transparent;
}

.treeselect-input__tags-element {
    --tw-bg-opacity: 1;
    --tw-text-opacity: 1;
    --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0
        var(--tw-ring-offset-width) var(--tw-ring-offset-color);
    --tw-ring-shadow: var(--tw-ring-inset) 0 0 0
        calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);
    --tw-ring-inset: inset;
    --tw-ring-color: rgba(var(--primary-600), 0.1);
    align-items: center;
    background-color: rgba(var(--primary-50), var(--tw-bg-opacity));
    border-radius: 0.375rem;
    box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow),
        var(--tw-shadow, 0 0 #0000);
    color: rgba(var(--primary-600), var(--tw-text-opacity));
    display: inline-flex;
    font-size: 0.75rem;
    font-weight: 500;
    gap: 0.25rem;
    line-height: 1rem;
    padding: 0.25rem 0.5rem;
    word-break: break-all;
}

html.dark .treeselect-input__tags-element {
    --tw-text-opacity: 1;
    --tw-ring-color: rgba(var(--primary-400), 0.3);
    background-color: rgba(var(--primary-400), 0.1);
    color: rgba(var(--primary-400), var(--tw-text-opacity));
}

.treeselect-list__item-checkbox-container {
    border-radius: 0.25rem;
    height: 16px;
    min-width: 16px;
    width: 16px;
}

.treeselect-list__item--checked .treeselect-list__item-checkbox-container,
.treeselect-list__item--partial-checked
    .treeselect-list__item-checkbox-container {
    background-color: rgba(var(--primary-600), var(--tw-text-opacity));
}

.treeselect-list__item-checkbox {
    transition-duration: 75ms;
    background-color: transparent !important;
    border: none;
}

.treeselect-list__item-checkbox-container {
    background-color: #f8f5f5;
    border: none;
}

html.dark .treeselect-list__item-checkbox-container {
    border: rgb(255 255 255 / var(--tw-text-opacity));
}

html.dark .treeselect-list__item-checkbox-container {
    background-color: hsla(0, 0%, 100%, 0.05);
}

.treeselect-list__item-checkbox-icon {
    height: 80%;
    left: 0.1rem;
    top: 0.1rem;
    width: 80%;
}

.treeselect-input__tags-element:hover {
    background-color: rgba(var(--primary-50), var(--tw-bg-opacity));
}

.treeselect-input__tags-element:hover .treeselect-input__tags-cross svg {
    stroke: rgba(var(--gray-950), var(--tw-text-opacity));
}

html.dark
    .treeselect-input__tags-element:hover
    .treeselect-input__tags-cross
    svg {
    stroke: rgb(255 255 255 / var(--tw-text-opacity));
}

.treeselect-input__tags-element {
    color: rgba(var(--primary-600), var(--tw-text-opacity));
}

html.dark .treeselect-input__tags-element {
    color: rgba(var(--primary-400), var(--tw-text-opacity));
}

html.dark .treeselect-input__tags-cross svg {
    stroke-width: 3px;
}

html.dark .treeselect-input__tags-cross svg {
    stroke: rgb(255 255 255 / var(--tw-text-opacity));
    opacity: 0.5;
}

html.dark .treeselect-input__tags-element:hover svg {
    opacity: 0.6;
}

.treeselect-input__clear svg {
    opacity: 0.5;
}

.treeselect-input__tags {
    margin-left: 3px;
}

.treeselect--disabled .treeselect-input__tags-cross {
    display: none;
}

.treeselect--disabled .treeselect-input__arrow {
    display: none;
}

.treeselect-input__arrow {
    margin-right: 7px;
}

.treeselect--disabled .treeselect-input__clear {
    display: none;
}

.treeselect-list__item--disabled {
    cursor: not-allowed !important;
}

html.dark
    .treeselect-list__item--disabled
    .treeselect-list__item-checkbox-container {
    background-color: hsl(0deg 0% 30.77% / 5%);
}

[dir='rtl'] .treeselect-input__operators {
    left: 2px !important;
    right: unset;
}

[dir='rtl'] .treeselect-input {
    padding: 2px 4px 2px 40px;
}

.treeselect-input__arrow svg, .treeselect-input__arrow svg:hover {
    stroke: #6b7280;
    height: 20px;
    min-width: 18px;
    width: 15px;
    cursor: auto;
}

@media (max-width: 768px) {
    
    .treeselect-input,
    .treeselect-list,
    .treeselect-input__tags-element,
    .treeselect-input__tags-count,
    .treeselect-input__edit,
    .treeselect-list__item-label,
    .treeselect-list__item-label-counter,
    .treeselect-list__empty-text {
        font-size: 16px;
    }
}

[dir='rtl'] .treeselect-input__arrow {
    margin-left: 7px;
}