body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ============================
   Chat Widget Container
============================ */
.chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 350px;
    max-height: 500px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    font-size: 0.95em;
}

/* ============================
   Chat Header
============================ */
.chat-header {
    background: #0073e6;
    color: #fff;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-header img {
    max-height: 30px;
    margin-right: 10px;
}

.chat-header h4 {
    margin: 0;
    font-size: 1em;
}

.chat-header .chat-close {
    cursor: pointer;
    font-weight: bold;
}

/* ============================
   Messages Area
============================ */
.chat-messages {
    flex: 1;
    padding: 10px 15px;
    overflow-y: auto;
    background: #f4f6f9;
}

.chat-message {
    margin-bottom: 10px;
    max-width: 80%;
    padding: 8px 12px;
    border-radius: 10px;
    position: relative;
    clear: both;
}

.chat-message.admin {
    background: #0073e6;
    color: #fff;
    margin-left: auto;
    border-bottom-right-radius: 0;
}

.chat-message.customer {
    background: #e9ecef;
    color: #333;
    margin-right: auto;
    border-bottom-left-radius: 0;
}

/* Timestamp */
.chat-message .timestamp {
    font-size: 0.75em;
    color: #666;
    margin-top: 3px;
}

/* ============================
   Input Box
============================ */
.chat-input {
    display: flex;
    border-top: 1px solid #ccc;
}

.chat-input input[type="text"] {
    flex: 1;
    padding: 10px 12px;
    border: none;
    border-radius: 0;
    outline: none;
    font-size: 0.95em;
}

.chat-input button {
    background: #0073e6;
    color: #fff;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 0.95em;
}

.chat-input button:hover {
    background: #005bb5;
}

/* ============================
   Floating Chat Button
============================ */
.chat-toggle-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #0073e6;
    color: #fff;
    border-radius: 50%;
    width: 55px;
    height: 55px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 24px;
    z-index: 999;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

.chat-toggle-btn:hover {
    background: #005bb5;
}

/* ============================
   Scrollbar Styling
============================ */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background-color: rgba(0,0,0,0.2);
    border-radius: 3px;
}

/* ============================
   Responsive
============================ */
@media (max-width: 768px){
    .chat-widget {
        width: 90%;
        bottom: 15px;
        right: 5%;
        max-height: 400px;
    }

    .chat-toggle-btn {
        bottom: 15px;
        right: 5%;
    }
}

/* Chat Toggle Button */
#chatToggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #FFD700; /* gold */
    color: #006400; /* green text */
    padding: 10px 16px;
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    z-index: 10001;
}

/* Icon inside toggle */
#chatToggle .chat-icon {
    width: 28px;
    height: 28px;
}

/* Hover effect */
#chatToggle:hover {
    background: #DAA520; /* darker gold */
}