 /*:root {
    --primary-color: #673de6;
    --primary-color-hover: #673de6; 
    --primary-border-color: #673de6;
}*/
 #chat-widget-toggle {
     position: fixed;
     bottom: 10px;
     right: 20px;
     height:50px;
     background: var(--primary-color);
     border: 1px solid var(--primary-border-color);
     color: #fff;
     padding: 10px 15px;
     border-radius: 30px;
     cursor: pointer;
     font-size: 20px;
     z-index: 9999;
     display: flex;
     align-items: center;
     gap: 5px;
 }
 .top-chat-header{
     display: flex;
     align-items: center;
     background: linear-gradient(90deg, var(--primary-color), var(--primary-color));
     color: #fff;
     padding: 10px 14px;
     border-radius: 12px 12px 0 0;
     box-shadow: 0 2px 6px rgba(0,0,0,0.15);
     font-family: 'Inter', Arial, sans-serif;
     white-space: nowrap;
     box-sizing: border-box;
 }
 .user-header {
    display: flex;
    align-items: center;
    justify-content: flex-end; /* right side for user */
    margin-top: 10px;
    margin-bottom: 4px;
    text-align: left;
}
.text-send-button{
    background: var(--primary-color);
    border: none;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}
 /* Right-side icon container */
.chat-header-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Unified icon button */
.chat-header-icon {
    width: 32px;
    height: 32px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: transparent;
    border: none;
    cursor: pointer;

    color: #fff;
    font-size: 16px;
    line-height: 1;

    padding: 0;
    border-radius: 6px;

    transition: transform 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

/* SVG inside buttons */
.chat-header-icon svg {
    width: 20px;
    height: 20px;
    display: block;
}

/* Hover effect */
.chat-header-icon:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.1);
    opacity: 0.85;
}
@media (max-width: 480px) {
    .chat-header-icon {
        width: 28px;
        height: 28px;
        font-size: 16px;
    }

    .chat-header-icon svg {
        width: 18px;
        height: 18px;
    }
}

/* Mobile-specific styles */
@media screen and (max-width: 768px) {
    /* Chat toggle button */
    #chat-widget-toggle {
        background-color: var(--primary-color);
        color: #ffff; /* white text */
    }
    .bot-message {
     background-color: aliceblue;
     /*align-self: flex-start;*/
     text-align: left;
     color:#000;
     border: 1px solid #475bcb;
 }
}
/* MOBILE VIEW - disable stretching */
@media (max-width: 768px) {
    #chat-box {
        width: 90vw;
        min-width: auto;
        max-width: 90vw;
        height: 50vh;  /* Reduced from 60vh to 50vh */
        max-height: 500px;  /* Add maximum height limit */
        min-height: auto;
        resize: none;
        right: 5%;
        bottom: 5%;
    }
}
.footer-btn {
    padding: 10px 16px;
    border: 1px solid var(--primary-color);
    border-radius: 25px;
    background: white;
    color:#000;
    cursor: pointer;
    font-size: 12px;
}

.footer-btn:hover {
    background: #f2f2f2;
    color:#000;
}
.footer-btn:disabled,
.disabled-btn {
    opacity: 0.5;
    pointer-events: none;
}
.footer-btn-option {
    padding: 10px 16px;
    border: 1px solid var(--primary-color);
    border-radius: 25px;
    background: white;
    color:#000;
    cursor: pointer;
    font-size: 12px;
}

.footer-btn-option:hover {
    background: #f2f2f2;
    color:#000;
}
.footer-btn-option:disabled,
.disabled-btn {
    opacity: 0.5;
    pointer-events: none;
}

 #chat-box {
     display: none;
     position: fixed;
     bottom: 5px;
     right: 5px;
    
     /*max-width: 70vh;*/
    /* max-height: 70vh;*/
     height:90vh;
     border: 1px solid var(--primary-color);
     border-radius: 10px;
     background: #fff;
     font-family: Arial, sans-serif;
     font-size: 14px;
     box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
     z-index: 9999;
     flex-direction: column;
    /* overflow: hidden;*/
     padding:10px;
     width: min(420px, 95vw);
     box-sizing: border-box; /* ensures padding doesn't break width */
     /* overflow: auto;    */

 }
