/** {*/
/*    margin: 0;*/
/*    padding: 0;*/
/*    box-sizing: border-box;*/
/*    font-family: 'Inter', sans-serif;*/
/*}*/

/*body {*/
/*    background-color: #f0f2f5;*/
/*    display: flex;*/
/*    justify-content: center;*/
/*    align-items: center;*/
/*    min-height: 100vh;*/
/*    padding: 20px;*/
/*}*/

/*.main-container {*/
/*    width: 100%;*/
/*    max-width: 1000px;*/
/*    margin: 0 auto;*/
/*    z-index: 9999;*/
/*}*/

/*.chat-container {*/
/*    display: flex;*/
/*    height: 85vh;*/
/*    max-height: 900px;*/
/*    margin: 0 auto;*/
/*    border-radius: 12px;*/
/*    overflow: hidden;*/
/*    box-shadow: 10px 10px 25px rgba(0, 0, 0, 0.15);*/
/*}*/

.main-container {
    width: 100%;
    max-width: 1000px; /* Keep max-width for overall chat container */
    margin: 0 auto; /* Keep margin auto for horizontal centering when not fixed */

    /* New styles for positioning at bottom right on large screens */
    position: fixed; /* Fix the container to the viewport */
    bottom: 20px;    /* 20px from the bottom */
    right: 20px;     /* 20px from the right */
    z-index: 1000;   /* Ensure it's on top of other content */
    /*max-width: 400px; !* Limit width for a chat widget appearance *!*/
    height: 85vh;    /* Set a fixed height for the chat widget */
    max-height: 600px; /* Max height to prevent it from becoming too tall */
}

.chat-container {
    display: flex;
    height: 100%; /* Make chat-container fill the main-container height */
    max-height: none; /* Override previous max-height */
    margin: 0; /* Remove auto margin */
    border-radius: 12px;
    /*overflow: hidden;*/
    border: 2px solid #d95614;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.sidebar {
    flex: 0 0 300px;
    background-color: #fff;
    border-right: 1px solid #eee;
    display: flex;
    flex-direction: column;
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
    transition: all 0.3s ease;
}

.chat-area {
    flex: 1;
    background-color: #fdfdfd;
    display: flex;
    flex-direction: column;
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

.sidebar-header {
    padding: 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    color: #fff;
    justify-content: space-between;
    background-color: #d95614;
    border-top-left-radius: 12px;
}

.chat-sidebar-search {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
}

.sidebar-chat-list {
    flex: 1;
    overflow-y: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.sidebar-chat-list::-webkit-scrollbar {
    display: none;
}

.chat-list-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-radius: 8px;
    margin: 0 5px;
}

.chat-list-item:hover {
    background-color: #f5f5f5;
}

.chat-list-item.active {
    background-color: #e0f2f7;
    font-weight: bold;
}

.chat-list-item img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    margin-right: 12px;
    object-fit: cover;
}

.chat-list-item .chat-info {
    flex: 1;
}

.chat-list-item .chat-info h6 {
    margin-bottom: 2px;
    font-weight: bold;
    font-size: 1.2rem;
}

.chat-list-item .chat-info p {
    font-size: 0.85em;
    color: #666;
    margin-bottom: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-list-item .chat-meta {
    text-align: right;
    font-size: 0.75em;
    color: #999;
}

.chat-header {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    background-color: #fff;
    border-top-right-radius: 12px;
}

.chat-header img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    margin-right: 10px;
    object-fit: cover;
}

.chat-header .chat-title h6 {
    margin-bottom: 2px;
    font-weight: bold;
    font-size: 1.5rem;
}

.chat-header .chat-title p {
    font-size: 0.75em;
    color: #666;
    margin-bottom: 0;
}

.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background-color: #e5ddd5;
    display: flex;
    flex-direction: column-reverse;
}

.message-bubble {
    max-width: 75%;
    padding: 10px 14px;
    border-radius: 18px;
    margin-bottom: 8px;
    word-wrap: break-word;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
    position: relative;
}

.message-incoming {
    background-color: #fff;
    align-self: flex-start;
    border: 1px solid #e0e0e0;
}

.message-outgoing {
    background-color: #dcf8c6;
    align-self: flex-end;
}

.message-meta {
    font-size: 0.65em;
    color: #888;
    margin-top: 3px;
    text-align: right;
}

.chat-input-area {
    padding: 12px;
    border-top: 1px solid #eee;
    background-color: #f0f2f5;
    display: flex;
    align-items: center;
    border-bottom-right-radius: 12px;
}

