/* OpenWebUI Floating Chat Widget Styles */

/* Floating Button */
#openwebui-chat-float-button {
    position: fixed;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    z-index: 99998;
    padding: 8px;
    bottom: 20px;
    right: 20px;
}

/* Position variants */
#openwebui-chat-float-button.position-bottom-left {
    right: auto;
    left: 20px;
}

#openwebui-chat-float-button.position-bottom-right {
    right: 20px;
    left: auto;
}

#openwebui-chat-float-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

#openwebui-chat-float-button.active {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* Chat Window Container */
#openwebui-chat-window {
    position: fixed;
    width: 400px;
    height: 600px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 40px rgba(0, 0, 0, 0.16);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    bottom: 90px;
    right: 20px;
    animation: slideUp 0.3s ease;
}

/* Position variants for window */
#openwebui-chat-window.position-bottom-left {
    right: auto;
    left: 20px;
}

#openwebui-chat-window.position-bottom-right {
    right: 20px;
    left: auto;
}

/* Chat Header */
.openwebui-chat-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.openwebui-chat-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

/* Close Button */
.openwebui-chat-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.openwebui-chat-close:hover {
    transform: scale(1.2);
}

/* Chat iFrame */
.openwebui-chat-iframe {
    flex: 1;
    border: none;
    border-radius: 0 0 12px 12px;
    width: 100%;
    height: 100%;
}

/* Animation */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    #openwebui-chat-window {
        width: calc(100vw - 40px);
        height: 70vh;
        max-width: 100%;
        bottom: 80px;
    }

    #openwebui-chat-float-button {
        width: 56px;
        height: 56px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    #openwebui-chat-window {
        width: calc(100vw - 20px);
        height: 80vh;
        bottom: 75px;
        right: 10px;
        left: auto;
        border-radius: 12px;
    }

    #openwebui-chat-window.position-bottom-left {
        right: 10px;
        left: auto;
    }

    #openwebui-chat-float-button {
        bottom: 15px;
        right: 15px;
        width: 52px;
        height: 52px;
        font-size: 11px;
    }

    #openwebui-chat-float-button.position-bottom-left {
        right: 15px;
        left: auto;
    }
}
