@import url('https://fonts.googleapis.com/css2?family=Archivo:ital,wght@0,100..900;1,100..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap');

* {
  font-family: 'Inter', sans-serif;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  display: flex;
  flex-direction: column;
}

#chatClose:hover{
    cursor: pointer;
}

h1 {
  color: white;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 20px;
  margin: 0;
  /* font-weight: bold; */
}

#banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: white;
  height: 50px;
  padding: 0 10px;
  border-bottom: 1px solid #ccc;
}

#contentWrapper {
  display: flex;
  flex-direction: column;
  height: 100%;
}

#webchat {
  flex: 1;
  overflow: hidden;
}

/* System Alerts Banner Styles */
.system-alerts-banner {
  background-color: #fef3c7;
  padding: 8px 16px;
  position: relative;
  z-index: 1000;
}

.alert-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 100%;
}

.alert-message {
  color: #92400e;
  font-size: 14px;
  font-weight: 500;
  flex: 1;
  margin-right: 8px;
  line-height: 1.4;
}

footer {
  color: #6b7280; /* Tailwind gray-500 for softer tone */
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  text-align: left; /* Match screenshot alignment */
  padding: 8px 10px 10px 10px;
  background-color: transparent; /* Remove gray background */
}

footer a {
  color: #2563eb; /* Tailwind blue-600 */
  text-decoration: underline;
}


footer a:hover {
  color: #1d4ed8; /* Tailwind blue-700 */
  text-decoration: underline;
}

.addressChoice:hover {
  cursor: pointer;
  background-color: bisque;
}

.choice {
  padding: 10px;
  cursor: pointer;
}

.choice:hover {
  background-color: #f0f0f0;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
      transform: scale(1.05);
    }
    100% {
      transform: scale(1);
    }
}

#headerLoginButton {
  padding: 0.5rem 0.75rem;              /* py-2 px-3 */
  background-color: #000000;           /* bg-black */
  border-radius: 0.75rem;             /* rounded-md */
  border: 1px solid #E4E4E7;           /* outline-Input */
  outline-offset: -1px;                /* outline-offset-[-1px] */
  display: inline-flex;                /* inline-flex */
  justify-content: center;
  align-items: center;
  color: white;                        /* text-white */
  font-weight: 500;                    /* font-medium */
  text-align: center;
  margin-right: 10px;
  cursor: pointer;
  border-width: 1px;
}

#headerLoginButton:hover {
  background-color: black;
  color: white;
  cursor: pointer;
  border: 1px solid black;
  /* box-shadow: 0 6px 8px rgba(0, 0, 0, 0.2); */
}

.chat-close-btn {
  background: transparent;
  border: none;
  padding: 0;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.chat-close-btn svg {
  display: block;
}

/* Additional CSS */
.active-button {
  background-color: #575757 !important;
  border: 1px solid #575757 !important;
  color: white !important;
}

button.active-button span.address-icon,
button.active-button span.lot-number-icon {
    filter: brightness(0) invert(1);
}

/* DAISY ChatBot General Styling */
#webchat {
  display: flex;
  flex-direction: column;
  height: 500px; /* Adjust height based on need */
  width: 100%;
  /* max-width: 400px; */
  background: white;
  /* border-radius: 12px; */
  /* box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1); */
  overflow: hidden;
}

/* Chat Messages Container */
.chatbox__messages {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  /* flex-direction: column; */ /* Align messages from top to bottom : use appendChild */
  flex-direction: column-reverse; /* Align messages from bottom to top : use prepend */
  gap: 10px;
  align-items: flex-start; /* Align messages properly */
  flex-grow: 1; /* Allows messages to push up as history grows */
}

/* Welcome Messages Only */
.chatbox__messages.welcome-active {
  justify-content: flex-end; /* Ensures welcome messages appear at the bottom */
}

/* Remove flex-end when messages overflow */
.chatbox__messages:not(.welcome-active) {
  justify-content: flex-start;
}

/* Bot Message */
.messages__item--visitor {
  /* background: #D9D9D9; */
  /* padding: 10px; */
  max-width: 100%;
  align-self: flex-start;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  padding: 0;
  margin-top: 4px;
}

.bot-message {
  background: #ffffff; /* White background */
  color: #111827;       /* Dark text */
  padding: 10px;
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  max-width: 100%;
}

/* User Message */
.messages__item--operator {
  /* background: #D9D9D9; */
  /* padding: 10px; */
  border-radius: 10px;
  max-width: 65%;
  align-self: flex-start;
  display: flex;
  align-items: center;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  margin-top: 16px;
}

