/* Chatbot Container */
#chatbot-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Floating Icon */
#chatbot-icon {
    width: 60px;
    height: 60px;
    background: #03a84e;
    /* Tawk.to Green */
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s;
}

#chatbot-icon:hover {
    transform: scale(1.1);
}

#chatbot-icon svg {
    width: 32px;
    height: 32px;
    fill: white;
}

/* Notification Badge */
.chatbot-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff0000;
    color: white;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: bold;
    display: none;
}

/* Chat Window */
#chatbot-window {
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 40px rgba(0, 0, 0, 0.16);
    display: none;
    /* Hidden by default */
    flex-direction: column;
    overflow: hidden;
    position: absolute;
    bottom: 80px;
    right: 0;
}

/* Header */
.chatbot-header {
    background: #03a84e;
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-title h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.chatbot-desc {
    font-size: 12px;
    opacity: 0.9;
}

.chatbot-actions span {
    cursor: pointer;
    padding: 5px;
    font-size: 18px;
}

/* Messages Area */
.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background: #f9f9f9;
}

.message-wrapper {
    clear: both;
    overflow: hidden;
    width: 100%;
    margin-bottom: 15px;
}

.message {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.6;
    position: relative;
    word-wrap: break-word;
    word-break: break-word;
}

.delete-msg {
    position: absolute;
    top: -5px;
    cursor: pointer;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.2s;
    background: #eee;
    padding: 2px 4px;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    color: #666;
}

.message.user .delete-msg {
    left: -20px;
}

.message.bot .delete-msg {
    right: -20px;
}

.message:hover .delete-msg {
    opacity: 1;
}

.delete-msg:hover {
    color: #ff0000;
}



.chatbot-link {
    color: #03a84e;
    text-decoration: underline;
    font-weight: 600;
}

.chatbot-link:hover {
    color: #028a40;
}

.message.bot {
    background: white;
    color: #333;
    float: left;
    border-bottom-left-radius: 2px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.message.user {
    background: #03a84e;
    color: white;
    float: right;
    border-bottom-right-radius: 2px;
}

/* Input Area */
.chatbot-input-area {
    padding: 15px;
    border-top: 1px solid #eee;
    background: white;
    display: flex;
    align-items: center;
}

#chatbot-msg {
    flex: 1;
    border: none;
    padding: 10px;
    font-size: 14px;
    outline: none;
}

#chatbot-send {
    background: none;
    border: none;
    cursor: pointer;
    color: #03a84e;
    font-size: 20px;
    padding: 5px;
}

/* Typing Indicator */
.typing-indicator {
    padding: 10px 14px;
    background: white;
    border-radius: 10px;
    display: flex;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;
    float: left;
    clear: both;
}

.typing-indicator span {
    height: 8px;
    width: 8px;
    float: left;
    margin: 0 1px;
    background-color: #9E9E9E;
    display: block;
    border-radius: 50%;
    opacity: 0.4;
    animation: 1s blink infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.1s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.2s;
}

@keyframes blink {
    50% {
        opacity: 1;
    }
}

/* User Form Styles */
#chatbot-user-form {
    padding: 30px 20px;
    background: #fdfdfd;
    height: 100%;
}

.chatbot-form-content p {
    font-size: 15px;
    color: #555;
    margin-bottom: 25px;
    text-align: center;
}

.chatbot-form-group {
    margin-bottom: 20px;
}

.chatbot-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #444;
    margin-bottom: 8px;
}

.chatbot-form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.chatbot-form-group input:focus {
    border-color: #03a84e;
    outline: none;
}

#chatbot-start-chat {
    width: 100%;
    padding: 14px;
    background: #03a84e;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 10px;
}

#chatbot-start-chat:hover {
    background: #028a40;
}