.avc-subscriber-count, .avc-count, .avc-count span, .avc-stats {
    -webkit-box-sizing: initial;
    -moz-box-sizing: initial;
    box-sizing: initial;
}
.avc-subscriber-count {
    /*width: 110px;*/
    width: max-content;
    margin: auto;
    overflow: hidden;
    height: 26px;
    color: #424242;
    font: 9px Verdana, Geneva, sans-serif;
    text-align: center;
    letter-spacing: 1px;
}
.avc-subscriber-count.avc-has-history {
    position: relative;
    overflow: visible;
    height: auto;
    min-height: 26px;
    cursor: pointer;
    z-index: 20;
}
.avc-count {
    /*width: 86px;*/
    width: max-content;
    height: 17px;
    line-height: 17px;
    margin: 0 auto;
    background: #ccc;
    border: 1px solid #909090;
    border-top-color: #fff;
    border-left-color: #fff;
}
.avc-count span {
    display: inline-block;
    height: 11px;
    line-height: 12px;
    margin: 2px 1px 2px 2px;
    padding: 0 2px 0 3px;
    background: #e4e4e4;
    border: 1px solid #a2a2a2;
    border-bottom-color: #fff;
    border-right-color: #fff;
}
.avc-stats {
    color: #9ea0a2;
    font-size: 6px;
    line-height: 6px;
    margin: 1px 0 0 1px;
    word-spacing: 2px;
    text-align: center;
    text-transform: uppercase;
}

/* Tip lịch sử — phong cách .ascn-note-tip (A Simple Content Notes) */
.avc-history-tip {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    margin-left: var(--shift-x, 0px);
    transform: translateX(-50%) translateY(4px);
    width: max-content;
    max-width: 280px;
    min-width: 180px;
    background: hsl(0 0% 100%);
    border: 1px solid hsl(0 0% 0% / 7%);
    border-radius: 8px;
    box-shadow:
        0 2px 6px hsl(0 0% 0% / 5%),
        0 12px 32px hsl(0 0% 0% / 8%);
    z-index: 100050;
    padding: 0;
    color: #1f2937;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 12px;
    line-height: 1.4;
    font-weight: 400;
    letter-spacing: 0;
    text-align: left;
    white-space: normal;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
    --avc-history-tip-scrollbar-thumb: #c4c6cb;
    --avc-history-tip-scrollbar-track: hsl(0deg 0% 90.98%);
}

/* Chỉ mở bằng JS (.is-open) — không dùng :hover CSS kẻo cuộn trang vẫn giữ tip */
.avc-has-history.is-open .avc-history-tip,
.avc-history-tip.is-open {
    display: block;
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.avc-history-tip-clip {
    display: flex;
    flex-direction: column;
    border-radius: 7px;
    overflow: hidden;
    max-height: 360px;
}

.avc-history-tip-body {
    display: block;
    box-sizing: border-box;
    flex: 1 1 auto;
    min-height: 0;
    max-height: 280px;
    overflow: auto;
    padding: 10px 6px;
    user-select: text;
    -webkit-user-select: text;
}

.avc-history-tip-body::-webkit-scrollbar {
    -webkit-appearance: none;
    width: 2px;
    height: 2px;
}

.avc-history-tip-body::-webkit-scrollbar-track {
    background: var(--avc-history-tip-scrollbar-track);
    border-radius: 4px;
}

.avc-history-tip-body::-webkit-scrollbar-thumb {
    background: var(--avc-history-tip-scrollbar-thumb);
    border-radius: 4px;
}

@supports not selector(::-webkit-scrollbar) {
    .avc-history-tip-body {
        scrollbar-width: thin;
        scrollbar-color: var(--avc-history-tip-scrollbar-thumb) var(--avc-history-tip-scrollbar-track);
    }
}

.avc-history-tip-row {
    display: block;
}

.avc-history-tip-label {
    display: block;
    margin-bottom: 8px;
    color: #6b7280;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.avc-history-tip-empty {
    color: #6b7280;
    font-size: 12px;
}

.avc-history-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.avc-history-list li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 4px 0;
    border-bottom: 1px solid hsl(0 0% 0% / 6%);
    font-size: 12px;
    line-height: 1.4;
    color: #1f2937;
}

.avc-history-list li:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.avc-history-date {
    color: #6b7280;
    white-space: nowrap;
}

.avc-history-count {
    font-weight: 600;
    color: #1f2937;
}

/* Mũi tên tip (như ascn-note-tip) - tip nằm trên counter */
.avc-history-tip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: var(--shift-x, 0px);
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: hsl(0 0% 100%);
}

.avc-history-tip::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: var(--shift-x, 0px);
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: hsl(0 0% 93%);
}

.avc-history-tip.is-below {
    bottom: auto;
    top: calc(100% + 8px);
    transform: translateX(-50%) translateY(-4px);
}

.avc-has-history.is-open .avc-history-tip.is-below,
.avc-history-tip.is-below.is-open {
    transform: translateX(-50%) translateY(0);
}

.avc-history-tip.is-below::after {
    top: auto;
    bottom: 100%;
    border-top-color: transparent;
    border-bottom-color: hsl(0 0% 100%);
}

.avc-history-tip.is-below::before {
    top: auto;
    bottom: 100%;
    border-top-color: transparent;
    border-bottom-color: hsl(0 0% 93%);
}
