/* Main speaker icon */
.pstts-speaker-icon {
    position: fixed;
    top: 20px;
    left: 40px;
    width: 50px;
    height: 50px;
    margin-top: 100px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M11 5L6 9H2v6h4l5 4V5z"></path><path d="M15.54 8.46a5 5 0 0 1 0 7.07"></path><path d="M19.07 4.93a10 10 0 0 1 0 14.14"></path></svg>') no-repeat center;
    background-size: 30px;
    cursor: pointer;
    z-index: 1000;
    border-radius: 50%;
    background-color: #f0f0f0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    user-select: none;
    touch-action: none; /* Prevent default touch scrolling while dragging */
}

.pstts-speaker-icon.pstts-dragging {
    opacity: 0.7;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    cursor: grabbing;
}

.pstts-speaker-icon:hover {
    background-color: #e0e0e0;
}

/* Tooltip */
.pstts-tooltip {
    display: none;
    position: fixed;
    top: 170px;
    left: 115px;
    background: #333;
    color: #fff;
    padding: 10px;
    border-radius: 5px;
    font-size: 14px;
    z-index: 1001;
    max-width: 200px;
}

/* Floating speaker icon for selected text */
#pstts-floating-speaker {
    position: absolute;
    width: 50px;
    height: 50px;
    padding: 15px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M11 5L6 9H2v6h4l5 4V5z"></path><path d="M15.54 8.46a5 5 0 0 1 0 7.07"></path><path d="M19.07 4.93a10 10 0 0 1 0 14.14"></path></svg>') no-repeat center;
    background-size: 30px;
    cursor: pointer;
    z-index: 100000;
    border-radius: 50%;
    background-color: #0073aa;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    touch-action: manipulation;
    user-select: none;
}

#pstts-floating-speaker:hover {
    background-color: #005f8a;
}

#pstts-floating-speaker.loading {
    animation: pulse 1s infinite;
}

#pstts-floating-speaker.tapped {
    border: 3px solid #000000;
}

/* Loading animation */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Responsive adjustments for tablet and mobile */
@media screen and (max-width: 768px) {
    #pstts-floating-speaker {
        transform: translateY(-50%);
        margin: 25px;
    }
    .pstts-tooltip {
        font-size: 12px;
        max-width: 150px;
        left: 50px;
        top: 150px;
    }
}