/* Стили для системы реакций */

.reactions-container {
    position: absolute;
    bottom: 12px; /* Переместили вниз карточки */
    left: 12px;
    /* Держим реакции внутри карточки: ниже любых глобальных overlay (поиск/шторки), но выше картинки */
    z-index: 30;
    display: flex;
    flex-direction: column; /* Вертикальное расположение для правильной работы меню */
    align-items: flex-start;
    gap: 8px;
    pointer-events: auto !important;
}

.reactions-trigger {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 50%;
    width: 35px; /* Уменьшено на 20%: 44px * 0.8 = 35.2px, округлено до 35px */
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.15s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    font-size: 16px; /* Уменьшено пропорционально */
    font-weight: 500;
    will-change: transform;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    flex-shrink: 0;
    pointer-events: auto !important;
    position: relative;
    z-index: 31;
}

.reactions-trigger:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 1);
}

.reactions-trigger:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
}

.reactions-menu {
    position: absolute;
    bottom: 47px; /* Позиционируем над кнопкой реакций */
    left: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 6px; /* Немного уменьшено */
    display: flex;
    gap: 3px; /* Немного уменьшено */
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    animation: slideUp 0.15s ease-out; /* Изменили анимацию на slideUp */
    /* Меню реакций: выше кнопки/счетчиков, но ниже глобальных overlay */
    z-index: 60;
    pointer-events: auto !important;
    will-change: transform, opacity;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reaction-option {
    background: transparent;
    border: none;
    border-radius: 50%;
    width: 32px; /* Уменьшено на 20%: 40px * 0.8 = 32px */
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.1s ease, background-color 0.1s ease;
    font-size: 16px; /* Уменьшено пропорционально */
    position: relative;
    pointer-events: auto !important;
    will-change: transform;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    z-index: 61;
}

.reaction-option:hover {
    transform: scale(1.2);
    background: rgba(51, 144, 236, 0.1);
}

.reaction-option:active {
    transform: scale(0.85);
    transition: transform 0.05s ease;
}

.reaction-option.active {
    background: rgba(51, 144, 236, 0.15);
    transform: scale(1.15);
}

.reaction-option.active::after {
    content: '✓';
    position: absolute;
    bottom: -2px;
    right: -2px;
    background: #3390ec;
    color: white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    border: 2px solid white;
}

.reactions-counters {
    display: flex;
    flex-direction: row; /* Горизонтальное расположение счетчиков */
    gap: 4px;
    align-items: center;
    flex-wrap: wrap;
}

.reaction-counter {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: #000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Адаптивность */
@media (max-width: 768px) {
    .reactions-container {
        top: 8px;
        left: 8px;
    }
    
    .reactions-trigger {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .reaction-option {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
    
    .reactions-menu {
        top: 48px;
        padding: 6px;
        gap: 3px;
    }
}

/* Оптимизация производительности */
.reactions-container {
    contain: layout style paint;
}

.reaction-counter {
    will-change: transform, opacity;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

















