.xray-off .tags-icon {
    display: none;
}

.tags-icon {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    font-size: clamp(9px, 3px + 10cqw, 28px);
    background-image: url('./icons/tags-icon-off.png');
    background-size: contain;
    background-repeat: no-repeat;
    width: var(--bubble-tag-icon-size);
    aspect-ratio: 1/1;
    height: auto;
}

.tagged .tags-icon {
    background-image: url('./icons/tags-icon-on.png');
}

.tags-container {
    position: absolute;
    top: calc(var(--bubble-tag-icon-size) + 110%);
    left: 52%;
    width: clamp(75px,70cqw,200px);
    height: auto;
    min-height: clamp(15px,5cqw,30px);
    transform: translateX(-50%);
    padding-bottom: clamp(2px,2cqw,5px);
    padding-left: 2cqw;
    padding-right: 2cqw;
    display: flex;
    flex-wrap: wrap;
    background-color: var(--menu-background-color) !important;
    border-radius: 8px;
    z-index: 999;
    transition: opacity 0.3s ease-in-out, transform 0.2s ease-out;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.tags-container .tag-element {
    margin-top: clamp(2px,2cqw,5px);
    margin-right: clamp(2px,2cqw,5px);
}

.tag-element{
    display: flex;
    align-items: center;
    background-color: var(--tag-element-background);
    border-radius: 10px;
    padding: 2px 5px 4px 5px;
    width: fit-content;
    cursor: pointer;
}

.new.tag-element {
    cursor: text !important;
}

.tag-element-name {
    color: var(--tag-element-text);
    font-weight: 500;
    font-size: clamp(7px,3px + 4cqw,16px);
    outline: none;
    resize: none;
    text-align: left;
}

.new.tag-element-name {
    min-width: 50px;
}

.tag-element-name.empty::before {
    content: attr(data-placeholder);
    color: var(--tag-element-text);
    font-style: italic;
}
/* Floating Tags */


.floating-tags {
    position: absolute;
    border-radius: 4px;
    z-index: 1000;
    min-width: 20px;
    background: transparent;
    background: transparent;
    background-color: transparent;
}

.floating-tag-header {
    display: flex;
    gap: 4px;
    min-width: fit-content;
    padding-top: 4px;
    padding-bottom: 6px;
    padding-left: 6px;
    padding-right: 6px;
    background-color: var(--menu-background-color);
    max-width: 100%;
    justify-content: flex-start;
    cursor: grab;
}

.floating-tags-scroller {
    max-height: 200px;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    align-items: left;
    gap: 3px;
    padding: 3px;
    background-color: rgba(255, 255, 255, 0.5);
}


.floating-tags-title {
    font-weight: bold;
    font-family: 'Calibri', sans-serif;
    height: min-content;
    width: fit-content;
    width: 14px;
    height: 15px;
    font-size: 16px;
    margin-right: 3px;
    color: #255992;
    border-radius: 20%;
    scale: 1.3;
    transform: scaleX(1.4) translateY(-10%);
}

.floating-tag-close {
    background-image: url('./icons/dropdown.png');
    background-size: contain;
    background-repeat: no-repeat;
    width: 16px;
    height: 16px;
    padding-top: 2px;
    padding-bottom: 0px;
    cursor: pointer;
    transform: rotate(180deg);
}

.floating-tag {
    align-items: center;
    gap: 4px;
    padding: 5px 0px;
    padding-left: 6px;
}

.floating-tag:hover {
    background: #f0f0f0;
}

.floating-tags.closed .floating-tags-scroller {
    display: none;
}

.floating-tags.closed .floating-tag-close {
    transform: rotate(0deg) translateY(3px);
}

/* change color of even floating tags */
.floating-tag:nth-child(even) {
    background: #ececec;
}

/* default state: scrollbar is hidden (width = 0) */
.floating-tags-scroller::-webkit-scrollbar {
  width: 6px;   
  transition: width 0.2s;
}

/* track (background of scrollbar) */
.floating-tags-scroller::-webkit-scrollbar-track {
  background: transparent;
}

/* thumb (draggable part) */
.floating-tags-scroller::-webkit-scrollbar-thumb {
  background: #b7b7b7;
  border-radius: 10px;
}

/* thumb hover (optional) */
.floating-tags-scroller::-webkit-scrollbar-thumb:hover {
  background: #999999;
}