/* Make inner content flexible */
#chat-box .content {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px; /* spacing between messages */
}
#resizeHandle {
  width: 2px;
  cursor: ew-resize; /* horizontal resize */
  background: rgba(0,0,0,0.2);
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
}
/* Chat header safety */
#chat-box > div:first-child {
    position: relative;
    flex-wrap: nowrap;
    overflow: hidden;
}
#close-chat {
    flex-shrink: 0;
     color: #fff !important;
    margin-left: 4px;
}
@media (max-width: 480px) {
    #chat-box {
        width: 95vw;
        right: 2.5vw;
        bottom: 2.5vw;
    }

    #menu-toggle,
    #clear-chat,
    #close-chat {
        font-size: 14px;
        padding: 2px;
        
    }
}

 #chat-box.visible {
     display: flex;
 }

 #chat-help {
     background-color: aliceblue;
     align-self: flex-start;
     text-align: left;
     margin: 5px 0;
     padding: 8px;
     border-radius: 10px;
     width: 95%;

 }

 #chat-suggestions {
     margin-bottom: 10px;
 }


 #chat-scroll-area {
     flex: 1;
     overflow-y: auto;
     display: flex;
     flex-direction: column;
     gap: 10px;
     margin-bottom: 10px;
 }

 #chat-messages {
     display: flex;
     flex-direction: column;
     gap: 5px;
 }
/* Force your dropdown to use native styles - prevent other plugins from interfering */
.kalrav-language-select,
#language-select {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-color: #f9f9ff !important;
    border: 1px solid #ccc !important;
    border-radius: 8px !important;
    padding:0px 36px 10px 12px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    font-family: inherit !important;
    color: #333 !important;
    cursor: pointer !important;
    outline: none !important;
    width: 120px !important;
    height: 42px !important;
    display: block !important;
    transition: all 0.2s ease !important;
    
    /* Prevent other plugins from transforming it */
    background-image: none !important;
    box-shadow: none !important;
    text-transform: none !important;
}
/* Language Dropdown Container */
.kalrav-language {
    position: relative;
    display: inline-block;
}

/* Language Select Dropdown */
.kalrav-language-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: #f9f9ff;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 8px 36px 10px 12px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    color: #333;
    cursor: pointer;
    outline: none;
    width: 120px;
    height: 42px;
    display: block !important;
    transition: all 0.2s ease;
}

/* Focus State */
.kalrav-language-select:focus {
    border-color: #673de6;
}

/* Hover State */
.kalrav-language-select:hover {
    border-color: #999;
}

/* Custom Dropdown Arrow */
.kalrav-language-arrow {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    stroke: #666;
    width: 16px;
    height: 16px;
}

/* Dropdown Options Styling */
.kalrav-language-select option {
    padding: 10px;
    background-color: #fff;
    color: #333;
}

/* Ensure dropdown is always visible when open */
.kalrav-language-select:focus {
    z-index: 9999;
}
/* Prevent Select2, Chosen, or other select libraries from initializing */
.kalrav-language-select.select2-hidden-accessible,
#language-select.select2-hidden-accessible {
    display: block !important;
    visibility: visible !important;
    position: relative !important;
}

/* Hide any wrapper divs created by other plugins */
.kalrav-language + .select2-container,
.kalrav-language + .chosen-container,
#language-select + .select2-container,
#language-select + .chosen-container {
    display: none !important;
}

/* Focus State */
.kalrav-language-select:focus,
#language-select:focus {
    border-color: #673de6 !important;
}
#clear-chat-dialog {
    display: none;
    position: absolute; /* Changed from fixed to absolute */
    right: 20px;
    top: 50%; /* Changed from bottom: 100px */
    transform: translateY(-50%); /* Center it vertically */
    background: #ffffff;
    border: 1px solid #e0e0e0;
    padding: 22px;
    border-radius: 12px;
    box-shadow: 0 4px 25px rgba(0,0,0,0.15);
    width: 320px;
    z-index: 100; /* Reduced from 2147483647 - should be relative to chat-box */
    font-family: 'Segoe UI', Arial, sans-serif;
    color: #222;
    transition: all 0.3s ease-in-out;
    
}
  .bot-typing {
     margin: 5px 0;
     padding: 8px;
     width: fit-content;
     border: 1px solid #475bcb;
     border-radius: 10px;
     max-width: 90%;
 }
 .chat-message {
     margin: 5px 0;
     padding: 8px;
     border-radius: 10px;
     max-width: 90%;
 }
/* Bold and italic */
.chat-message.bot-message div strong {
    font-weight: bold;
}

.chat-message.bot-message div b {
    font-weight: bold;
}

.chat-message.bot-message div em {
    font-style: italic;
}

/* Paragraph spacing */
.chat-message.bot-message div p {
    margin: 0 0 12px 0;
    font-size: 14px;
}

/* Lists */
.chat-message.bot-message div ul,
.chat-message.bot-message div ol {
    margin: 0 0 1px 20px;
    padding: 0;
}

.chat-message.bot-message div li {
    margin-bottom: 12px;
}