.user-message {
  background: #111111; /* Solid black */
  color: #ffffff;
  padding: 10px;
  border-radius: 10px; /* More pill-like */
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  max-width: 100%; /* Only as wide as content - fit-content */
}

/* Chat Input Section */
.chatbox__input {
  display: flex;
  align-items: center;
  background: #ffffff; /* Changed from #D9D9D9 to white */
  border: 1px solid #d1d5db; /* Light border */
  border-radius: 10px;
  margin-left: 10px;
  margin-right: 10px;
  padding: 4px 8px; /* Add inner spacing */
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); /* Add subtle shadow */
  height: 40px; /* Slightly taller for breathing room */
}

/* Input Field */
.chatbox__input input {
  flex: 1;
  padding: 6px 8px; /* Reduced for visual alignment */
  border: none;
  border-radius: 0; /* Remove internal border radius */
  background: transparent;
  outline: none;
  font-size: 14px;
  color: #111827; /* Darker text */
}

/* Send Button */
.chatbox__input button {
  background: none;
  border: none;
  padding: 4px;
  margin-left: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Send Button Icon */
.chatbox__input button svg {
  width: 22px; /* Slightly smaller to match design */
  height: 22px;
  fill: #111111; /* Pure black icon */
  transition: fill 0.3s ease;
}

.chatbox__input.disabled {
    opacity: 0.5;
    pointer-events: none;
    background-color: #f3f4f6; /* Light gray */
}

/* Bot Avatar */
.bot-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

/* Bot Message Group */
.messages__item--visitor {
  display: flex;
  align-items: flex-start;
  max-width: 100%;
}

/* Empty Avatar Space for Alignment */
.empty-avatar {
  width: 36px;
  height: 36px;
  margin-right: 5px;
}

/* Bot Message Bubble */
.message-container {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

/* User Message Bubble */
.messages__item--operator {
  align-self: flex-end;
}

/* DAISY Typing Indicator */
.daisy-typing-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100px;
  height: 30px;
  border-radius: 10px;
  background-color: rgba(217, 217, 217, 1);
  /* box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); */
  position: relative;
  overflow: hidden;
  margin: 10px;
  pointer-events: none;
}

/* Typing dots animation */
.daisy-typing-dots {
  display: flex;
  justify-content: space-between;
  width: 25px;
}

.daisy-typing-dot {
  width: 6px;
  height: 6px;
  background-color: rgba(87, 87, 87, 1);
  border-radius: 50%;
  animation: daisyTypingAnimation 1.5s infinite ease-in-out;
}

/* Add animation delay for each dot */
.daisy-typing-dot:nth-child(1) {
  animation-delay: 0s;
}

.daisy-typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.daisy-typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}

/* Keyframes for typing animation */
@keyframes daisyTypingAnimation {
  0%, 80%, 100% {
      transform: scale(0);
      opacity: 0.3;
  }
  40% {
      transform: scale(1);
      opacity: 1;
  }
}

.messages__item--visitor .message-bubble {
  max-width: 100%; /* Set a fixed max width */
  background-color: #F8F8F8; /* Bot message background */
  color: #333;
  padding: 10px;
  border-radius: 9px;
  font-size: 14px;
  word-wrap: break-word;
}

.messages__item--visitor {
  display: flex;
  align-items: flex-start; /* Ensure messages align properly */
  justify-content: flex-start;
  width: 100%; /* Ensure container spans the width */
}

.message-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
}



/* --- Get Started  Card Container --- */
/* Center Get Started Card within the messages__item */
.messages__item .get-started-card {
  display: flex;
  flex-direction: column;
  align-items: stretch; /* Centers content horizontally --- flex-start */
  justify-content: center; /* Centers content vertically if needed */
  width: 100%; /* Make it span the entire message container */
  padding: 10px;
  border-radius: 10px;
  background: #F8F8F8;
  /* margin-left: 45px; */
  box-sizing: border-box; /* Ensures padding doesn't shrink the width */
}

