/* Floating Text Selection Player Styles */

.wjtts-floating-player {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    background: linear-gradient(135deg, #8B5CF6 0%, #A855F7 50%, #9333EA 100%);
    border-radius: 16px;
    box-shadow: 
        0 10px 40px rgba(139, 92, 246, 0.4),
        0 4px 20px rgba(139, 92, 246, 0.2);
    color: white;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 320px;
    min-width: 280px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideInUp 0.3s ease-out;
    direction: rtl;
    text-align: right;
}

@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.wjtts-floating-player.wjtts-playing {
    animation: floatingPulse 2s ease-in-out infinite alternate;
}

@keyframes floatingPulse {
    from {
        box-shadow: 
            0 10px 40px rgba(139, 92, 246, 0.4),
            0 4px 20px rgba(139, 92, 246, 0.2);
    }
    to {
        box-shadow: 
            0 15px 50px rgba(139, 92, 246, 0.6),
            0 6px 30px rgba(139, 92, 246, 0.4);
    }
}

.wjtts-floating-content {
    padding: 16px;
}

.wjtts-floating-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.wjtts-floating-title {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.wjtts-floating-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    color: white;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wjtts-floating-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.wjtts-floating-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.wjtts-floating-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 10px;
    color: white;
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    flex: 1;
    justify-content: center;
}

.wjtts-floating-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.wjtts-floating-btn:active {
    transform: translateY(0);
}

.wjtts-floating-icon {
    font-size: 14px;
}

.wjtts-floating-select {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: white;
    padding: 6px 8px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 70px;
}

.wjtts-floating-select:hover {
    background: rgba(255, 255, 255, 0.3);
}

.wjtts-floating-select:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
}

.wjtts-floating-text-preview {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 8px;
    font-size: 11px;
    line-height: 1.4;
    max-height: 60px;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.wjtts-floating-text-preview.wjtts-error {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.3);
    color: #FEF2F2;
}

/* Text selection highlighting */
::selection {
    background: rgba(139, 92, 246, 0.3);
    color: inherit;
}

::-moz-selection {
    background: rgba(139, 92, 246, 0.3);
    color: inherit;
}

/* Responsive design for floating player */
@media (max-width: 768px) {
    .wjtts-floating-player {
        bottom: 15px;
        right: 15px;
        left: 15px;
        max-width: none;
        min-width: auto;
    }
    
    .wjtts-floating-content {
        padding: 14px;
    }
    
    .wjtts-floating-controls {
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .wjtts-floating-btn {
        padding: 6px 10px;
        font-size: 11px;
    }
    
    .wjtts-floating-select {
        padding: 5px 6px;
        font-size: 10px;
        min-width: 60px;
    }
    
    .wjtts-floating-text-preview {
        font-size: 10px;
        padding: 6px;
        max-height: 50px;
    }
}

@media (max-width: 480px) {
    .wjtts-floating-player {
        bottom: 10px;
        right: 10px;
        left: 10px;
    }
    
    .wjtts-floating-content {
        padding: 12px;
    }
    
    .wjtts-floating-title {
        font-size: 13px;
    }
    
    .wjtts-floating-close {
        width: 20px;
        height: 20px;
        font-size: 14px;
    }
}

/* Alternative styles for different player themes */
.wjtts-player-container.style-modern ~ .wjtts-floating-player {
    background: #6366F1;
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.3);
}

.wjtts-player-container.style-classic ~ .wjtts-floating-player {
    background: #7C3AED;
    border: 2px solid #5B21B6;
}

.wjtts-player-container.style-minimal ~ .wjtts-floating-player {
    background: #F9FAFB;
    color: #374151;
    border: 2px solid #8B5CF6;
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.1);
}

.wjtts-player-container.style-minimal ~ .wjtts-floating-player .wjtts-floating-title {
    color: #8B5CF6;
}

.wjtts-player-container.style-minimal ~ .wjtts-floating-player .wjtts-floating-btn {
    background: #8B5CF6;
    color: white;
}

.wjtts-player-container.style-minimal ~ .wjtts-floating-player .wjtts-floating-select {
    background: white;
    color: #374151;
    border-color: #D1D5DB;
}

.wjtts-player-container.style-minimal ~ .wjtts-floating-player .wjtts-floating-text-preview {
    background: rgba(139, 92, 246, 0.1);
    color: #374151;
}

.wjtts-player-container.style-neon ~ .wjtts-floating-player {
    background: #1F2937;
    border: 2px solid #8B5CF6;
    box-shadow: 
        0 0 20px rgba(139, 92, 246, 0.5),
        0 0 40px rgba(139, 92, 246, 0.3);
}

.wjtts-player-container.style-glass ~ .wjtts-floating-player {
    background: rgba(139, 92, 246, 0.15);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .wjtts-floating-player {
        animation: none;
    }
    
    .wjtts-floating-player.wjtts-playing {
        animation: none;
    }
    
    .wjtts-floating-btn {
        transition: none;
    }
}

@media (prefers-contrast: high) {
    .wjtts-floating-player {
        border-width: 2px;
        border-color: rgba(255, 255, 255, 0.5);
    }
    
    .wjtts-floating-btn {
        border: 1px solid rgba(255, 255, 255, 0.3);
    }
}

/* Print styles */
@media print {
    .wjtts-floating-player {
        display: none !important;
    }
}

