/* ── Tom Select ────────────────────────────────────────────────────────────── */

/* Wrapper */
.ts-wrapper {
    width: 100%;
    max-width: 700px;
    font-family: Archivo, sans-serif;
    font-size: 18px;
    position: relative;
}

/* Control box — the visible input area */
.ts-wrapper.multi .ts-control {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--secondary-color-2);
    border-radius: 4px;
    background: white;
    min-height: 50px;
    padding: 6px 8px;
    cursor: text;
}

.ts-wrapper.multi.focus .ts-control {
    border-color: var(--primary-color-2);
    box-shadow: 0 0 0 3px rgba(16, 113, 128, 0.2);
    outline: none;
}

/* Keep original select accessible to screen readers but visually hidden */
.ts-hidden-accessible {
    border: 0;
    clip: rect(0 0 0 0);
    -webkit-clip-path: inset(50%);
    clip-path: inset(50%);
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    white-space: nowrap;
}

/* Text input inside the control */
.ts-wrapper .ts-control input {
    font-family: Archivo, sans-serif;
    font-size: 18px;
    color: var(--secondary-color-3);
    border: none;
    outline: none;
    background: transparent;
    flex: 1;
    min-width: 120px;
    padding: 2px 0;
}

.ts-wrapper .ts-control input::placeholder {
    color: var(--secondary-color-2);
}

/* Pills */
.ts-control .item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 4px;
    padding: 4px 6px 4px 10px;
    font-size: 16px;
    font-family: Archivo, sans-serif;
    line-height: 1.3;
}

/* × button inside pill */
.ts-control .item .pill-remove {
    display: inline-flex;
    justify-content: center;
    width: 20px;
    height: 20px;
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s, color 0.15s;
}

.ts-control .item .pill-remove:hover {
    background: var(--secondary-accent-color);
    color: white;
}

.ts-control .item .pill-remove:focus-visible {
    outline: 1px solid;
}

/* Dropdown panel */

.ts-dropdown .option:hover,
.ts-dropdown .option.active {
    background: var(--primary-color-4);
    color: var(--primary-color-1);
}

/* No results message */
.ts-dropdown .no-results {
    padding: 10px 12px;
    color: var(--secondary-color-2);
    font-style: italic;
    font-size: 16px;
    text-align: center;
}

/* Highlight mark */
.highlight {
    background: var(--highlight-color);
    color: inherit;
    border-radius: 2px;
    padding: 0 1px;
    font-weight: 600;

}

/* Breadcrumb text inside option */
.sci-option {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sci-option .inner {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.leaf-label {
    font-size: 16px;
    color: var(--secondary-color-3);
    line-height: 1.3;
}

.sci-option .breadcrumb-text {
    font-size: 13px;
    color: var(--secondary-color-2);
    line-height: 1.3;
}

/* Screen reader only utility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}