:root {
    --primary-color: #2E7D32;
    --secondary-color: #E8F5E9;
    --gradient-start: #2E7D32;
    --gradient-end: #4CAF50;
    --text-color: #333;
    --light-gray: #f5f5f5;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Noto Sans Lao Looped', sans-serif;
}

body {
    background-color: #f0f2f5;
}

.chat-container {
    max-width: 480px;
    margin: 20px auto;
    height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    background: white;
    animation-duration: 0.8s;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    overflow: hidden;
}

.chat-header {
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    color: white;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    animation-duration: 0.8s;
    animation-delay: 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.bot-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.chat-header .bot-avatar {
    width: 48px;
    height: 48px;
    margin-right: 10px;
    transition: transform 0.3s ease;
}

.chat-header .bot-avatar:hover {
    transform: scale(1.1);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    background: #f8f9fa;
    scroll-behavior: smooth;
}

.message {
    margin-bottom: 1rem;
    padding: 0.8rem 1rem;
    border-radius: 1.2rem;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    max-width: 75%;
    animation-duration: 0.5s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.message-icon {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    color: white;
    font-size: 1.2rem;
}

.bot-message {
    background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
    margin-right: auto;
    border-bottom-left-radius: 5px;
    border: 1px solid rgba(46, 125, 50, 0.2);
}

.user-message {
    background-color: #007bff;
    color: white;
    margin-left: auto;
    flex-direction: row-reverse;
    border-bottom-right-radius: 5px;
}

.chat-input {
    padding: 1rem 1.5rem;
    display: flex;
    gap: 0.8rem;
    border-top: 1px solid #eee;
    background: white;
    animation-duration: 0.8s;
    animation-delay: 0.4s;
}

#searchInput {
    flex: 1;
    padding: 0.8rem 1.2rem;
    border: 1px solid #ddd;
    border-radius: 2rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

#searchInput:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
    background: white;
}

#sendBtn {
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

#sendBtn:hover {
    transform: scale(1.1);
    background: linear-gradient(135deg, var(--gradient-end) 0%, var(--gradient-start) 100%);
}

#sendBtn img {
    width: 24px;
    height: 24px;
    filter: brightness(0) invert(1);
}

#sendBtn i {
    color: white;
}

.order-result {
    width: 100%;
    background: #fff;
    border-radius: 8px;
    padding: 10px;
    margin: 5px 0;
}

.result-row {
    padding: 5px 0;
    border-bottom: 1px solid #eee;
}

.result-row:last-child {
    border-bottom: none;
}

.label-lo {
    font-weight: bold;
    color: #2196F3;
    margin-right: 8px;
}

.label-en {
    color: #666;
    font-size: 0.9em;
    margin-right: 8px;
}

.value {
    color: #333;
}

.bot-message .order-result {
    background: #f8f9fa;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.search-results {
    width: 100%;
    max-width: 600px;
}

.result-summary {
    background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 2px 4px rgba(46, 125, 50, 0.1);
}

.result-summary h3 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 10px;
}

.today-orders-header {
    background: #e3f2fd;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
    color: #1976D2;
    font-weight: bold;
}

.status-breakdown {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.status-breakdown p {
    margin: 5px 0;
    padding: 8px 12px;
    border-radius: 6px;
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border-left: 3px solid var(--primary-color);
}

.order-card {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s;
    border-left: 3px solid var(--primary-color);
}

.order-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.order-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9em;
}

.status-pending { background: #E8F5E9; color: var(--primary-color); border-left: 3px solid var(--primary-color); }
.status-paid { background: #E8F5E9; color: var(--primary-color); border-left: 3px solid var(--primary-color); }
.status-shipped { background: #E8F5E9; color: var(--primary-color); border-left: 3px solid var(--primary-color); }
.status-completed { background: #E8F5E9; color: var(--primary-color); border-left: 3px solid var(--primary-color); }
.status-cancelled { background: #E8F5E9; color: var(--primary-color); border-left: 3px solid var(--primary-color); }

.message:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(46, 125, 50, 0.15);
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--gradient-end);
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: var(--gradient-start);
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Add specific styles for icon-based message avatar */
i.message-icon {
    width: 35px;
    height: 35px;
    padding: 8px;
    object-fit: initial;
}

/* Keep user avatar as image */
img.message-icon {
    object-fit: cover;
}

/* Add after the chat-header styles (around line 44) */
.header-tooltip {
    font-size: 0.8rem;
    opacity: 0.8;
    margin-left: auto;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    transition: opacity 0.3s ease;
}

.header-tooltip:hover {
    opacity: 1;
}

/* Add animation for clear notification */
.message.bot-message.clear-notification {
    animation: fadeOut 2s forwards;
    animation-delay: 2s;
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; height: 0; margin: 0; padding: 0; }
}

/* Add after the order-details styles (around line 270) */
.product-list {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #ddd;
}

.product-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    margin-left: 15px;
}

.product-price {
    color: var(--primary-color);
    font-weight: bold;
}
