/* ============================================================
   Keywords as chips on the site's forms (keyword-chips.js), the same look as the user panel's: the chips and the
   typing input inside one field, which lights up when focused. Classes: kc-.
   ============================================================ */
.kc-box {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    min-height: 48px;
    padding: 6px 8px;
    border-radius: 14px;
    border: 1px solid var(--ds-input-line);
    background: var(--ds-soft);
    cursor: text;
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

    .kc-box:focus-within {
        border-color: var(--ds-red);
        background: var(--ds-surface);
        box-shadow: var(--ds-ring);
    }

.kc-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding-block: 2px;
    padding-inline: 10px 6px;
    border-radius: 8px;
    background: var(--ds-red-soft);
    color: var(--ds-red);
    font-size: 13px;
    font-weight: 700;
    animation: kc-in .25s ease;
}

    .kc-chip button {
        width: 18px;
        height: 18px;
        padding: 0;
        border: none;
        border-radius: 50%;
        background: none;
        color: inherit;
        font-size: 10px;
        cursor: pointer;
    }

        .kc-chip button:hover {
            background: rgba(201, 29, 19, 0.15);
        }

/* the typing input: no field look of its own (the box is the field) */
.cg-field .kc-box input.kc-in,
.kc-box input.kc-in {
    flex: 1;
    min-width: 140px;
    width: auto;
    height: 34px;
    padding: 0 6px;
    border: none;
    border-radius: 0;
    background: none;
    box-shadow: none;
    color: var(--ds-ink);
    font-family: inherit;
    font-size: 14px;
    outline: none;
}

    .kc-box input.kc-in::placeholder {
        color: var(--ds-placeholder);
    }

@keyframes kc-in {
    from { opacity: 0; transform: scale(.8); }
}

@media (prefers-reduced-motion: reduce) {
    .kc-chip {
        animation: none;
    }
}
