:root {
  --chatbot-dark: #09262e;
  --chatbot-med: #009381;
  --chatbot-white: #fff;
}
#soltanik-chatbot-root {
  font-family: inherit;
}
#soltanik-chatbot-root * {
  box-sizing: border-box;
}
#chatbot-toggle {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--chatbot-dark);
  color: var(--chatbot-white);
  border: none;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  box-shadow: 0 4px 16px rgba(9, 38, 46, 0.18);
  font-size: 28px;
  cursor: pointer;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, box-shadow 0.2s;
  outline: none;
}
#chatbot-toggle:hover {
  background: var(--chatbot-med);
  box-shadow: 0 6px 24px rgba(0, 147, 129, 0.18);
}
#chatbot-label {
  position: fixed;
  bottom: 100px;
  right: 40px;
  background: var(--chatbot-dark);
  color: var(--chatbot-white);
  border-radius: 24px;
  padding: 10px 22px 10px 18px;
  font-size: 16px;
  font-weight: 500;
  box-shadow: 0 4px 16px rgba(9, 38, 46, 0.12);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 99999;
  cursor: pointer;
  animation: chatbot-label-fadein 1.2s;
  transition: opacity 0.3s, transform 0.3s;
}
@keyframes chatbot-label-fadein {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.9);
  }
  60% {
    opacity: 1;
    transform: translateY(-5px) scale(1.05);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
#chatbot-label .chatbot-label-icon {
  display: inline-block;
  animation: chatbot-icon-bounce 1.2s infinite alternate;
}
@keyframes chatbot-icon-bounce {
  0% {
    transform: scale(1);
  }
  60% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}
#chatbot-widget {
  position: fixed;
  bottom: 100px;
  right: 30px;
  width: 340px;
  max-width: 95vw;
  background: var(--chatbot-white);
  border-radius: 18px;
  box-shadow: 0 8px 32px rgba(9, 38, 46, 0.18);
  display: none;
  flex-direction: column;
  z-index: 99999;
  overflow: hidden;
  font-family: inherit;
  border: 1.5px solid var(--chatbot-med);
  animation: chatbot-widget-fadein 0.4s;
}
@keyframes chatbot-widget-fadein {
  0% {
    opacity: 0;
    transform: scale(0.95);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}
#chatbot-header {
  background: var(--chatbot-med);
  color: var(--chatbot-white);
  padding: 12px 18px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 18px;
  letter-spacing: 0.5px;
}
#chatbot-close {
  background: none;
  border: none;
  color: var(--chatbot-white);
  font-size: 22px;
  cursor: pointer;
  transition: color 0.2s;
  padding: 0 4px;
}
#chatbot-close:hover {
  color: var(--chatbot-dark);
}
#chatbot-messages {
  padding: 18px 16px 12px 16px;
  height: 240px;
  overflow-y: auto;
  background: #f8f9fa;
  font-size: 15px;
  border-bottom: 1px solid #e0e0e0;
}
.chatbot-msg {
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
}
.chatbot-msg.user {
  align-items: flex-end;
}
.chatbot-msg.bot {
  align-items: flex-start;
}
.chatbot-bubble {
  padding: 9px 16px;
  border-radius: 16px 16px 16px 4px;
  max-width: 80%;
  background: #e9ecef;
  color: #222;
  margin-bottom: 2px;
  word-break: break-word;
  box-shadow: 0 2px 8px rgba(9, 38, 46, 0.06);
  font-size: 15px;
}
.chatbot-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  margin-right: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.chatbot-msg.bot {
  flex-direction: row;
  align-items: flex-start;
}
.chatbot-msg.bot .chatbot-bubble {
  margin-left: 0;
}
.chatbot-msg.user {
  align-items: flex-end;
  flex-direction: row-reverse;
}
.chatbot-msg.user .chatbot-bubble {
  margin-right: 0;
}

/* Typing indicator */
.chatbot-typing {
  display: flex;
  align-items: center;
  gap: 8px;
}
.chatbot-typing .dots {
  width: 40px;
  display: flex;
  gap: 4px;
}
.chatbot-typing .dot {
  width: 8px;
  height: 8px;
  background: #cfd8dc;
  border-radius: 50%;
  opacity: 0.6;
  transform: translateY(0);
  animation: chatbot-dot 1s infinite;
}
.chatbot-typing .dot:nth-child(2) {
  animation-delay: 0.15s;
}
.chatbot-typing .dot:nth-child(3) {
  animation-delay: 0.3s;
}
@keyframes chatbot-dot {
  0% {
    transform: translateY(0);
    opacity: 0.3;
  }
  50% {
    transform: translateY(-6px);
    opacity: 1;
  }
  100% {
    transform: translateY(0);
    opacity: 0.3;
  }
}

