/* WebChat Widget Container */
#webchat-widget {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 350px;
    max-width: 90%;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
    font-family: Arial, sans-serif;
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 9999999;
    border: 1px solid #b6b8ba;
}

/* WebChat Header */
#webchat-header {
    background: var(--webchat-header-color, #ffdd22);
    color: #111111;
    padding: 12px;
    font-size: 16px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-logo {
    width: 200px; /* Adjust size */
    height: auto;
}

/* Chat Title */
.chat-title {
    font-size: 16px;
    font-weight: bold;
}

/* Chat Subtitle */
.chat-subtitle {
    font-size: 12px;
    display: block;
    margin-top: 3px;
}

#close-chat {
    cursor: pointer;
    font-size: 19px;
    font-weight: bold;
    color: #111111;
    padding: 2px 8px;
    border-radius: 5px;
    transition: background 0.3s, transform 0.2s;
}

#close-chat:hover {
    transform: scale(1.1);
}

/* WebChat Messages */
#webchat-messages {
    padding: 8px;
    height: 350px;
    overflow-y: auto;
    background: #ffffff;
    display: flex;
    flex-direction: column;
}

/* User Details Input Fields */
#webchat-user-details {
    padding: 8px;
    background: white;
    display: flex;
    flex-direction: column;
}

#webchat-user-details input {
    margin-bottom: 10px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 13px;
}

/* Start Chat Button */
#startChat {
    background: #6a6a6b;
    color: white;
    border: none;
    padding: 12px;
    font-size: 15px;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.3s;
}

#startChat:hover {
    background: #dd3333;
}

/* Chat Input Field */
#webchat-input {
    display: flex;
    padding: 12px;
    background: white;
    border-top: 1px solid #ddd;
}

#chatInput {
    flex: 1;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 15px;
}

#sendMessageBtn {
    background: #0ea5e9;
    color: #ffffff;
    border: none;
    font-size: 12px;
    padding: 5px;
    margin-left: 8px;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.3s;
}

#sendMessageBtn:hover {
    text-decoration: none;
    /* background: #bb2222; */
}
div#webchat-icon img {
    border-radius: 26px;
}
/* Floating WebChat Icon */
#webchat-icon {
    position: fixed;
    bottom: 20px;
    right: 30px;
    width: 65px;
    height: 65px;
    color: white;
    font-size: 26px;
    display: flex;
    background: #ffffff;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
}

/* Floating Chat Icon Animation */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

#webchat-header,
.user-message,
.bot-message,
#sendMessageBtn {
    transition: background 0.3s ease !important;
}

/* Chat Messages */
.user-message {
    background: var(--webchat-user-color, #d1ecf1);
    color: #333;
    padding: 10px 15px;
    border-radius: 15px;
    max-width: 75%;
    align-self: flex-end;
    margin: 5px 10px;
    font-size: 12px;
}

/* General Styling */
.bot-message {
   background: var(--webchat-bot-color, #ffdd22b3);
    border-radius: 8px;
    padding: 12px;
    margin: 8px 0;
    font-size: 12px;
    line-height: 1.6;
    font-family: Arial, sans-serif;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
}

/* Headings */
.bot-message h1, .bot-message h2, .bot-message h3 {
    font-weight: bold;
    color: #dd3333;
    margin-top: 10px;
    font-size: 13px;
}

/* Paragraphs */
.bot-message p {
    margin: 8px 0;
    font-size: 12px;
}

/* Lists */
.bot-message ul, .bot-message ol {
    margin-left: 20px;
    padding-left: 15px;
}

.bot-message li {
    margin-bottom: 5px;
}

/* Code Blocks */
.bot-message pre {
    background: #282c34;
    color: #ffffff;
    margin:0;
    padding: 10px;
    border-radius: 6px;
    overflow-x: auto;
    font-size: 12px;
    line-height: 1.5;
}

.bot-message code {
    font-family: "Courier New", monospace;
}

/* Inline Code */
.bot-message p code, .bot-message li code {
    background: #eef0f3;
    color: #d63333;
    padding: 2px 6px;
    border-radius: 4px;
}

/* Links */
.bot-message a {
    color: #007bff;
    text-decoration: none;
}

.bot-message a:hover {
    text-decoration: underline;
}

/* Bot Header */
.bot-header {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

/* Bot Icon */
.bot-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 10px;
}

/* Bot Name */
.bot-name {
    font-weight: bold;
    font-size: 12px;
}

/* Bot Text */
.bot-text {
    background: white;
    padding: 8px;
    border-radius: 6px;
    font-size: 12px;
}
.error-message {
    color: red;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

/* MEDIA QUERIES FOR RESPONSIVENESS */

/* Small Mobile Devices */
@media screen and (max-width: 480px) {
    #webchat-widget {
        width: 95%;
        right: 10px;
        bottom: 60px;
        font-size: 14px;
    }

    #webchat-header {
        font-size: 16px;
    }

    #close-chat {
        font-size: 18px;
    }

    #webchat-messages {
        height: 250px;
        padding: 8px;
    }

    #webchat-user-details input {
        font-size: 13px;
        padding: 8px;
    }

    #startChat, #sendMessageBtn {
        font-size: 13px;
        padding: 10px;
    }

    #chatInput {
        font-size: 13px;
        padding: 8px;
    }
}

