/* BONNEY Floating Chatbot Widget Styles */

#bonney-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 50;
    font-family: 'Arial', sans-serif;
}

/* Floating Button (Closed State) */
#bonney-btn {
    width: 80px;
    height: 60px;
    border-radius: 30px;
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: white;
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.3);
    transition: all 0.3s ease;
    position: relative;
    z-index: 100;
}

#bonney-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 212, 255, 0.4);
    background: linear-gradient(135deg, #00b8e6, #007aa3);
}

#bonney-btn:active {
    transform: translateY(0);
}

/* Tooltip */
#bonney-btn::before {
    content: "Chat with BONNEY";
    position: absolute;
    bottom: 70px;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

#bonney-btn::after {
    content: "";
    position: absolute;
    bottom: 62px;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid rgba(0, 0, 0, 0.8);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

#bonney-btn:hover::before,
#bonney-btn:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Chat Window (Expanded State) */
#bonney-chat {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: #1c1c1c;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid #333;
    display: none;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#bonney-chat.active {
    display: flex;
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* Chat Header */
#bonney-header {
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    color: white;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 14px;
}

#bonney-close {
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#bonney-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Chat Content */
#bonney-content {
    flex: 1;
    position: relative;
    background: #1c1c1c;
}

#bonney-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #1c1c1c;
}

/* Loading State */
.bonney-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #00d4ff;
    text-align: center;
}

.bonney-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(0, 212, 255, 0.3);
    border-top: 3px solid #00d4ff;
    border-radius: 50%;
    animation: bonneySpinner 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes bonneySpinner {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    #bonney-widget {
        bottom: 15px;
        right: 15px;
    }
    
    #bonney-btn {
        width: 55px;
        height: 55px;
        font-size: 22px;
    }
    
    #bonney-chat {
        width: calc(100vw - 30px);
        max-width: 350px;
        height: 450px;
        bottom: 75px;
        right: 0;
    }
    
    #bonney-btn::before {
        display: none; /* Hide tooltip on mobile */
    }
}

@media (max-width: 480px) {
    #bonney-chat {
        width: calc(100vw - 20px);
        height: 400px;
        bottom: 70px;
        right: -5px;
    }
}

/* Animation for button pulse effect */
@keyframes bonneyPulse {
    0% {
        box-shadow: 0 4px 20px rgba(0, 212, 255, 0.3);
    }
    50% {
        box-shadow: 0 4px 20px rgba(0, 212, 255, 0.6);
    }
    100% {
        box-shadow: 0 4px 20px rgba(0, 212, 255, 0.3);
    }
}

#bonney-btn.pulse {
    animation: bonneyPulse 2s infinite;
}

/* Accessibility improvements */
#bonney-btn:focus,
#bonney-close:focus {
    outline: 2px solid #00d4ff;
    outline-offset: 2px;
}

/* Smooth transitions for all interactive elements */
#bonney-widget * {
    transition: all 0.2s ease;
}
