/* ─────────  DESIGN TOKENS  ───────── */
:root {
  /* brand */
  --c-primary: #3c4bff;
  --c-primary-dark: #2c39c9;
  --c-primary-light: #eef0ff;

  /* greys */
  --c-bg: #ffffff;
  --c-bg-alt: #f7f8fc;
  --c-border: #e4e6ef;
  --c-text: #1f1f29;
  --c-text-light: #5e6278;

  /* semantics */
  --c-success: #3bb54a;
  --radius-s: .5rem;
  --radius-l: 1rem;

  /* elevation */
  --shadow-s: 0 1px 3px rgba(16,24,40,.08);
  --shadow-m: 0 4px 16px rgba(16,24,40,.14);

  /* motion */
  --dur: .24s;
  --bez: cubic-bezier(.4,.0,.2,1);

  /* type scale (fluid) */
  --fs-100: clamp(.78rem, .74rem + .21vw, .88rem);
  --fs-200: clamp(.9rem,  .86rem + .24vw, 1rem);
  --fs-300: clamp(1rem,   .94rem + .28vw, 1.15rem);
  --fs-400: clamp(1.125rem,1.05rem + .32vw,1.3rem);
}

/* ─────────  WRAPPER & BUBBLE  ───────── */
#estatify-chatbot-wrapper {
  position: fixed;
  inset: auto 1.25rem 1.25rem auto;
  z-index: 99999;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

#estatify-chatbot-bubble {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--c-primary);
  color: #fff;
  font-size: 1.35rem;
  box-shadow: var(--shadow-m);
  cursor: pointer;
  transition: transform var(--dur) var(--bez), box-shadow var(--dur) var(--bez);
}

#estatify-chatbot-bubble:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .2);
}

/* ─────────  CONTAINER  ───────── */
#estatify-chatbot-container {
  width: min(90vw, 370px)!important;
  height: clamp(24rem, 70vh, 640px)!important;
  display: flex;
  flex-direction: column;
  background: var(--c-bg);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-m);
  overflow: hidden;
  color: var(--c-text);
  font-size: var(--fs-200);
  display: none;
  animation: fadeIn var(--dur) var(--bez);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

#estatify-chatbot-container.fullscreen {
  inset: 0!important;
  width: 100vw;
  height: 100vh;
  border-radius: 0;
}

/* ─────────  HEADER  ───────── */
.estatify-chatbot-header {
  display: flex!important;
  align-items: center!important;
  justify-content: space-between!important;
  background: var(--e-global-color-7f4d796)!important;
  color: #fff!important;
  padding: .75rem 1rem!important;
}

.estatify-chatbot-title {
  font-weight: 600;
  font-size: var(--fs-300);
}

.estatify-chatbot-header-icons {
  display: flex;
  gap: .75rem;
  font-size: 1.1rem;
}

.estatify-chatbot-header-icons span {
  cursor: pointer;
  transition: opacity var(--dur);
}

.estatify-chatbot-header-icons span:hover {
  opacity: .75;
}

/* ─────────  BODY & LOG  ───────── */
.estatify-chatbot-body {
  flex: 1!important;
  display: flex!important;
  flex-direction: column!important;
  padding: 0px!important;
  gap: .75rem!important;
  padding-bottom: 70px !important;
  position: relative;
}

.estatify-chatbot-log {
  flex: 1;
  background: var(--c-bg-alt)!important;
  border: 0px solid var(--c-border)!important;
  padding: .8rem;
  overflow-y: auto;
  scroll-behavior: smooth!important;
  border-radius: var(--radius-s)!important;
}

.estatify-chatbot-log::-webkit-scrollbar {
  width: .5rem!important;
}

.estatify-chatbot-log::-webkit-scrollbar-thumb {
  background: var(--c-border)!important;
  border-radius: 1rem!important;
}

.chat-bubble {
  margin-block: .5rem!important;
  max-width: 82%!important;
  padding: .65rem .9rem!important;
  border-radius: var(--radius-s)!important;
  line-height: 1.4!important;
  background: #fff!important;
  box-shadow: var(--shadow-s)!important;
}

.assistant-bubble {
  background: var(--c-bg)!important;
  color: var(--c-text)!important;
  margin-right: auto!important;
  width: fit-content;
}

.user-bubble {
  background: var(--c-primary-light)!important;
  color: var(--c-text)!important;
  margin-left: auto!important;
  text-align: right!important;
  width: fit-content;
}

.estatify-chatbot-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 0;
  border-top: 1px solid #ccc;
  background-color: #ffffff;
  display: flex;
  align-items: center;
  z-index: 155;
}

.estatify-chatbot-input-wrap.estatify-chatbot-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 0;
  border-top: 1px solid #ccc;
  background-color: #ffffff;
  display: flex;
  align-items: center;
  z-index: 155;
}

.estatify-chatbot-input {
  padding: 1rem!important;
  border: 0px!important;
}

.estatify-chatbot-send-btn {
  padding: 15px;
  margin: 10px;
}

/* ─────────  INPUT AREA  ───────── */
.estatify-chatbot-input-wrap {
  display: flex;
  gap: .6rem;
}

.estatify-chatbot-input {
  flex: 1;
  padding: 1rem;
  font-size: var(--fs-200);
  border: 0px solid var(--c-border);
  border-radius: var(--radius-s);
  background: var(--c-bg);
  color: var(--c-text);
  transition: border-color var(--dur);
}

.estatify-chatbot-input:focus {
  outline: none;
  border-color: none;
}

.estatify-chatbot-send-btn {
  padding: .6rem 1rem;
  border: none;
  border-radius: var(--radius-s);
  background: var(--c-primary);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--dur) var(--bez), transform var(--dur) var(--bez);
}

