@import './treeselectjs.css';

.treeselect-input {
    font-size: 0.875rem;
    color: var(--gray-950);
    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: var(--color-white);
}

.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 {
    color: var(--gray-400);
    cursor: default;
}

html.dark .treeselect-input__edit::placeholder,
html.dark .treeselect-list__empty {
    color: var(--gray-500);
    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;
    border-radius: var(--radius-lg);
    background-color: var(--color-white);
    --tw-ring-color: color-mix(in oklab, var(--gray-950) 5%, transparent);
    --tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 4px 6px -4px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
    --tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);
    box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
    border: none;
}

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

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

.treeselect-list__item:hover,
.treeselect-list__item--focused {
    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-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 {
    --color-50: var(--primary-50);
    --color-600: var(--primary-600);
    --tw-ring-inset: inset;
    --tw-ring-color: color-mix(in oklab, var(--color-600) 10%, transparent);
    --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);
    align-items: center;
    background-color: var(--color-50);
    border-radius: 0.375rem;
    box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
    color: var(--text);
    display: inline-flex;
    font-size: 0.75rem;
    --tw-font-weight: var(--font-weight-medium);
    font-weight: var(--font-weight-medium);
    gap: 0.25rem;
    line-height: 1rem;
    padding: 0.25rem 0.5rem;
    word-break: break-all;
}

html.dark .treeselect-input__tags-element {
    --tw-ring-color: color-mix(in oklab, var(--color-400) 30%, transparent);
    background-color: color-mix(in oklab, var(--color-400) 10%, transparent);
    color: var(--dark-text);
}

.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: var(--primary-600);
}

.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: var(--color-white);
}

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: var(--primary-50);
}

.treeselect-input__tags-element:hover .treeselect-input__tags-cross svg {
    stroke: var(--gray-950);
}

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: var(--primary-600);
}

html.dark .treeselect-input__tags-element {
    color: var(--primary-400);
}

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

html.dark .treeselect-input__tags-cross svg {
    stroke: var(--color-white);
    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;
}
