.chat-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #d31044;
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(211, 16, 68 ,0.4);
    transition: transform .2s;
    z-index: 1000;
}

.chat-toggle-icon {
    font-size: 30px;
}

.hide {
    display: none;
}

.chat-sidebar {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 110px;
    right: 0px;
    width: 450px;
    height: calc(100vh - 110px);
    font-family: "Roboto", sans-serif; color: #37414c;
    background: #ffffff;
    border-left: 1px solid #e9ecef;
    box-shadow: -4px 0 20px rgba(0,0,0,0.1);
    transition: right 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 1050;
    transform: translateX(100%);
    transition: transform .3s cubic-bezier(.25,.8,.25,1);
}

.chat-sidebar.open {
    transform: translateX(0);
}

.chat-sidebar-resizer {
    position: absolute;
    left: -3px;
    top: 0;
    width: 6px;
    height: 100%;
    background: transparent;
    cursor: ew-resize;
    z-index: 1060;
}

.chat-sidebar-resizer:hover {
    background: rgba(211, 16, 68, 0.2);
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e9ecef;
    background: #f2f4f5;
}

.chat-title {
    display: flex;
    align-items:
    center; gap: 8px;
}

.chat-title-icon {
    font-size: 26px;
    color: #d31044;
}

.chat-title-text {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #37414c;
}

.chat-title-text span {
    font-size: 16px; 
    font-weight: 400; 
    color: #37414c;
}

.chat-actions {
    display: flex;
    gap: 4px;
}

.chat-action {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    padding: 6px;
    border-radius: 6px;
    color: #37414c;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.chat-action:hover  {
    background-color: rgba(211, 16, 68, 0.1);
    color: #d31044;
}

.chat-action-icon {
    font-size: 22px;
}

.chat-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.chat-body.hide {
    display: none;
}

.chat-welcome {
    display: none;
    padding: 10px 20px 0 20px;
    cursor: pointer;
    transition: background 0.2s;
}

