:root {
  --green1: #003D2B;
  --green2: #21A179;
  --mint: #E4F1EA;
  --brown: #C56659;
  --black: #141414;
  --white: #FFFFFF;
  --light-gray: #f5f5f5;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);


  --gradient-green: linear-gradient(135deg, #003D2B, #21A179);
  --gradient-brown: linear-gradient(135deg, #A24E43, #C56659);
 
  --border-radius-lg: 16px;
  --border-radius-md: 12px;
  --border-radius-sm: 8px;
}


#cordibot-icon {
    position: fixed;
    bottom: 10px;
    right: 50px;
    width: 100px;
    height: 100px;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
    background: none;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: floating 3s ease-in-out infinite;
}


#cordibot-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: none;
}


#cordibot-icon:hover {
    transform: scale(1.1);
}


#cordibot-container {
    display: none;
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 380px;
    max-height: 520px;
    z-index: 1001;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 0, 0, 0.08);
}


/* Ensure smooth transitions between interfaces */
#chatbot-ui, #live-support-ui {
    transition: all 0.3s ease;
}


/* Animation for switching between interfaces */
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}


@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(-100%); opacity: 0; }
}


#live-support-ui {
    animation: slideIn 0.3s forwards;
}


#chatbot-ui.hiding {
    animation: slideOut 0.3s forwards;
}


.card-header {
    background: var(--gradient-green);
    color: var(--white);
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}


.chat-body {
    overflow-y: auto;
    height: 320px;
    background: var(--white);
    padding: 15px;
    scrollbar-width: thin;
    scrollbar-color: var(--green2) var(--light-gray);
}


.chat-message {
    margin-bottom: 15px;
    font-size: 14px;
}


.chat-message .sender {
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--black);
    font-size: 0.85rem;
}


.chat-message.bot .message {
    background: var(--mint);
    padding: 12px;
    border-radius: var(--border-radius-sm);
    max-width: 85%;
    margin-top: 6px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    word-wrap: break-word;
}


.message {
    padding: 12px 15px;
    border-radius: var(--border-radius-sm);
    max-width: 85%;
    line-height: 1.4;
}


.chat-message.user {
    display: flex;
    justify-content: flex-end;
}


.chat-message.user .message {
    background: var(--green1);
    color: var(--white);
    padding: 12px;
    border-radius: var(--border-radius-sm);
    max-width: 85%;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    text-align: left;
}


.chat-options button {
    margin-bottom: 5px;
}


.chat-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}


.chat-message.bot {
    display: flex;
    margin-bottom: 1rem;
}


.bot-profile img {
    border-radius: 50%;
    width: 36px;
    height: 36px;
    margin-right: 10px;
    background: transparent;
    object-fit: contain;
}


/* cordibot.css */


.cordibot-header-title {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0;
  letter-spacing: 0.2px;
  text-shadow: 0 1px 1px rgba(0,0,0,0.1);
}


/* Online Indicator */
.cordibot-status {
    display: flex;
    align-items: center;
    gap: 5px; /* space between circle and text */
    margin-top: 2px;
}


.status-indicator {
    width: 8px;
    height: 8px;
    background-color: #28a745; /* Bootstrap's green */
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
    animation: pulse 2s infinite;
}


@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}


.status-text {
    color: var(--white);
    font-size: 0.75rem;
    opacity: 0.9;
}


/* X button */
.cordibot-close-button {
    background: none;
    border: none;
    font-size: 1.2rem; /* Slightly smaller for better appearance */
    color: var(--white);
    text-decoration: none;
    line-height: 1;
    cursor: pointer;
    padding: 5px;
    margin: -5px;
    transition: opacity 0.2s;
}


.cordibot-close-button:hover {
    opacity: 0.8;
}


/* Cordibot Icon */
.img-header {
    width: 36px;
    height: 36px;
    object-fit: contain; /* Changed to contain to preserve transparency */
    background: transparent;
    border-radius: 50%;
    transition: transform 0.3s ease;
}


.img-header:hover {
    transform: scale(1.05);
}


/* Buttons */
/* Base CordiBot buttons */
.cordibot-btn {
    border-radius: 10px;
    padding: 6px 12px;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
    font-size: 0.9rem;
    cursor: pointer;
}


/* FAQs button - outlined green */
.cordibot-btn.faqs {
    background-color: transparent;
    color: var(--green1);
    border: 1px solid var(--green1);
}


/* Hover for FAQs */
.cordibot-btn.faqs:hover {
    background: var(--gradient-green);
    color: var(--white);
}


/* Live Support button - solid green */
.cordibot-btn.support {
    background-color: transparent;
    color: var(--green1);
    border: 1px solid var(--green1);
}


/* Hover for Live Support */
.cordibot-btn.support:hover {
    background: var(--gradient-green); /* darker green */
    color: var(--white);
}


