.badge {
    display: flex;
    justify-content: flex-start;
    user-select: none;
    align-items: center;
    margin-top: 4px;
    margin-bottom: 4px;
    border-radius: 10px;
    background-color: rgb(34, 34, 34);
    box-sizing: border-box;
    transition: background-color 0.3s ease, width 0.4s ease;
    gap: 8px;
    overflow: hidden;
    position: relative;
    pointer-events: auto;
}

.badge-tiny {
    border-radius: 12px;
    height: 24px;
    min-height: 24px;
    flex-direction: row;
    padding: 2px 4px 2px 2px;
    cursor: pointer;
    gap: 4px !important;
}

.badge-small {
    height: 40px;
    min-height: 40px;
    width: 220px;
    flex-direction: row;
    padding: 8px 8px 8px 4px;
    cursor: pointer;
}

.badge-big {
    width: 100%;
    min-width: 220px;
    max-width: 250px;
    flex-direction: column;
    min-height: 120px;
    max-height: 480px;
    border-radius: 24px;
    gap: 0;
}

.badge-collapsed {
    height: 40px;
    min-height: 40px;
    width: 40px;
    padding-right: 4px;
}

/* визуальные стили */

.badge-active {
    background-color: rgb(44, 44, 44);
}

.badge-small:hover {
    background-color: rgb(56, 56, 56);
}

.badge--dark {
    background-color: rgb(32, 32, 32);
}

/* составные элементы беджей */

.badge-avatar-container {
    position: relative;
}

.badge-avatar {
    border-radius: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    flex-shrink: 0;
    background-color: rgb(46, 46, 46);
    z-index: 2;
}

.badge-status-point-main {
    position: absolute;
    display: flex;
    flex-direction: row;
    background-color: rgb(34, 34, 34);
    z-index: 3;
    bottom: 0;
    right: 0;
    transition: width 0.5s ease;
    box-sizing: border-box;
}

.badge-status-point-main--active {
    cursor: pointer;
}

.badge-status-point-additional {
    background-color: rgb(66, 66, 66);
    width: 100%;
    height: 100%;
    border-radius: 999px;
    transition: inherit;
}

.badge-main-text {
    font-family: 'Open Sans', sans-serif;
    color: rgb(200, 200, 200);
    font-size: 14px;
    /*flex: 1;*/
    min-width: 0;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
    z-index: 2;
}

.badge-icon {
    width: 20px;
    height: 20px;
    margin-left: 6px;
    pointer-events: none;
}

.badge-icon svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.badge-symbol {
    z-index: 4;
    width: 16px;
    height: 16px;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    fill: currentColor;
    pointer-events: all !important;
}

.badge-symbol-container {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    right: 0px;
    /*cursor: pointer;*/
    pointer-events: none;
}

.connection-glow {
    width: 14px;
    position: absolute;
    right: 4px;
    transition: width 1.2s ease;
    z-index: 1;
}

.badge:hover .connection-glow {
    width: 36px;
}

.outgoing-connection-glow {
    top: 0px;
}

.ingoing-connection-glow {
    bottom: 0px;
}

/* badge-cover */

.badge-cover {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    color: rgb(74, 74, 74);
    height: 96px;
    width: 100%;
    transition: height 0.5s ease;
    z-index: 1;
}

/* badge-body */

.badge-body {
    display: flex;
    height: 100%;
    width: 100%;
    position: relative;
    box-sizing: border-box;
    padding: 38px 10px 8px 10px;
    flex-direction: column;
    justify-content: flex-start;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    background-color: rgb(34, 34, 34);
    box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.4);
    transition: box-shadow 0.5s ease, margin 0.5s ease;
    margin-top: 64px;
    z-index: 2;
}

.badge-body--with-additional {
    padding-bottom: 64px;
}

.badge:hover .badge-body {
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.4);
    margin-top: 80px;
}

.badge-additional-body {
    display: flex;
    height: auto;
    width: 100%;
    position: relative;
    box-sizing: border-box;
    padding: 4px;
    flex-direction: column;
    justify-content: flex-start;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    background-color: rgb(34, 34, 34);
    box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.4);
    transition: box-shadow 0.5s ease, margin 0.5s ease;
    z-index: 3;
    margin-top: -52px;
}