.chat-welcome.show {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-welcome:hover {
    background: #e2e8f0;
}

.chat-welcome-content {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.chat-welcome-content-icon {
    margin-top: -2px;
    font-size: 28px;
    color: #d31044;
}

.chat-welcome-content-wrapper {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
}

.chat-welcome-text {
    color: #d31044;
    font-weight: 500;
}

.chat-content {
    flex: 1;
    overflow-y: auto;
    background: #ffffff;
    padding-top: 10px;
}

.chat-input-section {
    padding: 16px 20px;
    background-color: #f2f4f5;
    border-top: 1px solid #e9ecef;
}

.chat-input-wrapper {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    justify-content: space-between;
}

.chat-new-thread {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    background-color: #ffffff;
    border: 1px solid #ccc;
    color: #37414c;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.chat-new-thread-icon {
    font-size: 20px;
}

.chat-textarea {
    flex: 1;
    padding: 12px;
    min-height: 44px;
    height: 44px;
    max-height: 250px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
    resize: none;
    font-family: 'Roboto', sans-serif;
    overflow: hidden;
}

.chat-textarea.expired {
    background-color: #f9fafb;
    cursor: not-allowed;
}

.chat-send {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    background: #d31044;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.chat-send.expired,
.chat-new-thread.expired {
    opacity: 0.5;
    cursor: not-allowed;
}

.chat-send-icon {
    font-size: 18px;
}

.chat-note {
    margin-top: 12px;
    font-size: 11px;
    color: #6c757d;
    text-align: center;
}

.chat-history {
    display: none;
    flex-direction: column;
    flex: 1;
    background: #f2f4f5;
    overflow: hidden;
}

.chat-history.show {
    display: flex;
}

.history-wrapper {
    flex: 1; 
    padding: 16px 20px;
    overflow-y: auto;
}

.history-message {
    font-size:13px;
    color:#6b7280;
}

.history-btn-back {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 20px;
    padding: 0;
    background: transparent;
    border: none;
    color: #37414c;
    cursor: pointer;
}

.history-btn-icon {
    font-size: 18px;
}

.history-title {
    margin: 0 0 16px 0;
    color: #d31044;
    font-weight: 500;
}

.history-item {
    margin-bottom: 10px;
    padding: 16px;
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.history-item:hover {
    border-color: #d31044;
}

.history-item-title {
    margin-bottom: 4px;
    font-weight: 500;
    font-size: 15px;
}

.history-item-meta {
    font-size: 12px;
    color: #6b7280;
}

.chat-messages {
    margin-bottom: 20px;
}

.user-bubble {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: #f2f4f5;
    border-left: 3px solid #cbd5e1;
    cursor: pointer;
    transition: background 0.2s;
}

.user-bubble:hover {
    background: #e2e8f0;
}

.user-bubble-content {
    display: flex;
    gap: 12px;
    align-items: center;
}

.user-bubble-icon {
    font-size: 22px;
    color: #6b7280;
}

.user-bubble-question {
    font-size: 14px;
    font-weight: 500;
}

.user-bubble-chev {
    font-size: 20px;
}

.bot-bubble {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 20px;
    border-left: 3px solid #d31044;
    background: #ffffff;
}

.bot-bubble.collapsed {
    display: none;
}

.bot-bubble-content {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.bot-bubble-content-icon {
    margin-top: -2px;
    color: #d31044;
    font-size: 24px;
}

.bot-bubble-answer {
    flex: 1;
    font-size: 14px;
}

.bot-typing-indicator {
    
}

.action-bar {
    display: none;
}

.action-bar.show {
    display: flex;
    justify-content: flex-end; 
}

.copy-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 13px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #6b7280;
}
.copy-btn:hover {
    color: #d31044;
    background: rgba(211, 16, 68, 0.1);
}

.copy-btn-icon {
    font-size: 16px;
}

.copy-btn-icon.copied {
    color: #27ae60;
}

.source-box {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed #cbd5e1;
    font-size: 12px;
    color: #64748b;
    font-style: italic;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.source-box-icon {
    font-size: 16px;
}

.bot-typing-indicator{
    display: flex;
    align-items: center;
    gap: 5px;
    height: 22px;
    padding-top: 5px;
}

.bot-typing-indicator .dot {
    display: block;
    width: 6px;
    height: 6px;
    background-color: #d31044;
    border-radius: 50%;
    animation: ai-bounce 1.4s infinite ease-in-out both;
}

.bot-typing-indicator .dot:nth-child(1) {
    animation-delay: -0.32s;

}

.bot-typing-indicator .dot:nth-child(2) {
    animation-delay: -0.16s;
}

.mdi-chevron-down,
.mdi-chevron-down::before {
    width: 20px;
    height: 30px;
}

.text-underline {
    text-decoration: underline
}

.chat-faq-btn {
    display: none;
    text-align: center;
    margin-top: 10px;
    margin-bottom: 10px;
    font-size: 18px;
    width: 100%;
}

.chat-faq-btn.show {
    display: inline-block;
}

.chat-faq-btn-open {
    display: inline-flex; 
    align-items: center; 
    gap: 6px; 
    font-size: 13px; 
    color: #64748b; 
    cursor: pointer; 
    transition: color 0.2s;
}

.view-faq {
    display: none; 
    flex-direction: column; 
    flex: 1; 
    background: #f2f4f5; 
    overflow: hidden;
}

.view-faq.show {
    display: flex;
}

.view-faq-content {
    padding: 16px 20px; 
    flex: 1; 
    overflow-y: auto;
}

.faq-btn-back {
    background: transparent; 
    border: none; 
    color: #37414c; 
    cursor: pointer; 
    padding: 0; 
    display: flex; 
    align-items: center; 
    gap: 4px; 
    margin-bottom: 20px;
}

.faq-btn-back-icon {
    font-size: 18px;
}

.faq-title {
    margin: 0 0 16px 0; 
    color: #d31044; 
    font-weight: 500;
}

.faq-list-item {
    background: #ffffff; 
    border: 1px solid #e9ecef; 
    margin-bottom: 10px; 
    border-radius: 4px; transition: 
    border-color 0.2s;
}

.faq-list-item-q {
    padding: 12px 16px; 
    font-weight: 500; 
    font-size: 14px; 
    cursor: pointer; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    transition: background 0.2s;
}

.faq-list-item-q:hover { 
    background: #f8fafc; 
    color: #d31044; 
}

.faq-list-item-a {
    padding: 0 16px 16px 16px; 
    font-size: 13px; 
    color: #475569; 
    line-height: 1.5; 
    border-top: 1px dashed #e2e8f0; 
    margin-top: 4px; 
    padding-top: 12px;
}

.chat-proposed {
    display: none;
    width: 100%;
}

.chat-proposed.show {
    display: inline-block;
}

.chat-proposed-item {
    margin-bottom: 10px;
}

.chat-proposed-bubble {
    background: #f2f4f5; 
    padding: 12px 20px; 
    cursor: pointer; 
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    border-left: 3px solid #cbd5e1; 
    transition: background 0.2s;
}

.chat-proposed-bubble:hover { 
    background: #e2e8f0; 
}

.chat-proposed-bubble.faq-bubble { 
    border-left: 3px solid #d31044; 
    background: #fff5f7; 
}

.chat-proposed-bubble.faq-bubble:hover { 
    background: #ffe1e6; 
}

.chat-proposed-bubble.faq-bubble { 
    border-left: 3px solid #d31044; 
    background: #fff5f7; 
}

.chat-proposed-bubble.faq-bubble:hover { 
    background: #ffe1e6; 
}

.chat-proposed-question-container {
    display: flex; 
    gap: 12px; 
    align-items: center;
}

.chat-proposed-question-text {
    font-size: 14px; 
    font-weight: 500; 
    color: #37414c;
}

.chat-proposed-icon {
    font-size: 22px; 
    color: #d31044;
}

.chat-proposed-down-icon {
    font-size: 20px; 
    color: #37414c;
}

.chat-proposed-bot-bubble {
    padding: 16px 20px; 
    border-left: 3px solid #d31044; 
    display: flex; 
    flex-direction: column; 
    gap: 12px; 
    background: #ffffff;
}

.chat-proposed-bot-bubble.collapsed { 
    display: none !important; 
}

.chat-proposed-bot-bubble-content { 
    display: flex; 
    gap: 16px; 
    align-items: flex-start; 
}

.chat-proposed-bot-bubble-content .mdi-robot-outline { 
    color: #d31044; 
    font-size: 24px; 
    margin-top: -2px; 
}

.unavailable-message {
    position: fixed;
    top: 16px;
    right: 16px;
    width: 320px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: #fff;
    border-left: 4px solid #c2185b;
    color: #c2185b;
    font-size: 14px;
    line-height: 1.4;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    z-index: 99999;
}

.unavailable-message-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border: 2px solid #c2185b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
}

.unavailable-message-content {
    flex: 1;
}

.unavailable-message-close {
    background: none;
    border: none;
    color: #c2185b;
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

.ai-docs-section {
    padding: 16px 20px;
    background: #ffffff;
    border-bottom: 1px solid #e9ecef;
}

.ai-docs-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #d31044;
    font-size: 13px;
    margin-bottom: 10px;
}

.ai-docs-title-icon {
    font-size: 18px;
}

.ai-docs-dropdown-wrapper {
    position: relative;
}

.ai-doc-dropdown-btn {
    border: 1px solid #e9ecef;
    padding: 8px 12px;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f2f4f5;
    font-size: 14px;
    cursor: pointer;
}

.ai-doc-dropdown-btn.expired {
    opacity: .6;
    cursor: not-allowed;
}

.ai-doc-dropdown-text-icon {
    margin-right: 6px;
}

.ai-doc-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    z-index: 100;
    max-height: 220px;
    overflow-y: auto;
}

.ai-doc-dropdown-menu.show {
    display: block;
}

.ai-doc-item {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s;
    align-items: center;
}

.ai-doc-item:hover {
    background: #f8fafc;
}

.ai-doc-item input {
    accent-color: #d31044;
    transform: scale(1.1);
    cursor: pointer;
    margin: 0;
}

.ai-doc-item-main {
    background: #f8fafc;
    font-weight: 500;
    border-bottom: 2px solid #e9ecef;
}

.ai-scroll::-webkit-scrollbar {
    width: 6px;
}

.ai-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.ai-scroll::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.chat-limit-banner{
    display:none;
}

.chat-limit-message {
    display: none;
    background: transparent;
    padding: 0;
    margin: 0;
}

.chat-limit-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.chat-limit-text {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #4b5563;
}

.chat-limit-text i {
    font-size: 18px;
    color: #d31044;
}

.chat-limit-title {
    font-weight: 700;
    color: #37414c;
    margin-bottom: 2px;
    font-size: 15px;
}

.chat-limit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    padding: 8px 14px;
    border-radius: 8px;
    background: #d31044;
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: .2s;
}

.chat-limit-btn:hover {
    background: #b50d3a;
    color: #fff;
}

.chat-limit-help {
    margin-top: 12px;
}

.chat-limit-help-toggle {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    width: fit-content;
    margin: 0 auto;
    background: none;
    border: 0;
    padding: 0;
    font-size: 13px;
    color: #6b7280;
    cursor: pointer;
}

.chat-limit-help-toggle i {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.chat-limit-help-toggle i::before {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.chat-limit-help-content {
    display: none;
    margin-top: 10px;
    padding: 14px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    text-align: left;
}

.chat-limit-help-content.show {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chat-limit-help-title {
    font-size: 13px;
    font-weight: 600;
}

.chat-limit-help-content a {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #4b5563;
    text-decoration: none;
}

.chat-limit-help-content a:hover {
    color: #d31044;
}

.ai-example-pill {
    display: flex; 
    align-items: center; 
    gap: 8px; 
    background: #ffffff; 
    color: #475569; 
    padding: 8px 12px;
    border-radius: 6px; 
    font-size: 13px; 
    border: 1px solid #e2e8f0; 
    font-style: italic; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.ai-promo-tooltip {
    position: fixed; 
    bottom: 35px; 
    right: 105px; 
    width: max-content; 
    max-width: 260px;
    background: #ffffff; 
    border: 1px solid #e9ecef; 
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15); 
    padding: 12px 28px 12px 14px; 
    z-index: 1040;
    display: flex; 
    flex-direction: column; 
    opacity: 0; 
    pointer-events: none; 
    transform: translateX(15px);
    transition: opacity 0.3s, transform 0.3s;
    font-family: "Roboto", sans-serif;
}

.ai-promo-tooltip.show { 
    opacity: 1; 
    transform: translateX(0); 
    pointer-events: auto; 
}

.ai-tooltip-close {
    position: absolute; 
    top: 4px; 
    right: 4px; 
    background: transparent; 
    border: none; 
    cursor: pointer; 
    color: #94a3b8; 
    font-size: 16px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    width: 24px; 
    height: 24px; 
    border-radius: 50%;
}

.ai-tooltip-close:hover { 
    color: #d31044; 
    background: #f1f5f9; 
}

.ai-tooltip-tail {
    position: absolute; 
    top: 50%; 
    right: -7px;
    width: 12px; 
    height: 12px; 
    background: #ffffff;
    border-top: 1px solid #e9ecef; 
    border-right: 1px solid #e9ecef;
    transform: translateY(-50%) rotate(45deg);
}

.ai-btn-floating {
    position: fixed; 
    bottom: 30px; 
    right: 30px; 
    width: 60px; 
    height: 60px; 
    border-radius: 50%; 
    background: #d31044; 
    color: white; 
    border: none; 
    cursor: pointer; 
    box-shadow: 0 4px 15px rgba(211, 16, 68, 0.4); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    z-index: 1040; 
    transition: transform 0.2s, background-color 0.2s, border 0.2s, box-shadow 0.2s
}

@media (max-width: 767.98px) {
    .chat-sidebar {
        top: 54px;
        height: calc(100vh - 54px);
        width: 100%;
    }
    
    .chat-sidebar-resizer {
        display: none;
    }

    .ai-promo-tooltip { 
        display: none; 
    }
}

@keyframes ai-bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

@keyframes ai-bounce-float {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-20px); }
    60% { transform: translateY(-10px); }
}
.ai-bounce-anim { animation: ai-bounce-float 1.5s ease; }

@keyframes ai-float-infinite {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
.ai-float-infinite { animation: ai-float-infinite 3s ease-in-out infinite; }