.chat-input-area .form-control {
    flex: 1;
    border-radius: 25px;
    padding: 8px 14px;
    border: none;
    background-color: #fff;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
    font-size: 1.5rem;
}

.chat-input-area .btn {
    flex: 0 0 50px;
    border-radius: 25px;
    margin-left: 8px;
    background-color: #007bff;
    color: #fff;
    border: none;
    padding: 8px 16px;
    transition: background-color 0.2s ease;
    font-size: 0.9rem;
}

.chat-input-area .btn:hover {
    background-color: #0056b3;
}

.chat-input-area .input-icons {
    display: flex;
    gap: 12px;
    margin-right: 12px;
}

.chat-input-area .input-icons i {
    font-size: 1.2em;
    color: #666;
    cursor: pointer;
    transition: color 0.2s ease;
}

.chat-input-area .input-icons i:hover {
    color: #007bff;
}

.suggested-questions-container {
    padding: 12px;
    background-color: #f8f9fa;
    border-radius: 12px;
    margin-top: 8px;
}

.suggested-questions-list {
    margin-bottom: 10px;
}

.suggested-questions-list .list-group-item {
    margin-bottom: 6px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid #dee2e6;
    transition: all 0.2s ease;
    font-size: 0.85rem;
}

.suggested-questions-list .list-group-item:hover {
    background-color: #e9ecef;
    border-color: #c0c0c0;
    transform: translateY(-2px);
}

.product-info-card {
    padding: 12px;
    background-color: #fff;
    border-top: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom-right-radius: 12px;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
}

.product-info-card img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
    margin-right: 12px;
}

.product-info-card .product-details {
    flex: 1;
}

.product-info-card .product-details h6 {
    margin-bottom: 2px;
    font-weight: bold;
    font-size: 0.95rem;
}

.product-info-card .product-details p {
    font-size: 0.8em;
    color: #666;
    margin-bottom: 0;
}

.product-info-card .btn-close {
    font-size: 0.7em;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.product-info-card .btn-close:hover {
    opacity: 1;
}

.llm-feature-btn {
    width: 100%;
    padding: 8px;
    border-radius: 8px;
    background-color: #6c757d;
    color: white;
    border: none;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.llm-feature-btn:hover:not(:disabled) {
    background-color: #5a6268;
}

.llm-feature-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.spinner-border {
    width: 1rem;
    height: 1rem;
    margin-right: 6px;
}

.user-dropdown {
    position: relative;
    display: inline-block;
}

.user-dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 160px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    z-index: 1;
    right: 0;
    top: 100%;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #eee;
}

.user-dropdown-content a {
    color: #333;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.user-dropdown-content a:hover {
    background-color: #f1f1f1;
}

.user-dropdown:hover .user-dropdown-content {
    display: block;
}

.dropdown-divider {
    height: 1px;
    background-color: #eee;
    margin: 4px 0;
}

@media (max-width: 992px) {
    .chat-container {
        height: 80vh;
    }

    .sidebar {
        flex: 0 0 250px;
    }

    .chat-list-item img {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .main-container {
        width: 100%;
    }

    .chat-container {
        height: 90vh;
        max-height: none;
        border-radius: 12px;
    }

    .sidebar {
        position: absolute;
        left: -360px;
        top: 0;
        bottom: 0;
        z-index: 1000;
        transition: left 0.3s ease-in-out;
        border-radius: 0;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    }

    .sidebar.show {
        left: 0;
    }

    .chat-area {
        width: 100%;
        border-radius: 12px;
    }

    .sidebar-toggle-btn {
        display: block !important;
    }

    .chat-header .ms-auto {
        margin-left: auto !important;
    }

    .message-bubble {
        max-width: 85%;
    }
}

@media (max-width: 576px) {
    .chat-container {
        height: 95vh;
        border-radius: 10px;
    }

    .suggested-questions-list .list-group-item {
        font-size: 0.8rem;
        padding: 8px 10px;
    }

    .chat-input-area .input-icons {
        gap: 8px;
        margin-right: 8px;
    }

    .chat-input-area .input-icons i {
        font-size: 1.1em;
    }

    .product-info-card {
        padding: 10px;
    }

    .product-info-card img {
        width: 40px;
        height: 40px;
    }

    .product-info-card .product-details h6 {
        font-size: 0.85rem;
    }

    .product-info-card .product-details p {
        font-size: 0.75em;
    }
}