.ockham-tag-bar {
    --ockham-tag-bar-bg: #00d7d2;
    --ockham-tag-bar-color: #fff;
    --ockham-tag-bar-separator: rgba(255, 255, 255, .65);
    --ockham-tag-list-separator: #e5e5e5;
    position: relative;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.ockham-tag-bar *,
.ockham-tag-bar *::before,
.ockham-tag-bar *::after {
    box-sizing: border-box;
}

/* Barra horizontal */
.ockham-tag-bar[data-layout="bar"] {
    background: var(--ockham-tag-bar-bg);
    color: var(--ockham-tag-bar-color);
    border-radius: 12px;
    overflow: hidden;
}

.ockham-tag-bar__shell {
    display: flex;
    align-items: stretch;
    width: 100%;
    min-width: 0;
}

.ockham-tag-bar__viewport {
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
}

.ockham-tag-bar__viewport::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.ockham-tag-bar__viewport:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: -3px;
}

.ockham-tag-bar__track {
    display: flex;
    align-items: center;
    width: max-content;
    min-width: 100%;
    white-space: nowrap;
}

.ockham-tag-bar__item {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    padding: 10px 18px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.25;
    text-decoration: none;
    white-space: nowrap;
    transition: opacity .18s ease, color .18s ease;
}

.ockham-tag-bar__item:hover,
.ockham-tag-bar__item:focus-visible {
    color: #fff;
    opacity: .78;
    text-decoration: none;
}

.ockham-tag-bar__item:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: -4px;
    border-radius: 6px;
}

.ockham-tag-bar[data-layout="bar"][data-show-separators="yes"] .ockham-tag-bar__item:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 0;
    width: 1px;
    height: 18px;
    background: var(--ockham-tag-bar-separator);
    transform: translateY(-50%);
    pointer-events: none;
}

.ockham-tag-bar__arrow {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    width: 42px;
    min-width: 42px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: var(--ockham-tag-bar-bg);
    color: #fff;
    font: inherit;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    appearance: none;
    box-shadow: none;
    transition: opacity .18s ease, background-color .18s ease, color .18s ease;
}

.ockham-tag-bar__arrow span {
    display: block;
    line-height: 1;
    transform: translateY(-1px);
}

.ockham-tag-bar__arrow:hover:not(:disabled),
.ockham-tag-bar__arrow:focus-visible:not(:disabled) {
    opacity: .78;
}

.ockham-tag-bar__arrow:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: -4px;
}

.ockham-tag-bar__arrow:disabled {
    opacity: .28;
    cursor: default;
}

.ockham-tag-bar.is-no-overflow .ockham-tag-bar__arrow {
    display: none;
}

/* Lista lateral: fluxo inline com separador e quebra automática */
.ockham-tag-bar[data-layout="list"] {
    background: #fff;
    color: #171717;
    border-radius: 12px;
    overflow: hidden;
}

.ockham-tag-bar__list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    width: 100%;
    min-width: 0;
    row-gap: 8px;
}

.ockham-tag-bar__list-item {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 6px;
    min-width: 0;
    max-width: 100%;
    padding: 4px 12px;
    color: #171717;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    text-decoration: none;
    white-space: nowrap;
    background: transparent;
    transition: color .18s ease, background-color .18s ease;
}

.ockham-tag-bar__list-item:hover,
.ockham-tag-bar__list-item:focus-visible {
    color: #171717;
    background: #f4f4f4;
    text-decoration: none;
}

.ockham-tag-bar__list-item:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: -3px;
}

.ockham-tag-bar[data-layout="list"][data-show-list-separators="yes"] .ockham-tag-bar__list-item:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 0;
    width: 1px;
    height: 1em;
    background: var(--ockham-tag-list-separator);
    transform: translateY(-50%);
    pointer-events: none;
}

.ockham-tag-bar__list-label {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ockham-tag-bar__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-width: 1.75em;
    color: #777;
    font-size: .82em;
    font-weight: 600;
    line-height: 1;
    text-align: center;
}

@media (max-width: 767px) {
    .ockham-tag-bar__item {
        padding-left: 14px;
        padding-right: 14px;
        font-size: 13px;
    }

    .ockham-tag-bar__arrow {
        flex-basis: 36px;
        width: 36px;
        min-width: 36px;
        font-size: 24px;
    }
}