.badge:hover .badge-additional-body {
    box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.4);
    margin-top: -26px;
}

/* badge-row */

.badge-row {
    display: flex;
    width: 100%;
    flex-direction: row;
    justify-content: flex-start;
    flex-wrap: nowrap;
    align-items: center;
    margin-top: 4px;
    margin-bottom: 4px;
}

.badge-row-allow-wrap {
    flex-wrap: wrap;
}

.badge-signs-chip {
    position: absolute;
    top: 0;
    right: 18px;
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    background-color: rgb(24, 24, 24);
    height: 24px;
    min-width: 24px;
    border-radius: 8px;
    padding: 4px;
    gap: 4px;
    z-index: 2;
    transform: translateY(-50%);
    box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.4);
    transition: box-shadow 0.5s ease;
}

.badge:hover .badge-signs-chip {
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.4);
}

.badge-sign {
    height: 16px;
    width: 16px;
}

.badge-sign img {
    display: block;
    width: 100%;
    height: 100%;
}

/* Наложение стилей*/

/* .badge-big .badge-main-text {
    user-select: text;
}*/

.badge-collapsed .badge-main-text {
    display: none;
}

.badge-collapsed .badge-symbol-container {
    display: none;
}

.badge-tiny .badge-avatar-container {
    width: 20px;
    height: 20px;
}

.badge-small .badge-avatar-container {
    width: 32px;
    height: 32px;
}

.badge-big .badge-avatar-container {
    width: 64px;
    height: 64px;
    position: absolute;
    top: 0;
    left: 18px;
    transform: translateY(-50%);
    border-radius: 50%;
    box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.4);
    transition: box-shadow 0.5s ease;
}

.badge-big:hover .badge-avatar-container {
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.4);
}

.badge-status-point-small {
    width: 10px;
    height: 10px;
    border-radius: 5px;
    padding: 3px;
}

.badge-status-point-big {
    width: 14px;
    height: 14px;
    bottom: 2px;
    right: 2px;
    border-radius: 7px;
    padding: 4px;
}

.badge:hover .badge-status-point-main--active.badge-status-point-small {
    width: 16px; /* 10px * 2 */
}

.badge:hover .badge-status-point-main--active.badge-status-point-big {
    width: 22px; /* 14px * 2 */
}

.badge-glowing-point {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    background-color: transparent;
    pointer-events: none;
}

.badge-glowing-point-outgoing {
    top: 16px;
}

.badge-glowing-point-ingoing {
    bottom: 16px;
}

/* portrait */

.portrait {
    display: flex;
    user-select: none;
    align-items: center;
    border-radius: 50%;
    background-color: rgb(74, 74, 74);
    box-sizing: border-box;
    transition: background-color 0.3s ease;
    pointer-events: auto;
    padding: 4px;
    margin: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.portrait:hover {
    background-color: rgb(102, 102, 102);
}

.portrait--medium {
    height: 40px;
    width: 40px;
}

.portrait--tiny .badge-avatar-container {
    width: 20px;
    height: 20px;
}

.portrait--medium .badge-avatar-container {
    width: 32px;
    height: 32px;
}

.portrait-big .badge-avatar-container {
    width: 64px;
    height: 64px;
    position: absolute;
    top: 0;
    left: 18px;
    transform: translateY(-50%);
    border-radius: 50%;
    box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.4);
    transition: box-shadow 0.5s ease;
}

/* holder */

.chat-badge-holder {
    display: flex;
    justify-content: flex-start;
    flex-direction: row;
    user-select: none;
    align-items: center;
    box-sizing: border-box;
    height: 40px;
    min-height: 40px;
    width: 240px;
    margin-top: 4px;
    margin-bottom: 4px;
    padding-left: 10px;
    padding-right: 10px;
    position: relative;
    pointer-events: auto;
}

.chat-indicator {
    position: absolute;
    display: flex;
    height: 8px;
    width: 8px;
    border-radius: 4px;
    left: 0;
    transform: translateX(-50%);
    transition: height 0.4s ease;
}

.chat-indicator--active {
    background-color: rgb(180, 180, 180);
}

.chat-badge-holder:hover .chat-indicator {
    height: 14px;
}
