/* Floating Chat Bubble Styles */
.chat-bubble-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
}

.chat-bubble {
    background: rgba(0, 123, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 8px 32px rgba(0, 123, 255, 0.1);
    transition: all 0.3s ease;
}

.chat-bubble:hover {
    transform: scale(1.05);
    background: rgba(0, 123, 255, 0.3);
}

.chat-bubble i {
    font-size: 24px;
    color: #fff;
}

/* Chat Window Styles */
.chat-window {
    position: fixed;
    bottom: 90px;
    left: 20px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.15);
    width: 350px;
    max-height: 500px;
    display: none;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s ease;
}

.chat-header {
    background: rgba(0, 123, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    padding: 15px 20px;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-header h5 {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
}

.chat-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.chat-close-btn:hover {
    opacity: 1;
}

.chat-body {
    padding: 20px;
    overflow-y: auto;
    flex-grow: 1;
    background: rgba(255, 255, 255, 0.5);
}

.chat-message {
    padding: 12px 16px;
    border-radius: 15px;
    margin-bottom: 12px;
    max-width: 85%;
    position: relative;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.user-message {
    background: rgba(0, 123, 255, 0.1);
    border: 1px solid rgba(0, 123, 255, 0.2);
    margin-left: auto;
    border-bottom-right-radius: 5px;
}

.ai-message {
    background: rgba(240, 240, 240, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-right: auto;
    border-bottom-left-radius: 5px;
}

.chat-input-area {
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.chat-input-container {
    position: relative;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 25px;
    padding: 5px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.input-group {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 8px;
}

.image-upload-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.image-upload-btn {
    background: none;
    border: none;
    padding: 8px;
    color: #007bff;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.8;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
}

.image-upload-btn:hover {
    opacity: 1;
    background: rgba(0, 123, 255, 0.1);
}

.chat-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 15px;
    font-size: 14px;
    color: #333;
    min-width: 0;
}

.chat-input:focus {
    outline: none;
}

.chat-send-btn {
    background: rgba(0, 123, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin:  10px 15px;
}

.chat-send-btn:hover {
    background: rgba(0, 123, 255, 1);
    transform: scale(1.05);
}

.chat-send-btn svg {
    width: 20px;
    height: 20px;
    fill: white;
    display: block;
}

.chat-input-image-preview {
    position: absolute;
    left: 40px;
    top: 50%;
    transform: translateY(-50%);
    height: 24px;
    width: 24px;
    border-radius: 4px;
    object-fit: cover;
}

.chat-input-image-remove {
    position: absolute;
    top: -5px;
    left: 50px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
}

.chat-header-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-controls button {
    background: none;
    border: none;
    color: white;
    opacity: 0.8;
    transition: all 0.3s ease;
    padding: 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-controls button:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.chat-window-open {
    animation: fadeIn 0.3s ease forwards;
}

/* Message hover effects */
.chat-message:hover {
    transform: translateY(-1px);
    transition: transform 0.2s ease;
}

/* Custom scrollbar */
.chat-body::-webkit-scrollbar {
    width: 6px;
}

.chat-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

.chat-body::-webkit-scrollbar-thumb {
    background: rgba(0, 123, 255, 0.2);
    border-radius: 3px;
}

.chat-body::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 123, 255, 0.3);
}
