
/* Improved chat button styling */
#chat-widget-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #0077ff;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 28px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    cursor: pointer;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

#chat-widget-btn::before {
    content: "";
    display: block;
    width: 30px;
    height: 30px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 14H5.17L4 17.17V4h16v12z"/><path d="M7 9h10M7 13h7" stroke="white" stroke-width="1.5" stroke-linecap="round"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

#chat-widget-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

/* Improved chat box styling */
#chat-box {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 350px;
    max-height: 500px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.25);
    display: none;
    flex-direction: column;
    font-family: 'Segoe UI', sans-serif;
    z-index: 9999;
    overflow: hidden;
    border: 1px solid #eaeaea;
}

/* Chat header */
#chat-header {
    padding: 8px 15px; /* Reduced padding */
    background: #0077ff;
    color: white;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#chat-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px; /* Slightly smaller font */
}

/* Send button with larger icon */
#chat-send {
    background: #0077ff;
    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 0.3s ease;
}

#chat-send::before {
    content: "";
    display: block;
    width: 24px; /* Increased from 20px */
    height: 24px; /* Increased from 20px */
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M2.01 21L23 12 2.01 3 2 10l15 2-15 2z"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
}

#chat-send:hover {
    background: #0066dd;
}

#chat-header-title::before {
    content: "";
    display: block;
    width: 24px;
    height: 24px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2z"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
}

#chat-close {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 20px;
}

/* Messages area */
#chat-messages {
    padding: 15px;
    overflow-y: auto;
    max-height: 350px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background-color: #f9f9f9;
}

.msg {
    margin: 3px 0;
    padding: 10px 15px;
    border-radius: 18px;
    max-width: 80%;
    line-height: 1.4;
    position: relative;
    word-wrap: break-word;
}

.user-msg {
    background: #e1f5fe;
    color: #01579b;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.bot-msg {
    background: white;
    color: #333;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    border-left: 3px solid #0077ff;
}

/* Input area */
#chat-input-area {
    display: flex;
    border-top: 1px solid #eee;
    padding: 10px;
    background: white;
}

#chat-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
    font-size: 14px;
    resize: none;
    max-height: 100px;
    min-height: 24px;
    transition: border 0.3s ease;
}

#chat-input:focus {
    border-color: #0077ff;
}

#chat-send {
    background: #0077ff;
    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 0.3s ease;
}

#chat-send::before {
    content: "";
    display: block;
    width: 20px;
    height: 20px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M2.01 21L23 12 2.01 3 2 10l15 2-15 2z"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
}

#chat-send:hover {
    background: #0066dd;
}

/* Alternative larger send button */
#chat-send {
    background: #0077ff;
    color: white;
    border: none;
    border-radius: 50%;
    width: 44px; /* Slightly larger button */
    height: 44px;
    margin-left: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
    position: relative; /* For positioning the icon */
}

#chat-send::before {
    content: "";
    display: block;
    width: 28px; /* Even larger icon */
    height: 28px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M2.01 21L23 12 2.01 3 2 10l15 2-15 2z"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

#chat-send:hover {
    background: #0066dd;
}

/* Typing indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    margin: 10px 0;
    align-self: flex-start;
}

.typing-indicator span {
    height: 8px;
    width: 8px;
    background: #0077ff;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
    animation: typing 1s infinite ease-in-out;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
    100% { transform: translateY(0); }
}