/* Style the Get Started button */
.get-started-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  align-items: center;
  height: 40px; /* Equivalent to h-10 */
  padding: 8px 16px; /* Equivalent to px-4 py-2 */
  background-color: var(--Primary, #111111); /* fallback to black */
  color: var(--Primary-Foreground, #ffffff);
  border-radius: 10px; /* Equivalent to rounded-md */
  font-weight: 500; /* Equivalent to font-medium */
  text-align: center;
  transition: all 0.3s ease-in-out;
  width: inherit; /* Equivalent to self-stretch */
}

.get-started-btn:hover {
  background-color: #000000; /* Deeper black on hover */
  color: #ffffff; /* Ensure text stays white */
}

/* --- Address Card Container --- */
.address-card {
  /* background: #F8F8F8;
  border-radius: 8px;
  padding: 10px;
  margin-left: 50px;
  width: 255px;
  font-family: Arial, sans-serif; */
  background: #F8F8F8;
  border-radius: 10px;
  padding: 10px;
  /* margin-left: 50px; Align to right if needed */
  width: 100%;  /* Auto-width based on content - was 85% */
  /* height: 75%; */
  max-width: 100%; /* Prevent full width */
}

/* Header & Toggle Buttons */
/* .address-card-header {
  margin-bottom: 2px;
} */

.address-toggle {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  background-color: #f5f5f5; /* Match light background behind tabs */
  border-radius: 12px;
  /* padding: 4px; */
  margin-bottom: 10px;
  width: 70%;
}

.tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: #111827;
  border: none;
  padding: 8px 8px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* .tab:last-child {
  border-radius: 0 8px 8px 0;
} */

.tab.active {
  background: #ffffff;
  color: #111827;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08); /* subtle ring */
}

.tab .icon {
  margin-right: 5px;
}

/* When the .tab has .active, also apply filter to the .icon */
.tab.active .icon {
  filter: brightness(0) invert(1);
}

/* Body & Textareas */
.address-card-body {
  margin-bottom: 8px;
  position: relative;
}

.address-field {
  width: 100%;
  padding: 8px 2px 1px 2px; /* Reduced top padding from 8px */
  border: none;
  border-bottom: 2px solid #575757;
  background: #F8F8F8;
  border-radius: 0;
  /* margin-bottom: 8px; */
  font-size: 14px;
  resize: none;
  outline: none;
}

/* Default style when no address is selected */
.address-field-empty {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  resize: none;
  outline: none;
  background: #ffffff;
  height: 40px;
  color: #111827;
  overflow-y: hidden;
}

/* Style when an address is selected */
.address-field-filled {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  resize: none;
  outline: none;
  background: #ffffff;
  color: #111827;
}

.address-field::placeholder {
  color: #999;
}

/* Choices Container (Auto-Complete) */
/* Dropdown Container */
.choices-container {
  /* Matches the background of your card */
  background: #F8F8F8;
  /* Add a top border to visually separate from input's underline */
  /* Let the container grow with suggestions */
  /* max-height: 150px;
  overflow-y: auto; */
  /* Hide overflow (no scroll) */
  overflow-y: hidden;
  /* Spacing from the input line (optional) */
  margin-top: 0; 
  margin-bottom: 8px; /* space above Submit if desired */
  /* If you need a higher stacking context to appear on top of other elements */
  position: relative; 
  z-index: 9999;
}

/* Individual Suggestion Items */
.choices-container .choice {
  padding: 8px 0;
  /* border-bottom: 1px solid #ddd; */
  cursor: pointer;
  margin: 0 8px; /* Indent suggestions from the left/right if desired */
}

/* Remove the last divider */
.choices-container .choice:last-child {
  border-bottom: none;
}

/* Hover State for Suggestion Items */
.choices-container .choice:hover {
  background: #eaeaea;
}

/* Footer & Submit Button */
.address-card-footer {
  text-align: center;
}

.submit-btn {
  width: 100%;
  height: 40px;
  background: #111111;
  color: #ffffff;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.submit-btn:hover:not(:disabled) {
  background-color: #000000;
}

.submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.disabled-tab {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Wrapper to keep suggestion box fixed */
.suggestion-box-wrapper {
  /* position: relative;
  display: flex;
  justify-content: flex-end; */
  width: 100%;
}

.suggestion-box-old {
  font-size: 14px;
  /* font-weight: bold; */
  position: relative;
  display: block;
  margin: 0 0 0 auto;
  border-radius: 9px;
  border: 1px solid rgb(217, 217, 217);
  /* box-shadow: rgba(0, 0, 0, 0.3) 2px 2px 5px; */
  width: 50%;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
  cursor: pointer;
  position: relative;
  float: right;  /* Align to right */
  min-width: 120px; /* Prevent it from being too small */
  max-width: 200px;
  text-align: center;
  background: #F8F8F8;
  cursor: pointer;
  transition: margin-top 0.3s ease-in-out; /* Smooth animation */
}

/* To not occupy full width - max-width: 80%; margin-left: auto; */
.suggestion-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
  background: white;
  gap: 8px;
  /* ✅ Adds vertical spacing between children */
}

.selected-option-container {
  display: flex;
  /* block-level, full-width flexbox */
  justify-content: flex-end;
  /* aligns content to the right */
  align-items: center;
  /* padding: 8px; */
  width: 100%;
  /* make the container span full width */
  box-sizing: border-box;
}

/* To not occupy full width - max-width: 80%; margin-left: auto; */
.suggestion-box-fq {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  width: 100%;
  margin-top: 8px;
}

.selected-option {
  /* padding: 5px; */
  /* padding: 10px; */
  font-size: 14px;
  text-align: center;
  /* font-weight: bold; */
  letter-spacing: 0;
  color: #FAFAFA;
  background-color: #1D1D1D;
  text-align: center;
  white-space: normal;
  word-wrap: break-word;
  box-sizing: border-box;
  padding: 10px;
  border-radius: 10px;
}

.selected-option-fq {
  font-size: 14px;
  text-align: center;
  /* font-weight: bold; */
  letter-spacing: 0;
  color: #FAFAFA;
  background-color: #1D1D1D;
  text-align: center;
  white-space: normal;
  word-wrap: break-word;
  box-sizing: border-box;
  padding: 10px;
  border-radius: 10px;
}

.options-list-old {
  position: absolute;
  bottom: 100%; /* Moves dropdown above */
  left: 0;
  width: 100%;
  /* background: #F8F8F8; */
  border-radius: 9px;
  display: none;
  z-index: 1000;
  /* border: 1px solid rgb(87, 87, 87); */
  /* box-shadow: rgba(0, 0, 0, 0.3) 2px 2px 5px; */
  padding: 5px 0;
  /* border: 1px solid rgb(87, 87, 87); */
  text-align: left;
  display: none;
  justify-content: space-between;
  align-items: center;
  overflow: hidden;
  transition: opacity 0.3s ease-in-out;
  opacity: 1;
  max-height: fit-content; /* ✅ Ensures it expands based on content */
  overflow: visible; /* ✅ Prevents content from being clipped */
}

.options-list {
  display: flex;
  flex-direction: row;
  gap: 8px;
  width: 100%;
  justify-content: flex-end;
}

.options-list-fq {
  display: flex;
  flex-direction: row;
  gap: 8px;
  width: 100%;
}

/* Individual dropdown options */
.option-old {
  padding: 5px 10px;
  font-size: 14px;
  text-align: left;
  align-items: center;
  cursor: pointer;
  border-bottom: 1px solid #eee;
  width: 100%;
  border: 1px solid rgb(87, 87, 87);
  display: flex;
  justify-content: space-between;
  margin: 5px auto;
  background: white;
  border-radius: 4px;
  margin-bottom: 8px; /* ✅ Space between each option */
  min-height: 40px; /* ✅ Ensures height is enough for content */
}

.option {
  padding: 10px 16px;
  background: white;
  border: 1px solid #E4E4E7;
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 20%;
  white-space: nowrap;        /* Prevent line wrapping */
  overflow: hidden;           /* Hide overflow content */
  text-overflow: ellipsis;    /* Show ellipsis (...) when text overflows */
}

.option-fq {
  padding: 10px 16px;
  background: white;
  border: 1px solid #E4E4E7;
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 60%;
  white-space: nowrap;        /* Prevent line wrapping */
  overflow: hidden;           /* Hide overflow content */
  text-overflow: ellipsis;    /* Show ellipsis (...) when text overflows */
}

.option:hover {
  background: #f0f0f0;
}

.option-fq:hover {
  background: #f0f0f0;
}

.messages__item--visitor, .messages__item--operator {
  display: flex;
  /* align-items: center; */
}

.bot-message, .user-message {
  display: inline-block;  /* Auto-width based on text */
  /* min-width: 50px; */
  word-wrap: break-word;
  /* white-space: pre-wrap;  Ensures text breaks correctly */
  padding: 10px;
  border-radius: 10px;
}

.chat-loading-indicator {
  text-align: center;
  padding: 20px;
  font-weight: bold;
  font-size: 1rem;
  color: #444;
}

.chat-link {
  color: #2563eb;
  font-weight: 500;
  text-decoration: underline;
  transition: color 0.2s ease;
}

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none
}

/* Feedback buttons styling */
.feedback-buttons button {
  transition: all 0.2s ease;
}

.feedback-buttons button:hover {
  transform: scale(1.1);
}

.feedback-buttons button:hover img {
  filter: brightness(0);
}