/* Live support confirmation button */
.live-support-btn {
    background: var(--brown);
    color: var(--white);
    border: none;
    border-radius: 25px;
    padding: 10px 24px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 2px 5px rgba(197, 102, 89, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 auto;
}


.live-support-btn:hover {
    background: var(--gradient-brown);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(197, 102, 89, 0.4);
    color: var(--white); /* Ensure text remains white on hover */
}


.live-support-btn i {
    font-size: 1rem;
    transition: transform 0.2s ease;
}


.live-support-btn:hover i {
    transform: translateX(3px);
    color: var(--white); /* Ensure icon remains white on hover */
}


/* Ensure all elements inside the button remain white on hover */
.live-support-btn:hover * {
    color: var(--white);
}


/* Footer */
.card-footer {
    background-color: var(--white);
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1); /* subtle top shadow */
    border-top: none; /* optional if needed */
    padding: 10px 15px;
}


#user-input {
    border: 1px solid var(--green2);
    border-radius: 8px;
    height: 36px;
    font-size: 14px;
    padding: 8px 12px;
    width: 100%;
    transition: border-color 0.2s ease;
}


#user-input:focus {
    outline: none;
    border-color: var(--green1);
    box-shadow: 0 0 0 2px rgba(33, 161, 121, 0.2);
}


.card-footer button {
    background: none;
    border: none;
    padding: 0 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}


/* Icon style */
.card-footer i.bi-send-fill {
    color: var(--brown);
    font-size: 20px;
}


/* Optional hover effect for the icon (keep background none) */
.card-footer button:hover i.bi-send {
    opacity: 0.8;
}


.card-footer button:hover {
    transform: scale(1.05);
}




/* FAQs Buttons */
.faqs-options {
    background-color: transparent;
    color: var(--green1);
    border: 1px solid var(--green1);
    border-radius: 10px;
    padding: 6px 12px;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
    font-size: 0.9rem;
    cursor: pointer;
}


.faqs-options:hover {
    background: var(--gradient-green);
    color: var(--white);
}


/* FAQ Accordion Styles */
.topic-title {
    font-weight: 600;
    font-size: 1.5;
    color: var(--green1);
    margin-bottom: 10px;
}


.faq-accordion {
    width: 100%;
}


.faq-item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    margin-bottom: 8px;
}


.faq-question {
    display: flex;
    align-items: center;
    color: var(--brown);
    font-weight: 500;
    padding: 8px 0;
    cursor: pointer;
    transition: all 0.2s ease;
}


.faq-question:hover {
    color: var(--green2);
}


.faq-icon {
    margin-right: 8px;
    transition: transform 0.3s ease;
}


.faq-icon.active {
    transform: rotate(180deg);
}


.faq-answer {
    display: none;
    padding: 0 0 10px 24px;
    color: var(--black);
    line-height: 1.4;
    font-size: 0.9rem;
}


/* Helpful message styling */
.helpful-message {
    font-style: italic;
    color: var(--green2);
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px dashed rgba(33, 161, 121, 0.3);
    text-align: center;
    font-size: 0.9rem;
}


#chatbot-ui, #live-support-ui {
  transition: all 0.3s ease-in-out;
}


/* Live Support Input Field */
#live-support-input {
  border: 1px solid var(--green2);
  border-radius: 8px;
  height: 36px;
  font-size: 14px;
  padding: 8px 12px;
  width: 100%;
  transition: border-color 0.2s ease;
}


#live-support-input:focus {
  outline: none;
  border-color: var(--green1);
  box-shadow: 0 0 0 2px rgba(33, 161, 121, 0.2);
}


/* Floating animation for cordibot icon */
@keyframes floating {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}


/* Speech bubble styling */
.speech-bubble {
  position: absolute;
  top: -45px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(228, 241, 234, 0.5); /* var(--mint) with 50% opacity */
  color: var(--green1);
  font-weight: 500;
  padding: 6px 15px;
  border-radius: 20px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
  font-size: 0.9rem;
  z-index: 1001;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease-in-out, visibility 0.6s ease-in-out, transform 0.6s ease-in-out;
  transform: translateX(-50%) translateY(10px);
}


.speech-bubble.show {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}


.speech-bubble::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 10px 8px 0;
  border-style: solid;
  border-color: rgba(228, 241, 234, 0.5) transparent transparent transparent; /* Match the bubble color */
}


.speech-bubble::before {
  content: '';
  position: absolute;
  bottom: -13px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 12px 10px 0;
  border-style: solid;
  border-color: rgba(228, 241, 234, 0.6) transparent transparent transparent; /* Slightly darker for shadow effect */
  z-index: -1;
}


/* Typing indicator */
.typing {
    display: flex;
    align-items: center;
}


.typing span {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin: 0 2px;
    background-color: var(--green2);
    border-radius: 50%;
    opacity: 0.6;
    animation: typingBounce 1.4s infinite ease-in-out both;
}


.typing span:nth-child(1) {
    animation-delay: -0.32s;
}


.typing span:nth-child(2) {
    animation-delay: -0.16s;
}


@keyframes typingBounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}



