/* Стили для панели пользователя */
.userResult {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    cursor: pointer;
    min-height: 44px;
    animation: fadeInUp 0.3s ease-out;
    position: relative;
}

.userResult:hover {
    background-color: rgba(78, 80, 88, 0.3);
}

.userResult:active {
    background-color: rgba(78, 80, 88, 0.5);
}

.userRequest {
    display: flex;
    align-items: center;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    cursor: pointer;
    min-height: 44px;
    padding: 10px 16px;
}

.userRequest:hover {
    background-color: rgba(78, 80, 88, 0.3);
}

.userRequest:active {
    background-color: rgba(78, 80, 88, 0.5);
}

/* Стили для аватара пользователя */
.imageSearchUser {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 12px;
    flex-shrink: 0;
}

/* Стили для имени пользователя */
.usernameSearch {
    color: rgb(225, 225, 225);
    font-family: 'gg sans', 'Noto Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.2;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

/* Стили для кнопки отправки запроса */
.buttonRequest {
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 20px;
}

.buttonRequest:hover {
    background-color: transparent;
    transform: scale(1.1);
    /* Увеличиваем масштаб */
}

.buttonRequest:active {
    background-color: transparent;
    transform: scale(0.9);
    /* Уменьшаем масштаб */
}

/* Стиль для иконки внутри кнопки */
.iconRequest {
    width: 35px;
    height: 35px;
    filter: brightness(0) saturate(100%) invert(74%) sepia(0%) saturate(0%) hue-rotate(180deg) brightness(90%) contrast(90%);
    transition: filter 0.2s ease;
}

.buttonRequest:hover .iconRequest {
    filter: brightness(0) saturate(100%) invert(88%) sepia(0%) saturate(0%) hue-rotate(180deg) brightness(105%) contrast(105%);
}

/* Стили для состояний загрузки */
.userResult:not(:has(img[src])) .imageSearchUser {
    background: linear-gradient(90deg, #4f545c 0%, #5d6269 50%, #4f545c 100%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

.descriptionUser {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 42px;
    position: relative;
}

/* Когда есть pendingText, имя поднимается выше */
.descriptionUser:has(.pendingText) .usernameSearch {
    line-height: 1;
    margin-bottom: 2px;
}

.panel {
    padding: 0px
}

.content {
    padding: 0px;
}

/* Стили для текста ожидания */
.pendingText {
    color: #b9bbbe;
    font-family: 'gg sans', 'Noto Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.2;
    white-space: normal;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .add-panel {
        padding: 10px 0px 20px 15px;
    }

    .descriptionUser {
        flex-grow: 1;
    }

    .userResult {
        padding: 10px 12px;
        margin: 2px 4px;
    }

    .imageSearchUser {
        width: 36px;
        height: 36px;
        margin-right: 14px;
    }

    .usernameSearch {
        font-size: 17px;
    }

    .buttonRequest {
        width: 32px;
        height: 32px;
        right: 40px;
    }

    .iconRequest {
        width: 35px;
        height: 35px;
    }

    .descriptionUser {
        min-height: 36px;
    }

    .usernameSearch {
        font-size: 17px;
    }

    .descriptionUser:has(.pendingText) .usernameSearch {
        margin-bottom: 1px;
    }

    .pendingText {
        font-size: 11px;
    }
}

/* Стили для пустых состояний */
.result-empty,
.result-undefined {
    color: #b9bbbe;
    font-family: 'gg sans', 'Noto Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 14px;
    text-align: center;
    padding: 20px;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.add-panel {
    width: 100%;
    max-width: none;
    min-width: 0;
    background: var(--bg-dark);
    padding: 10px 20px 20px 15px;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
}

/* Улучшенные стили для поиска */
.add-search {
    position: relative;
}

.add-search input {
    width: 100%;
    padding: 10px 28px 10px 10px;
    background: #1e1f22;
    border: none;
    border-radius: 4px;
    color: #ffffff;
    font-family: 'gg sans', 'Noto Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 14px;
}

.add-search input::placeholder {
    color: #b9bbbe;
}

.add-search input:focus {
    outline: none;
    box-shadow: 0 0 0 1px var(--brand-experiment);
}

.search-only-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.6;
}

.contentButton {
    display: inline-flex;
    gap: 5px;
    background-color: transparent;
}