/* Main Chat Bubble */
.chat-bubble {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #1a748e, #55c4d7);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    z-index: 999;
}

/* Add this rule to ensure the SVG inside the chat bubble has proper cursor behavior */
.chat-bubble svg {
    cursor: pointer;
    pointer-events: none;
}

.chat-bubble:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Chat Window */
.chat-window {
    position: fixed;
    bottom: 100px;
    right: 25px;
    width: 350px;
    max-width: 90vw;
    height: 500px;
    max-height: 70vh;
    background-color: #f9f9f9;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0);
    transform-origin: bottom right;
    transition: transform 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    z-index: 1000;
}

.chat-window.open {
    transform: scale(1);
}

/* Chat Header */
.chat-header {
    background: linear-gradient(135deg, #1a748e, #55c4d7);
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
}

.chat-header h3 {
    margin: 0;
    font-size: 1.1em;
    font-weight: 600;
}

.chat-header #close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
}

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

/* Chat Body */
.chat-body {
    flex-grow: 1;
    padding: 15px;
    overflow-y: auto;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* For Webkit browsers like Chrome, Safari */
.chat-body::-webkit-scrollbar {
    width: 6px;
}

.chat-body::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.chat-body::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.chat-body::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}


/* Messages */
.message {
    padding: 10px 15px;
    border-radius: 18px;
    max-width: 80%;
    line-height: 1.5;
    word-wrap: break-word;
    font-size: 0.95em;
}

.message.bot {
    background-color: #e9e9eb;
    color: #333;
    border-bottom-left-radius: 4px;
    align-self: flex-start;
}

.message.user {
    background-color: #1a748e;
    color: white;
    border-bottom-right-radius: 4px;
    align-self: flex-end;
}

/* Special message for meeting link */
.message.bot a {
    color: #d38e31;
    font-weight: bold;
    text-decoration: underline;
}

/* Chat Footer */
.chat-footer {
    display: flex;
    padding: 15px;
    border-top: 1px solid #e0e0e0;
    background-color: #f9f9f9;
}

#chat-input {
    flex-grow: 1;
    border: 1px solid #ccc;
    border-radius: 20px;
    color: #000000cf;
    padding: 10px 15px;
    font-size: 1em;
    outline: none;
    transition: border-color 0.2s;
}

#chat-input:focus {
    border-color: #1a748e;
}

#chat-input:disabled {
    background-color: #f0f0f0;
}

#send-btn {
    background: #1a748e;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    margin-left: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, transform 0.1s;
}

#send-btn:hover {
    background-color: #125a6e;
}

#send-btn:active {
    transform: scale(0.95);
}

#send-btn:disabled {
    background-color: #a0a0a0;
    cursor: not-allowed;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .chat-window {
        width: 100%;
        height: 100%;
        max-height: 100%;
        right: 0;
        bottom: 0;
        border-radius: 0;
    }

    .chat-bubble {
        bottom: 15px;
        right: 15px;
    }

    .chat-window.open {
        transform: none; /* Full screen, no scale */
    }
}