/* Gap between paragraph and list */
.chat-message.bot-message div p + ul,
.chat-message.bot-message div p + ol {
    margin-top: 8px;
}

/* Gap between list and next paragraph */
.chat-message.bot-message div ul + p,
.chat-message.bot-message div ol + p {
    margin-top: 8px;
}

ul li br:first-child {
  display: none; /* remove the first <br> before text */
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.chat-message.bot-message div a {
    color: #0073aa;
    text-decoration: underline;
}
.chat-message.bot-message div {
    color: #000000;
}


.chat-message.user-message {
    color: #fff; 
}
 .user-message {
     background-color: #24a7eb;
     align-self: flex-end;
     text-align: left;
     color:#fff;
     border: 1px solid #475bcb;
 }

 .bot-message {
     background-color: #fff;
    /* min-width: fit-content;*/
     text-align: left;
     color:#000;
     border: 1px solid #475bcb;
 }

 #chat-input {
     width: 100%;
     padding: 8px;
     border: 1px solid #ccc;
     border-radius: 5px;
 }
/* ✨ Chat Intro Section */
.chat-intro {
  /*background: linear-gradient(135deg, #f0f8ff 0%, #e8f2ff 100%);*/
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 15px;
  box-shadow: 0 2px 6px rgba(0, 115, 170, 0.1);
  color: #111;
  font-family: "Inter", "Segoe UI", sans-serif;
  transition: all 0.3s ease;
}

.chat-intro:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 115, 170, 0.15);
}

.chat-intro-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

/* Agent avatar */
.chat-agent-avatar img {
  width: 25px;
  height: 25px;
  background:var(--primary-color); 
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary-color);
  box-shadow: 0 0 0 3px #ffffff;
}

/* Text content */
.chat-intro-text {
  flex: 1;
  color: #000;
  font-size: 14px;
  line-height: 1.5;
}

.chat-greeting {
  margin: 0;
  font-weight: 600;
  color: var(--primary-color);
  font-size: 15px;
}

.chat-intro-text strong {
  color: var(--primary-color);
  font-weight: 600;
}

.chat-subtext {
  color: #333;
  font-size: 13px;
}

/* Optional subtle fade-in animation */
.chat-intro {
  animation: fadeInIntro 0.5s ease-in-out;
}

.confirm-clear-btn:hover {
    background: var(--primary-color);
}
@keyframes fadeInIntro {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.chat-time {
    font-size: 11px;
    color: gray;
    margin-bottom: 2px;
    text-align: right; /* aligns time to right */
}
.chat-time-res {
    font-size: 11px;
    color: gray;
    margin-bottom: 2px;
    text-align: left; /* aligns time to right */
}

.user-header-response {
    display: flex;
    align-items: center;
    
    margin-top: 10px;
    margin-bottom: 4px;
     text-align: right;
}
.chat-time {
    font-size: 11px;
    color: #888;
}

.chat-message.user-message {
    background: #673de6;
    color: #fff;
    padding: 8px 12px;
    border-radius: 12px;
    display: inline-block;
    max-width: 70%;
    align-self: flex-end;
}

 .text-send-button {
     background-color: var(--primary-color);
     border: none;
     height: 40px;
     border-radius: 30px;
     padding: 10px;
     cursor: pointer;
     display: flex;
     align-items: center;
     justify-content: center;
     transition: background 0.2s;
 }

 .text-send-button:hover {
     background-color: #20bd5f;
 }

 #chat-widget-toggle:hover {
     background-color: var(--primary-color-hover);
 }

 .chat-toggle-logo {
     max-width: 30px;
     max-height: 30px;
     border-radius: 50%;
 }

 .chat-label {
     border-radius: 100px;
     font-size: 14px;
     font-style: normal;
     font-weight: 700;
     justify-content: center;
 }
/* Suggestions container */
.chat-suggestions-container {
    margin-top: 10px;
}

.chat-suggestions-container strong {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

/* Suggestion buttons */
.chat-suggestion-btn {
    padding: 6px 14px;
    color: #0073aa;
    background-color: #e6f0fa;
    border: 1px solid #0073aa;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    margin: 0 5px 5px 0;
}
.attachment-btn.disabled {
  opacity: 0.5;       /* make it look faded */
  pointer-events: none; /* disable clicks */
  cursor: not-allowed; /* show not-allowed cursor */
  filter: grayscale(100%); /* optional: make it look inactive */
}
.category-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-bottom: 15px;
}

.category-item {
  width: 140px;
  height: 140px;
  border: 1px solid #e0e0e0;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  padding: 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
}

.category-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.category-item img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  margin-bottom: 8px;
}