/* Tablets & Small Laptops */
@media screen and (max-width: 768px) {
    #webchat-widget {
        width: 80%;
        right: 10px;
        bottom: 70px;
    }

    #webchat-messages {
        height: 280px;
    }

    #webchat-icon {
        width: 50px;
        height: 50px;
        font-size: 22px;
    }
}

/* Large Screens */
@media screen and (min-width: 1024px) {
    #webchat-widget {
        width: 320px;
        max-width: 100%;
    }

    #webchat-messages {
        height: 350px;
    }

    #chatInput, #sendMessageBtn {
        font-size: 13px;
    }
}


/* Message above Name & Email fields */
.user-info-message {
    font-size: 14px;
    color: #555;
    margin-bottom: 10px;
    text-align: left;
}
/* Online Indicator */
#webchat-online-indicator {
    position: fixed;
    bottom: 85px;
    right: 30px;
    background: white;
    color: #333;
    font-size: 14px;
    font-weight: bold;
    padding: 8px 12px;
    border-radius: 20px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    z-index: 99999;
    transition: opacity 0.3s;
}

/* Green Dot */
.online-dot {
    width: 10px;
    height: 10px;
    background: green;
    border-radius: 50%;
    display: inline-block;
}

/* Hide Online Indicator When Chat Opens */
#webchat-widget {
    display: none;
}

#webchat-widget.open ~ #webchat-online-indicator {
    display: none;
}


/* Welcome Message Styling */
.welcome-message {
    font-size: 12px;
    font-weight: 500;
    color: #333;
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
    text-align: left;
    line-height: 1.6;
}

/* Options Buttons Styling */
.option-btn {
    display: block;
    width: 90%;
    padding: 12px;
    margin: 5px auto;
    border: none;
    border-radius: 8px;
    background-color: #9d9fa2;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-align: center;
}

.option-btn:hover {
    background-color: #b82a2a;
}

.bot-text ol li ul li {
    font-size: 12px;
}

.bot-text li {
    margin-left: 0 !important;
}
.bot-text ul li {
    font-size: 12px;
}

.chat-controls {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-left: auto;
    font-size: 18px;
}

.chat-controls span {
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 3px;
    background: #eee;
    color: #333;
    transition: background 0.3s ease;
}

.chat-controls span:hover {
    background: #ccc;
}

#webchat-widget.maximized {
    width: 55% !important;
    height: 85vh !important;
    bottom: 0 !important;
    max-height: none !important;
}
.spinner {
    animation: spin 1s linear infinite;
    display: inline-block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#maximize-chat svg {
    width: 23px;
    vertical-align: middle;
    cursor: pointer;
    transition: transform 0.3s ease;
    transform: rotate(45deg);
}
