:root {
    --ss-primary-color: #E5E7EB;
    --ss-bg-color: #ffffff;
    --ss-font-color: #374151;
    --ss-placeholder-color: #d1d5db;
    --ss-disabled-color: #f9fafb;
    --ss-border-color: #D0D3D8;
    --ss-highlight-color: #fcd34d;
    --ss-success-color: #22c55e;
    --ss-error-color: #f43f5e;
    --ss-focus-color: var(--ss-primary-color);

    --ss-main-height: 50px;
    --ss-content-height: 300px;
    --ss-search-height: 40px;
    --ss-option-height: 38px;

    --ss-spacing-l: 7px;
    --ss-spacing-m: 5px;
    --ss-spacing-s: 3px;

    --ss-animation-timing: 0.2s;
    --ss-border-radius: 12px;
}

@keyframes ss-valueIn {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes ss-valueOut {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(0); opacity: 0; }
}

.ss-hide {
    display: none !important;
}

.ss-main {
    display: flex;
    flex-direction: row;
    position: relative;
    user-select: none;
    color: var(--ss-font-color);

    min-height: var(--ss-main-height);
    height: var(--ss-main-height);

    width: 100%;
    padding: 6px 12px;
    cursor: pointer;
    border: 1px solid var(--ss-border-color);
    border-radius: var(--ss-border-radius);
    background-color: #FAFAFA;
    outline: 0;
    box-sizing: border-box;
    transition: all var(--ss-animation-timing);
    overflow: hidden;
    font-size: 0.875rem;
}

.ss-main:hover {
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.ss-main:focus {
    outline: none;
}

.ss-main.ss-disabled,
.ss-main.disabled {
    color: #6b7280;
    background-color: var(--ss-disabled-color);
    cursor: not-allowed;
}

.ss-values {
    display: inline-flex;
    flex-wrap: wrap;
    gap: var(--ss-spacing-m);
    align-items: center;
    padding-left: 0;
    flex: 1 1 100%;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.ss-main .ss-values .ss-placeholder {
    display: block;
    width: 100%;
    min-width: 0;
    padding: var(--ss-spacing-s) var(--ss-spacing-m);
    margin: auto 0 auto 0;
    line-height: 1em;
    color: var(--ss-placeholder-color);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.ss-max {
    display: flex;
    align-items: center;
    font-size: 12px;
    color: var(--ss-bg-color);
    padding: var(--ss-spacing-s) var(--ss-spacing-m);
    background-color: var(--ss-primary-color);
    border-radius: var(--ss-border-radius);
}

.ss-single {
    display: block;
    margin: auto 0 auto var(--ss-spacing-s);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.ss-value {
    display: flex;
    align-items: center;
    width: fit-content;
    background-color: #f3f3f5;
    border-radius: 0.25rem;
    margin: 0;
    height: 20px;
    animation-name: ss-valueIn;
    animation-duration: var(--ss-animation-timing);
    animation-timing-function: ease-out;
    animation-fill-mode: both;
}

.ss-value.ss-value-out {
    animation-name: ss-valueOut;
}

.ss-value-text {
    flex: 1;
    min-width: 0;
    font-size: 0.75rem;
    color: #6b7280;
    padding: 0.25rem 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ss-value-delete {
    display: flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
}

.ss-value-delete svg {
    width: 7px;
    height: 7px;
}

.ss-value-delete svg path {
    fill: none;
    stroke: var(--ss-primary-color);
    stroke-width: 18;
}

.ss-arrow {
    display: flex;
    align-items: center;
    width: 12px;
    height: 12px;
    margin: auto 5px;
}

.ss-arrow path {
    fill: none;
    stroke: #d1d5db;
    stroke-width: 18;
    transition: all 0.2s ease-out;
}

.ss-content {
    position: absolute;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-height: var(--ss-content-height);
    border: 1px solid var(--ss-border-color);
    background-color: var(--ss-bg-color);
    border-radius: var(--ss-border-radius);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1),
    0 4px 6px -2px rgba(0,0,0,0.05);
    overflow-y: auto;
    z-index: 50;
    transition: transform var(--ss-animation-timing), opacity var(--ss-animation-timing);
    opacity: 0;
    transform: scaleY(0);
}

.ss-content.ss-open {
    opacity: 1;
    transform: scaleY(1);
}

.ss-option {
    display: flex;
    align-items: center;
    padding: 8px;
    min-height: var(--ss-option-height);
    color: var(--ss-font-color);
    cursor: pointer;
    transition: all var(--ss-animation-timing);
}

.ss-option:hover:not(.ss-disabled) {
    background-color: #e5e7eb;
}

.ss-option.ss-highlighted,
.ss-option.ss-selected {
    background-color: var(--ss-primary-color);
    color: #000000;
}

.ss-search-highlight {
    background-color: var(--ss-highlight-color);
}

.ss-search {
    display: flex;
    border-bottom: 1px solid var(--ss-border-color);
}

.ss-content .ss-search input {
    flex: 1;
    height: var(--ss-search-height);
    padding: var(--ss-spacing-m) var(--ss-spacing-l);
    border: none;
    background-color: var(--ss-bg-color);
    outline: none;
}

.ss-option.ss-selected::after {
    content: '';
    display: block;
    width: 6px;
    height: 12px;
    border: solid #9ca3af;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-left: auto;
    margin-bottom: 2px;
}