.buddylist_item {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 15vw;
    height: 5vh;
    border: solid 1px;
    border-color: var(--text-secondary);
    border-radius: 0 2.5vh 2.5vh 0;
    position: relative;
}

.buddylist_item:has(.buddylist_statusmsg_wrapper:hover) {
    z-index: 100;
}

@media (hover: hover) {
    .buddylist_item:hover {
        background-color: var(--bg-buddy-hover);
        cursor: pointer;
    }
}

.buddylist_empty {
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 1vw;
}

.buddylist_empty_add {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 4vh;
    height: 4vh;
    border: 1px solid var(--text-placeholder);
    border-radius: 50%;
    cursor: pointer;
    font-size: 3vh;
    color: var(--text-label);
}

@media (hover: hover) {
    .buddylist_empty_add:hover {
        background-color: var(--bg-hover-icon);
        color: var(--text-strong);
    }
}

.buddylist_empty_text {
    font-size: 1.4vh;
    color: var(--text-desc);
    white-space: nowrap;
}

.buddylist_add_more {
    flex: 1;
    min-height: 5vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    transition: background-color 0.2s ease;
}

.buddylist_add_more_content {
    height: 5vh;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 1vw;
}

.buddylist_add_more.buddylist_add_disabled .buddylist_add_more_content {
    opacity: 0.4;
    pointer-events: none;
}

.buddylist_add_more.buddylist_add_disabled .buddylist_empty_add {
    cursor: not-allowed;
}

.buddylist_add_more.buddylist_trash_mode {
    background-color: rgba(244, 67, 54, 0.1);
}

.buddylist_add_more.buddylist_trash_mode .buddylist_empty_text {
    color: rgba(244, 67, 54, 0.8);
}

.buddylist_add_more.buddylist_trash_mode .buddylist_empty_add {
    background-color: rgba(244, 67, 54, 0.3);
    border-color: rgba(244, 67, 54, 0.5);
}

.buddylist_add_more.buddylist_trash_hover {
    background-color: rgba(244, 67, 54, 0.3);
}

.buddylist_add_more.buddylist_trash_hover .buddylist_empty_add {
    background-color: rgba(244, 67, 54, 0.6);
    transform: scale(1.1);
}

.buddylist_page_selector {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 1vh;
}

.buddylist_page_bar {
    flex: 1;
    cursor: pointer;
    background-color: var(--bg-resize);
    border-radius: 0.5vh;
    transition: background-color 0.2s ease;
}

.buddylist_page_bar:hover {
    background-color: var(--bg-resize-hover);
}

.buddylist_page_bar.buddylist_page_active {
    background-color: red;
}

.buddylist_page_bar.buddylist_page_ringing {
    animation: page-ring-blink 0.8s ease-in-out infinite;
}

@keyframes page-ring-blink {
    0%, 100% { background-color: rgba(100, 100, 100, 0.3); }
    50% { background-color: darkred; }
}

.buddylist_item_status {
    width: 1vw;
    height: 100%;
    background-color: var(--text-secondary);
}

.buddylist_item_left {
    flex: 1;
    min-width: 0;
    max-width: calc(100% - 5.5vw);
    height: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    padding-left: 0.5vw;
    font-size: 1.4vh;
    gap: 0.3vw;
    overflow: hidden;
}

.buddylist_name_container {
    overflow: hidden;
    flex: 1;
    min-width: 0;
}

.buddylist_name {
    display: inline-block;
    white-space: nowrap;
}

.buddylist_name.scrolling {
    animation: buddylist_scroll 4s ease-in-out infinite alternate;
}

@keyframes buddylist_scroll {
    0%, 10% {
        transform: translateX(0);
    }
    90%, 100% {
        transform: translateX(var(--scroll-distance, -50%));
    }
}

.buddylist_statusmsg_wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.buddylist_statusmsg_icon {
    height: min(2vh, 1.5vw);
    width: min(2vh, 1.5vw);
    cursor: pointer;
    flex-shrink: 0;
}

.buddylist_statusmsg_tooltip {
    display: none;
    position: fixed;
    background-color: var(--bg-tooltip);
    color: var(--text-strong);
    font-size: 1.2vh;
    padding: calc(0.8vh + 10px) calc(1vw + 10px);
    border-radius: 0.5vh;
    white-space: pre-wrap;
    min-width: 20vw;
    max-width: 35vw;
    z-index: 200;
    box-shadow: var(--shadow-sm);
}


