.tags-field {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
    padding: 0 0.8rem;
    border: 1px solid hsl(0 0% 86%);
    border-radius: 4px;
    width: 100%;
}

.tags-field:focus-within {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 2px rgba(23, 89, 156, 0.3);
}

/* ================================
   Individual tag (pill)
 ================================ */
.tag-pill {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.75rem;
    font-size: 0.9rem;
    line-height: 1;
    background: var(--primary-blue-lighter);
    border: 1px solid var(--primary-blue-medium);
    color: var(--primary-blue);
    border-radius: 290486px; /* super‑round */
    white-space: nowrap;
    gap: 0.5rem;
}

/* ================================
   Close button inside tag
 ================================ */
.tag-pill .remove {
    all: unset; /* strip default button styles */
    display: flex;
    justify-content: center;
    align-items: center;
    width: 18px;
    height: 18px;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1;
    border-radius: 50%;
    background: var(--primary-blue);
    color: #fff;
    cursor: pointer;
    transition: background 0.15s linear;
}

.tag-pill .remove:hover,
.tag-pill .remove:focus-visible {
    background: var(--error-red);
}

/* ================================
   Inner text input
 ================================ */
.tags-field input[type="text"] {
    flex: 1 1 8ch;
    width: auto !important; /* overrides form.css width:100% */
    border: none !important; /* blend into wrapper */
    box-shadow: none !important;
    outline: none;
    font: inherit;
    padding: 0.35rem 0.2rem;
    min-width: 6ch;
}

/* Remove Safari / Chrome search‑cancel icon */
.tags-field input[type="text"]::-webkit-search-decoration,
.tags-field input[type="text"]::-webkit-search-cancel-button,
.tags-field input[type="text"]::-webkit-search-results-button,
.tags-field input[type="text"]::-webkit-search-results-decoration {
    display: none;
}
