.text-selection-toolbar {
    position: fixed;
    z-index: 9999;
    background: #4a90e2;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    padding: 4px 4px;
    animation: fadeIn 0.2s ease-in-out;
    pointer-events: auto;
}

.text-selection-toolbar::before {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #4a90e2;
}

.text-selection-toolbar button {
    background: white !important;
    /*color: #4a90e2 !important;*/
    border: none !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    padding: 6px 12px !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    white-space: nowrap !important;
}

.text-selection-toolbar button:hover {
    background: #f0f0f0 !important;
    transform: translateY(-1px);
}

.text-selection-toolbar button:active {
    transform: translateY(0);
}

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

@media (max-width: 768px) {
    .text-selection-toolbar {
        padding: 4px 8px;
    }

    .text-selection-toolbar::before {
        content: '';
        position: absolute;
        top: -6px;
        left: 50%;
        transform: translateX(-50%);
        border-left: 6px solid transparent;
        border-right: 6px solid transparent;
        border-bottom: 6px solid #4a90e2;
    }

    .text-selection-toolbar button {
        font-size: 12px !important;
        padding: 4px 8px !important;
    }

    .text-selection-toolbar button img {
        width: 14px !important;
        height: 14px !important;
    }
}