.buddylist_item_right {
    display: flex;
    justify-content:flex-end;
    align-items: center;
    height: 100%;
    width: min(3.5vw, 5vh);
    flex-shrink: 0;
}

.buddylist_icon_container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.buddylist_item_icon {
    width: 4vh;
    height: 4vh;
    border-radius: 20vw;
    margin: 0.5vh;
    border: solid 1px;
    border-color: var(--text-secondary);
    height: 3vh;
    width: 3vh;
    min-width: 3vh;
}

.buddylist_cmd_icon {
    width: min(2vh, 1.5vw);
    height: min(2vh, 1.5vw);
    margin: 0.1vh;
    border-radius: 50%;
    border: solid 1px;
    border-color: transparent;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
}

@media (hover: hover) {
    .buddylist_cmd_icon:hover {
        border-color: var(--text-secondary);
        background-color: var(--bg-hover-icon);
        cursor: pointer;
    }
}

.bl_status_red {
    background-color: red;
}

.bl_status_green {
    background-color: green;
}

.bl_offline {
    background-color: gray;
}

.bl_busy {
    background-color: red;
}

.bl_idle {
    background-color: green;
}

.bl_ring {
     animation: blinker 1s linear infinite;
}

.bl_avoid {
    background-color: blue;
}


.bi_offline {
    background-color: rgba(128, 128, 128, 0.3);
}

.bi_busy {
    background-color: rgba(255, 70, 70, 0.5);
}

.bi_idle {
    background-color: transparent;
}

.bi_ring {
    background-color: rgba(255, 70, 70, 0.5);
}

@keyframes blinker {
    from,
    49.9% {
          background-color: red;
    }
    50%,
    to {
          background-color: transparent;
    }
}

.bl_status_bubble {
    position: absolute;
    bottom: -2px;
    width: 1.5vh;
    height: 1.5vh;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: solid 1px rgba(0, 0, 0, 0.3);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.bl_status_bubble svg {
    width: 1vh;
    height: 1vh;
}

.bl_status_uml {
    background-color: #2196F3;
}

.bl_status_uml_left {
    right: 1.3vh;
}

.bl_status_uml_right {
    right: -2px;
}

.bl_status_dnd {
    background-color: #f44336;
    right: -2px;
}

/* Status bubble tooltip */
.bl_status_bubble .bl_bubble_tooltip {
    display: none;
    position: absolute;
    top: 50%;
    left: 100%;
    transform: translateY(-50%);
    margin-left: 1vh;
    background-color: var(--bg-bubble-tooltip);
    border-radius: 0.5vh;
    padding: 0.5vh 1vh;
    white-space: nowrap;
    z-index: 1000;
    align-items: center;
    gap: 0.5vh;
    box-shadow: var(--shadow-sm);
}

.bl_status_bubble .bl_bubble_tooltip svg {
    width: 3vh;
    height: 3vh;
    flex-shrink: 0;
}

.bl_status_bubble .bl_bubble_tooltip span {
    font-size: 1.8vh;
    color: var(--text-strong);
}

.bl_status_bubble:hover .bl_bubble_tooltip {
    display: flex;
}

/* Drag & Drop from search to buddylist */
.buddylist_drop_hint {
    outline: 2px dashed rgba(76, 175, 80, 0.5);
    outline-offset: -2px;
}

.buddylist_drop_target {
    outline: 2px solid #4CAF50;
    outline-offset: -2px;
    background-color: rgba(76, 175, 80, 0.1);
}

.search_dragging {
    opacity: 0.5;
}

.search_intern_draggable,
.aktcall_draggable {
    cursor: grab;
}

.search_intern_draggable:active,
.aktcall_draggable:active {
    cursor: grabbing;
}

.aktcall_dragging {
    opacity: 0.5;
}

.calllist_dragging,
.searchlist_dragging {
    opacity: 0.5;
}

.calllist_draggable,
.searchlist_draggable {
    cursor: grab;
}

.calllist_draggable:active,
.searchlist_draggable:active {
    cursor: grabbing;
}
