/**
 * Rose AI Floating Button Styles
 * Beautiful floating robot button that appears on all pages except the AI chat page
 */

.rose-floating-button {
    position: fixed;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7C3AED 0%, #9333EA 100%);
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.4), 0 4px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    overflow: hidden;
    padding: 8px;
    animation: floatBounce 3s ease-in-out infinite;
}

/* Size variants */
.rose-floating-button.rose-button-small {
    width: 50px;
    height: 50px;
    padding: 5px;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.rose-floating-button.rose-button-medium {
    width: 80px;
    height: 80px;
    padding: 8px;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
}

.rose-floating-button.rose-button-large {
    width: 100px;
    height: 100px;
    padding: 10px;
    right: 28px;
    top: 50%;
    transform: translateY(-50%);
}

/* Floating animation - adjusted for vertical centering */
@keyframes floatBounce {
    0%, 100% {
        transform: translateY(-50%);
    }
    50% {
        transform: translateY(calc(-50% - 10px));
    }
}

.rose-floating-button:hover {
    transform: translateY(calc(-50% - 5px)) scale(1.05);
    box-shadow: 0 12px 32px rgba(124, 58, 237, 0.5), 0 8px 16px rgba(0, 0, 0, 0.15);
    animation: none; /* Stop floating animation on hover */
}

.rose-floating-button:active {
    transform: translateY(calc(-50% - 2px)) scale(1.02);
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.4), 0 4px 8px rgba(0, 0, 0, 0.1);
}

.rose-floating-button img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.rose-floating-button:hover img {
    transform: scale(1.1) rotate(5deg);
}

/* Pulse ring effect on load */
.rose-floating-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(124, 58, 237, 0.4);
    transform: translate(-50%, -50%);
    animation: pulseRing 2s ease-out infinite;
}

@keyframes pulseRing {
    0% {
        width: 100%;
        height: 100%;
        opacity: 0.6;
    }
    100% {
        width: 140%;
        height: 140%;
        opacity: 0;
    }
}

/* Notification badge (optional - for future use) */
.rose-floating-button::after {
    content: '';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 12px;
    height: 12px;
    background: #EF4444;
    border: 2px solid white;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.rose-floating-button.has-notification::after {
    opacity: 1;
    animation: notificationPulse 2s ease-in-out infinite;
}

@keyframes notificationPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

/* Mobile styles - adjust sizes proportionally */
@media (max-width: 768px) {
    .rose-floating-button.rose-button-small {
        width: 45px;
        height: 45px;
        padding: 4px;
        right: 16px;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .rose-floating-button.rose-button-medium {
        width: 64px;
        height: 64px;
        padding: 6px;
        right: 16px;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .rose-floating-button.rose-button-large {
        width: 80px;
        height: 80px;
        padding: 8px;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
    }
}

@media (max-width: 480px) {
    .rose-floating-button.rose-button-small {
        width: 40px;
        height: 40px;
        padding: 4px;
        right: 12px;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .rose-floating-button.rose-button-medium {
        width: 56px;
        height: 56px;
        padding: 5px;
        right: 12px;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .rose-floating-button.rose-button-large {
        width: 70px;
        height: 70px;
        padding: 7px;
        right: 16px;
        top: 50%;
        transform: translateY(-50%);
    }
}

/* Adjust on very small screens in landscape mode */
@media (max-height: 400px) and (orientation: landscape) {
    .rose-floating-button {
        width: 48px;
        height: 48px;
        right: 8px;
        top: 50%;
        transform: translateY(-50%);
    }
}

/* Accessibility - focus state */
.rose-floating-button:focus {
    outline: 3px solid #7C3AED;
    outline-offset: 4px;
}

/* Print - hide the button */
@media print {
    .rose-floating-button {
        display: none !important;
    }
}

/* Smooth entry animation - adjusted for vertical centering */
@keyframes slideInFromRight {
    from {
        transform: translate(120px, -50%);
        opacity: 0;
    }
    to {
        transform: translate(0, -50%);
        opacity: 1;
    }
}

.rose-floating-button {
    animation: slideInFromRight 0.5s ease-out, floatBounce 3s ease-in-out 0.5s infinite;
}

/* Tooltip on hover (optional enhancement) */
.rose-floating-button:hover::before {
    animation: none; /* Stop pulse ring on hover */
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .rose-floating-button {
        border: 2px solid currentColor;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .rose-floating-button,
    .rose-floating-button::before,
    .rose-floating-button img {
        animation: none !important;
        transition: none !important;
    }
}