.category-item div {
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

/* Hover effect */
.chat-suggestion-btn:hover {
    background-color: #0073aa;
    color: #fff;
    transform: scale(1.05);
}
.thumbs-container span {
    font-size: 10px;
    transition: transform 0.1s;
}

.thumbs-container span:hover {
    transform: scale(1.2);
}
.thumbs-container {
    pointer-events: auto;
    display: flex;
    gap: 10px;
    margin-top: 5px;
    margin-bottom: 10px;
    align-items: center;
}

 .typing-dots {
  display: inline-flex;
  align-items: center;
  font-style: italic;
  color: #555;
  font-size: 14px;
  gap: 2px;
}

.typing-dots span:nth-child(n+2) {
  opacity: 0;
  animation: blink 1.4s infinite;
}

.typing-dots span:nth-child(2) {
  animation-delay: 0s;
}
.typing-dots span:nth-child(3) {
  animation-delay: 0.2s;
}
.typing-dots span:nth-child(4) {
  animation-delay: 0.4s;
}

@keyframes blink {
  0%, 20%, 100% { opacity: 0; }
  50% { opacity: 1; }
}


 

 .kalravai-logo-wrapper {
     display: flex;
     align-items: center;
     gap: 10px;
     margin-top: 13px;
 }

 .kalravai-logo-preview {
     width: 30px;
     height: 30px;
     margin-top: 8px;
     border-radius: 50%;
     object-fit: cover;
     vertical-align: middle;
 }

 .custom-logo-upload-icon {
     width: 30px;
     height: 30px;
     background-color: #f0f0f0;
     border: 2px dashed #999;
     border-radius: 50%;
     position: relative;
     cursor: pointer;
     display: inline-block;
     margin-top: 8px;
     vertical-align: middle;
 }

 .custom-logo-upload-icon::before,
 .custom-logo-upload-icon::after {
     content: '';
     position: absolute;
     background-color: #666;
 }

 .custom-logo-upload-icon::before {
     width: 2px;
     height: 16px;
     top: 7px;
     left: 14px;
 }

 .custom-logo-upload-icon::after {
     width: 16px;
     height: 2px;
     top: 14px;
     left: 7px;
 }

 .custom-logo-upload-icon:hover {
     background-color: #e0e0e0;
 }

 .kalravai-logo-wrapper {
     display: flex;
     align-items: center;
     gap: 10px;
     margin-top: 13px;
 }

 .kalravai-logo-preview {
     width: 30px;
     height: 30px;
     margin-top: 8px;
     border-radius: 50%;
     object-fit: cover;
     vertical-align: middle;
 }

 .custom-logo-upload-icon {
     width: 30px;
     height: 30px;
     background-color: #f0f0f0 !important;
     ;
     border: 2px dashed #999 !important;
     ;
     border-radius: 50%;
     position: relative;
     cursor: pointer;
     display: inline-block;
     margin-top: 8px;
     vertical-align: middle;
 }

 .custom-logo-upload-icon::before,
 .custom-logo-upload-icon::after {
     content: '';
     position: absolute;
     background-color: #666;
 }

 .custom-logo-upload-icon::before {
     width: 2px;
     height: 16px;
     top: 7px;
     left: 14px;
 }

 .custom-logo-upload-icon::after {
     width: 16px;
     height: 2px;
     top: 14px;
     left: 7px;
 }

 .custom-logo-upload-icon:hover {
     background-color: #e0e0e0;
 }
 /*theme color selection*/
  .kalravai-color-picker-wrapper {
            max-width: 600px;
        }
        
        .kalravai-color-field {
            width: 200px;
            padding: 5px 10px;
            font-size: 14px;
            border: 1px solid #8c8f94;
            border-radius: 3px;
        }
        
        .kalravai-color-palette {
            margin-top: 20px;
            padding: 15px;
            background: #f9f9f9;
            border: 1px solid #ddd;
            border-radius: 4px;
        }
        
        .kalravai-color-list {
            display: flex;
            flex-wrap: wrap;
            gap: 15px;
            margin-top: 10px;
        }
        
        .kalravai-color-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 8px;
        }
        
        .kalravai-color-label {
            font-size: 12px;
            color: #666;
            text-align: center;
            min-width: 80px;
        }
        
        .kalravai-color-swatch {
            width: 50px;
            height: 50px;
            border: 2px solid #ddd;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }
        
        .kalravai-color-swatch:hover {
            transform: scale(1.1);
            border-color: #0073aa;
            box-shadow: 0 4px 8px rgba(0,0,0,0.2);
        }
        
        .kalravai-color-swatch:active {
            transform: scale(0.95);
        }