/* Suggestions box */
#chatbot-starters {
  padding: 10px 12px;
  border-top: 1px solid #f0f0f0;
}
.chatbot-starters-header {
  display: flex;
  align-items: center;
  justify-content: space-between; /* ensure title on left and close button on right */
  gap: 12px;
  margin-bottom: 8px;
}
.chatbot-starters-close {
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.06);
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  color: var(--chatbot-dark);

  /* Add this 👇 */
  margin-left: 90px;
  display: flex; /* keep flex so auto works */
}

.chatbot-starters-close:hover {
  background: rgba(0, 0, 0, 0.03);
}
.chatbot-starters-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chatbot-starters-open {
  width: 100%;
  background: transparent;
  border: none;
  padding: 8px 12px;
  cursor: pointer;
  color: var(--chatbot-med);
  font-weight: 600;
}
.chatbot-msg.user .chatbot-bubble {
  background: var(--chatbot-med);
  color: var(--chatbot-white);
  align-self: flex-end;
  border-radius: 16px 16px 4px 16px;
}
#chatbot-input-area {
  display: flex;
  border-top: 1px solid #eee;
  background: var(--chatbot-white);
  padding: 8px 10px;
}
#chatbot-starters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px;
  background: transparent;
  border-bottom: 1px solid #f0f0f0;
}
.chatbot-starter-btn {
  background: #f1f6f5;
  color: var(--chatbot-dark);
  border: 1px solid rgba(0, 0, 0, 0.04);
  padding: 6px 10px;
  border-radius: 14px;
  font-size: 13px;
  cursor: pointer;
}
.chatbot-starter-btn:hover {
  background: #e6f6f2;
}
#chatbot-input {
  flex: 1;
  border: none;
  padding: 10px 12px;
  font-size: 15px;
  outline: none;
  background: var(--chatbot-white);
  border-radius: 8px;
  margin-right: 8px;
  border: 1px solid #e0e0e0;
  transition: border 0.2s;
}
#chatbot-input:focus {
  border: 1.5px solid var(--chatbot-med);
}
#chatbot-send {
  background: var(--chatbot-med);
  color: var(--chatbot-white);
  border: none;
  padding: 0 20px;
  font-size: 16px;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.2s;
  font-weight: 500;
  letter-spacing: 0.5px;
}
#chatbot-send:hover {
  background: var(--chatbot-dark);
}

/* Mobile Responsive Styles */
@media (max-width: 600px) {
  #chatbot-widget {
    right: 0;
    left: 0;
    bottom: 0;
    width: 100vw;
    max-width: 100vw;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -2px 24px rgba(9, 38, 46, 0.12);
    border-width: 1px 0 0 0;
  }
  .chatbot-starters-close {
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.06);
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    color: var(--chatbot-dark);

    /* Add this 👇 */
    margin-left: 10px;
    display: flex; /* keep flex so auto works */
  }
  /* When the widget is opened on mobile, make it a full-screen sheet for better UX */
  #chatbot-widget[aria-hidden="false"] {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    border-radius: 0;
    box-shadow: none;
    display: flex; /* ensure flex layout remains */
  }
  #chatbot-header {
    padding: 14px 10px;
    font-size: 16px;
  }
  #chatbot-messages {
    padding: 12px 6px 8px 6px;
    /* Fit messages to remaining viewport height (header + starters + input area) */
    height: calc(100vh - 56px - 56px - 12px);
    font-size: 14px;
  }
  #chatbot-input-area {
    padding: 6px 4px;
  }
  #chatbot-input {
    font-size: 14px;
    padding: 8px 8px;
    margin-right: 4px;
  }
  #chatbot-send {
    font-size: 14px;
    padding: 0 12px;
  }
  #chatbot-label {
    right: 16px;
    bottom: 80px;
    font-size: 14px;
    padding: 8px 16px 8px 12px;
    border-radius: 18px;
    gap: 6px;
  }
  #chatbot-toggle {
    right: 16px;
    bottom: 16px;
    width: 48px;
    height: 48px;
    font-size: 22px;
    /* Hide the floating toggle on mobile since the widget becomes a full-screen sheet */
    display: none;
  }
  .chatbot-bubble {
    font-size: 14px;
    padding: 7px 10px;
    max-width: 90vw;
  }
}

/* Small accessibility helpers */
#chatbot-label[aria-hidden="true"],
#chatbot-toggle[aria-hidden="true"] {
  display: none;
}

