/* Universal Floating Message System */
/* Floating message styles for all pages */

#floating-message {
    position: fixed;
    top: 8px;
    right: 20px;
    background: rgba(22, 199, 154, 0.95);
    color: white;
    padding: 10px 18px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    z-index: 10001;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.4s ease;
    display: none;
    max-width: 350px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

#floating-message.show {
    opacity: 1;
    transform: translateX(0);
    display: block;
}

/* Different message types */
#floating-message.success {
    background: rgba(22, 199, 154, 0.95);
}

#floating-message.info {
    background: rgba(52, 152, 219, 0.95);
}

#floating-message.warning {
    background: rgba(241, 196, 15, 0.95);
    color: #2c3e50;
}

#floating-message.error {
    background: rgba(231, 76, 60, 0.95);
}

#floating-message.loading {
    background: rgba(155, 89, 182, 0.95);
}

/* Animation for pulsing effect on loading messages */
#floating-message.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 15px;
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    transform: translateY(-50%);
    animation: floatingPulse 1.5s ease-in-out infinite;
}

@keyframes floatingPulse {
    0%, 100% { opacity: 0.3; transform: translateY(-50%) scale(0.8); }
    50% { opacity: 1; transform: translateY(-50%) scale(1.2); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #floating-message {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-100%);
        border-radius: 15px;
    }
    
    #floating-message.show {
        transform: translateY(0);
    }
}

/* Dark theme adjustments */
.night #floating-message {
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.night #floating-message.success {
    background: rgba(22, 199, 154, 0.9);
}

.night #floating-message.info {
    background: rgba(52, 152, 219, 0.9);
}

.night #floating-message.warning {
    background: rgba(241, 196, 15, 0.9);
    color: #1a252f;
}

.night #floating-message.error {
    background: rgba(231, 76, 60, 0.9);
}

.night #floating-message.loading {
    background: rgba(155, 89, 182, 0.9);
}