.chat-widget-launcher {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #4f9d3e;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 9999;
    transition: transform 0.3s;
}
.chat-welcome-text {
    color: var(--bg-dark-green);
    margin-bottom: 10px;
}
.chat-widget-launcher:hover {
    transform: scale(1.1);
}

.chat-widget-container {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.15);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    pointer-events: none;
}

.chat-widget-container.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.chat-header {
    background: #0f2a0f;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h3 {
    font-size: 16px;
    margin: 0;
    font-weight: 600;
}

#close-chat-btn {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
}

.chat-body {
    flex: 1;
    padding: 20px;
    display: none;
    flex-direction: column;
    overflow-y: auto;
}

.chat-body.active {
    display: flex;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    font-size: 12px;
    color: #666;
    display: block;
    margin-bottom: 5px;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
}

.start-chat-btn {
    width: 100%;
    background: #4f9d3e;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
}

.messages-area {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message-bubble {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.4;
}

.message-bubble.user {
    align-self: flex-end;
    background: #4f9d3e;
    color: white;
    border-bottom-right-radius: 2px;
}

.message-bubble.agent {
    align-self: flex-start;
    background: #f1f1f1;
    color: #333;
    border-bottom-left-radius: 2px;
}

.chat-input-area {
    display: flex;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.chat-input-area input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
}

#send-msg-btn {
    background: #0f2a0f;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.message-bubble {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.4;
    display: flex;
    flex-direction: column;
    min-width: 140px;
}

.message-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-size: 11px;
    opacity: 0.9;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    padding-bottom: 4px;
}

.message-bubble.agent .message-meta {
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.msg-name {
    font-weight: 700;
    margin-right: 10px;
    text-transform: capitalize;
}

.msg-time {
    font-size: 10px;
    font-weight: 400;
}
#chat-form-view {
    padding: 0;
    justify-content: space-between;
    overflow: hidden;
}

.chat-form-scroll {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.chat-form-footer {
    padding: 15px 20px;
    background: #fff;
    border-top: 1px solid #eee;
}

.start-chat-btn {
    margin-top: 0;
}

#chat-messages-view {
    padding: 0;
    overflow: hidden;
}

.chat-action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: #f9f9f9;
    border-bottom: 1px solid #eee;
}

#end-chat-btn {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

#end-chat-btn:hover {
    background: #ffcdd2;
}

.messages-area {
    padding: 15px 20px;
}

.chat-input-area {
    padding: 15px 20px;
    border-top: none;
    background: #fff;
}