/* --- CẤU HÌNH NÚT BẤM CƠ BẢN --- */
.action-btn-sm {
    position: relative;
    overflow: visible;
    background: transparent;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    border-radius: 6px;
    color: #32465a;   /* Màu xám mặc định kiểu ChatGPT */
    transition: 0.2s;
}

/* Định dạng kích thước cho Icon SVG bên trong nút */
.action-btn-sm svg {
    width: 18px;
    height: 18px;
    display: block;
}

/* Hiệu ứng hover phóng to nhẹ của bạn */
.action-btn-sm:hover {
    transform: scale(1.1);  
    color: var(--primary-color, #0c826f);
    background-color: #ffffff; /* Màu xám bạn đang thấy */
}

/* --- TRẠNG THÁI ACTIVE (ĐƯỢC CHỌN) --- */
/* Thay thế selector ".action-btn-sm.active i" cũ bằng svg */
.action-btn-sm.active,
.action-btn-sm.active svg {
    color: var(--primary-color, #0c826f);
    /* Mẹo phụ: Nếu muốn khi Active icon sẽ "đổ màu đặc ruột" giống ChatGPT, 
       bạn có thể bỏ comment dòng dưới này: */
    /* fill: #0c826f; */
}

/* --- HIỆU ỨNG ICON BAY (FLY ANIMATION) --- */
/* Áp dụng trực tiếp cho thẻ hiệu ứng SVG bay */
svg.fly-icon {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    color: var(--primary-color, #0c826f);
    opacity: 1;
    width: 18px;
    height: 18px;
}

.fly-up {
    animation: flyUp .7s ease-out forwards;
}

.fly-down {
    animation: flyDown .7s ease-out forwards;
}

/* Giữ nguyên 2 bộ Keyframes cực mượt của bạn */
@keyframes flyUp {
    from {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
    to {
        opacity: 0;
        transform: translate(-50%, -150%);
    }
}

@keyframes flyDown {
    from {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
    to {
        opacity: 0;
        transform: translate(-50%, 50%);
    }
}