/* About section styles (modern, uses brand colors) */
.about-area {
  background: var(--chatbot-med); /* brand medium color */
  color: #ffffff;
  padding: 64px 0;
  position: relative;
  overflow: hidden;
}
.about-content h2 {
  color: #ffffff;
  font-size: 32px;
  margin-bottom: 12px;
  letter-spacing: 0.6px;
}
.about-content .lead {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.95);
  font-weight: 600;
}
.about-content p {
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.7;
}
.about-features {
  list-style: none;
  padding: 0;
  margin: 12px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.about-features li {
  padding-left: 18px;
  position: relative;
  color: #09262e;
}
.about-features li:before {
  content: "\2713";
  position: absolute;
  left: 0;
  top: 0;
  color: #009381;
  font-weight: 700;
}
.about-img {
  position: relative;
}
.about-img {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.about-img .main-img {
  width: 100%;
  max-width: 520px;
  height: auto;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
  border: 6px solid rgba(255, 255, 255, 0.06);
  transform: translateY(-6px);
}
.about-img-2 {
  position: absolute;
  right: -10px;
  bottom: -10px;
  width: 220px;
  height: 160px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  transform: rotate(-4deg);
  border: 4px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.04));
}
.about-img .secondary-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.98) contrast(1.02) brightness(0.98);
}

/* Floating animation for images to give a subtle, organic motion */
@keyframes soltanik-float {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
  100% {
    transform: translateY(0);
  }
}

/* Apply float to the portrait and clinic images with slight differences */
.about-left-img,
.about-right-img,
.about-img .main-img,
.about-img .secondary-img,
.about-images-grid .image-card img {
  will-change: transform;
  transform-origin: center center;
  animation: soltanik-float 6s ease-in-out infinite;
  cursor: zoom-in; /* signal clickable */
}
.about-right-img,
.about-images-grid .image-card:nth-child(2) img {
  animation-duration: 6.8s; /* slightly out of phase */
  animation-delay: 0.6s;
}

/* Lightbox overlay styles (simple, lightweight) */
.image-lightbox {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.85);
  z-index: 110000; /* above chatbot */
  padding: 24px;
}
.image-lightbox.open {
  display: flex;
}
.image-lightbox .lightbox-img {
  max-width: 1180px;
  max-height: 92vh;
  width: auto;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  object-fit: contain;
}
.image-lightbox .lightbox-close {
  position: absolute;
  top: 18px;
  right: 24px;
  background: transparent;
  color: #ffffff;
  border: none;
  font-size: 28px;
  cursor: pointer;
}
.image-lightbox .lightbox-caption {
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 14px;
  text-align: center;
}

/* Accessibility: focus styles for close button */
.image-lightbox .lightbox-close:focus {
  outline: 2px solid rgba(255, 255, 255, 0.9);
  outline-offset: 4px;
}

/* New equal-size two-image grid for About section */
.about-images-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: stretch;
}
.about-images-grid .image-card {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.02),
    rgba(0, 0, 0, 0.03)
  );
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
  transition: transform 0.36s ease, box-shadow 0.36s ease;
}
.about-images-grid .image-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease, filter 0.36s ease;
}
.about-images-grid .image-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 26px 54px rgba(0, 0, 0, 0.18);
}
.about-images-grid .image-card:hover img {
  transform: scale(1.04);
  filter: saturate(1.06) contrast(1.04);
}
.about-images-grid .card-accent {
  position: absolute;
  left: 12px;
  top: 12px;
  width: 56px;
  height: 56px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(6px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

/* CTA wrapper separation to stand out from image area */
.about-cta-wrapper {
  background: rgba(0, 0, 0, 0.06);
  padding: 12px 14px;
  border-radius: 10px;
  display: inline-block;
  margin-bottom: 8px;
}
.about-hours {
  color: rgba(255, 255, 255, 0.9);
  margin-left: 10px;
  font-weight: 500;
}
.about-phone {
  color: rgba(255, 255, 255, 0.95);
  font-weight: 600;
}

.about-features li:before {
  content: "\2713";
  position: absolute;
  left: 0;
  top: 0;
  color: #ffffff;
  font-weight: 700;
}

.about-features li {
  padding-left: 20px;
  color: rgba(255, 255, 255, 0.95);
}

@media (max-width: 768px) {
  /* On small screens show the secondary image as a stacked block under the portrait
     instead of the absolute layered version used on desktop. This prevents clipping/hiding. */
  .about-img-2 {
    display: block !important;
    position: relative !important;
    right: auto !important;
    bottom: auto !important;
    width: 100% !important;
    height: auto !important;
    transform: none !important;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.14);
    border: 4px solid rgba(255, 255, 255, 0.06);
    margin-top: 12px;
    background: transparent;
  }
  .about-img-2 img,
  .about-img-2 .secondary-img {
    width: 100% !important;
    height: auto !important;
    object-fit: cover;
  }
  /* Ensure the primary portrait matches the secondary image size and styling on mobile */
  .about-img {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }
  .about-img .main-img {
    max-width: none !important;
    width: 100% !important;
    height: auto !important;
    object-fit: cover !important;
    transform: none !important;
    border-radius: 12px !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.14) !important;
    border: 4px solid rgba(255, 255, 255, 0.06) !important;
  }
  .about-img .secondary-img {
    border-radius: 12px !important;
  }
  .about-content h2 {
    font-size: 22px;
  }
}