.estatify-chatbot-send-btn:hover {
  background: var(--c-primary-dark);
  transform: translateY(-1px);
}

/* ─────────  PROPERTY SLIDER (Final Polish) ───────── */
.estatify-prop-block {
  padding: 0.5rem;
  margin-right: auto; /* Align left like assistant bubble */
  /* Allow it to be wider than standard bubbles, up to a max width */
  width: 95%; /* Use a percentage width relative to the chat log */
  max-width: 450px; /* Optional: Set a max-width if needed */
  margin-left: 0; /* Ensure no unintended left margin */
  box-sizing: border-box; /* Include padding in width calculation */
}

.slider-wrapper {
  position: relative;
  margin-inline: auto; /* Center the wrapper within the block */
  padding: 0; /* Remove padding, arrows will overlap */
  width: 100%; /* Wrapper takes full width of the block */
}

.property-slider {
  overflow: visible; 
}

.property-slide {
  padding: 0.75rem; 
  text-align: center;
  background-color: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-l); 
  margin: 0 8px; 
  box-shadow: var(--shadow-s); 
}

/* Title Styling */
.property-slide .prop-title {
  font-weight: 600; 
  font-size: 1.05em; 
  margin-bottom: 0.75rem;
  color: var(--c-text);
  text-align: center; 
  min-height: 2.4em; 
  line-height: 1.2em;
}

/* Media Figure */
.property-slide .prop-media {
  position: relative; 
  margin-bottom: 0.75rem;
  overflow: hidden; 
  border-radius: var(--radius-s); 
}

.property-slide img {
  display: block; 
  width: 100%;
  height: 220px; /* Increased image height */
  object-fit: cover;
  border-radius: var(--radius-s);
}

/* Badges Styling */
.property-slide .prop-badges {
  position: absolute;
  bottom: 8px;
  left: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.property-slide .prop-badges span {
  background-color: rgba(0, 0, 0, 0.65);
  color: #fff;
  padding: 5px 9px;
  border-radius: var(--radius-s);
  font-size: 0.8em;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.property-slide .prop-badges span i {
  font-size: 1em;
}

/* Meta Info Styling */
.property-slide .prop-meta {
  list-style: none;
  padding: 0 0.25rem;
  margin: 0 0 1rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95em;
  color: var(--c-text-light);
}

.property-slide .prop-meta li {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* CTA Button Styling */
.property-slide .prop-cta {
  display: block;
  width: 100%;
  padding: 0.85rem 1rem;
  background-color: #f56a45;
  color: #fff;
  text-align: center;
  text-decoration: none;
  border: none;
  border-radius: var(--radius-s);
  font-weight: 600;
  transition: background-color 0.2s ease;
}

.property-slide .prop-cta:hover {
  background-color: #e05a3a;
  color: #fff;
}

/* Arrow Styling */
.slider-arrow {
  position: absolute;
  top: calc(50% - 30px); 
  transform: translateY(-50%);
  z-index: 10;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-s);
  border: none;
  background: #f56a45;
  color: #fff;
  font-size: 1rem;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: var(--shadow-m);
  transition: background 0.2s ease, transform 0.2s ease;
}

.slider-arrow:hover {
  background: #e05a3a;
  transform: translateY(-50%) scale(1.08);
}

.slider-arrow.arrow-prev {
  left: -10px;
}

.slider-arrow.arrow-next {
  right: -10px;
}

/* Slick dots adjustments */
.slick-dots {
  bottom: -35px; /* Increased bottom margin (was -20px) */
  position: relative; /* Ensure it respects the flow */
}

/* Add margin below the entire slider block */
.estatify-prop-block {
    margin-bottom: 30px; /* Ensure space below the dots */
}

/* ─────────  WELCOME AREA  ───────── */
.welcome-area {
  padding: 2rem;
  text-align: center;
  background: var(--c-bg-alt);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-m);
}

.welcome-area h1 {
  font-size: var(--fs-300);
  margin-bottom: 1rem;
}

.welcome-area p {
  font-size: var(--fs-200);
  color: var(--c-text-light);
}

/* ─────────  FOOTER  ───────── */
.estatify-chatbot-footer-text {
  padding: 1rem;
  background: var(--c-bg-alt);
  border-top: 1px solid var(--c-border);
  font-size: var(--fs-100);
  text-align: center;
}

.estatify-chatbot-footer-text a {
  color: var(--c-primary);
  font-weight: 600;
  text-decoration: none;
}

.estatify-chatbot-footer-text a:hover {
  text-decoration: underline;
}

/* Ensure Slick dots are styled if enabled */
.slick-dots {
    bottom: -20px; /* Adjust position */
}

.slick-dots li button:before {
    font-size: 10px; /* Adjust dot size */
    color: var(--c-primary); /* Match theme */
}

.slick-dots li.slick-active button:before {
    color: var(--c-primary-dark); /* Active dot color */
}

/* Quick reply buttons */
.quick-replies-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  width: 100%;
}

.quick-reply-btn {
  background-color: var(--primary-color-light);
  border: 1px solid var(--primary-color);
  border-radius: 16px;
  color: var(--text-color);
  cursor: pointer;
  font-size: 13px !important;
  padding: 6px 12px;
  transition: all 0.2s ease;
  white-space: nowrap;
  width: auto;
  display: inline-block;
  background-color: var(--c-bg);
  border: 1px solid var(--c-border);
  color: var(--c-text-light);
  padding: 4px 10px;
  margin: 3px;
}

.quick-reply-btn:hover {
  background-color: var(--primary-color);
  color: var(--bg-color);
  background-color: var(--c-primary-light);
  border-color: var(--c-primary-dark);
  color: var(--c-primary-dark);
}
