body {
    background-color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.chatbot-container {
    display: flex;
    flex-direction: column;
    height: 95vh;
    max-height: 100%;
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
}

.chat-header {
    background-color: #f8f9fa;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    position: relative;
}

.chat-header h5 {
    margin: 0;
    font-weight: 600;
}

.chat-messages {
    flex-grow: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.message {
    display: flex;
    max-width: 80%;
}

.message.user {
    align-self: flex-end;
}

.message.bot {
    align-self: flex-start;
}

.message-content {
    padding: 0.5rem 0.75rem;
    border-radius: 1rem;
    background-color: #e9ecef;
    color: #212529;
}

.message.user .message-content {
    background-color: #0d6efd;
    color: white;
}

.chat-input-container {
    display: flex;
    padding: 0.5rem;
    border-top: 1px solid #dee2e6;
    gap: 0.5rem;
}

.source-pill {
    cursor: pointer;
}

.sources {
    margin-top: 8px;
    font-size: 0.8rem;
}

/* Session-related styles */
.session-info-bar {
    background-color: #f8f9fa;
    padding: 0.4rem 1rem;
    border-bottom: 1px solid #dee2e6;
    font-size: 0.75rem;
    color: #6c757d;
    display: none;
    text-align: center;
}

.session-info-bar.visible {
    display: block;
}

.session-continuation {
    text-align: center;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.session-continuation-banner {
    background-color: #e7f3ff;
    border-left: 4px solid #0d6efd;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border-radius: 4px;
    font-size: 0.85rem;
}

.session-continuation-banner strong {
    color: #0d6efd;
}

.session-continuation-banner small {
    color: #6c757d;
}

.clarification-message {
    margin-top: 12px;
    padding: 10px 12px;
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    border-radius: 4px;
    font-size: 0.9rem;
}

.clarification-message i {
    color: #856404;
    margin-right: 6px;
}

.follow-up-indicator {
    margin-top: 8px;
    padding: 6px 10px;
    background-color: #e7f3ff;
    border-left: 3px solid #0d6efd;
    border-radius: 4px;
    font-size: 0.8rem;
}

.follow-up-indicator i {
    color: #0d6efd;
    margin-right: 4px;
}

/* Store indicator styles */
.store-indicator {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    margin-left: 0.5rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.store-indicator:hover {
    background-color: #e9ecef;
}

.store-indicator.store-primary {
    background-color: #d1e7dd;
    color: #0f5132;
}

.store-indicator.store-none {
    background-color: #f8d7da;
    color: #842029;
}

.store-indicator .badge {
    margin-left: 0.25rem;
    font-size: 0.65rem;
}

/* Session context display */
.session-context {
    background-color: #f8f9fa;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid #dee2e6;
    font-size: 0.75rem;
    display: none;
}

.session-context.visible {
    display: block;
}

.session-context-items {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.context-item {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: #6c757d;
}

.context-item i {
    color: #0d6efd;
}

/* Toast notifications */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1050;
}

.toast {
    min-width: 250px;
    margin-bottom: 0.5rem;
}

/* Error message improvements */
.error-message {
    background-color: #f8d7da;
    border-left: 4px solid #dc3545;
    padding: 0.75rem;
    border-radius: 4px;
    margin-top: 0.5rem;
}

.error-message .retry-btn {
    margin-top: 0.5rem;
}

/* Product link styling */
.product-link {
    color: #0d6efd;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px dashed #0d6efd;
    transition: all 0.2s ease;
}

.product-link:hover {
    color: #0a58ca;
    border-bottom-style: solid;
    background-color: #e7f3ff;
    padding: 0 2px;
}

.product-link::after {
    content: " 🔗";
    font-size: 0.8em;
    opacity: 0.6;
}

@media (max-width: 768px) {
    .chat-messages {
        padding: 0.5rem;
    }
}

.chat-header .btn-close {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

.smaller {
    font-size: 0.6rem;
}