[data-zamia-chat-open][hidden] { display: none !important; }

/* Empty on desktop/floating. Mobile inline space exists before scripts run. */
.bionika-chat-slot { display: none; }

.bionika-chat-launcher {
  position: fixed;
  right: max(24px, env(safe-area-inset-right));
  bottom: calc(24px + env(safe-area-inset-bottom));
  z-index: 1250;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 48px;
  min-height: 52px;
  padding: 13px 20px;
  border: 1px solid #0f766e;
  border-radius: 999px;
  /* Matches the existing Booking Page Brand color, not a new widget setting. */
  background: #0f766e;
  color: #fff;
  box-shadow: 0 6px 20px rgb(18 56 59 / 16%);
  font: 600 15px/1.4 Inter, 'Noto Sans Georgian', system-ui, sans-serif;
  cursor: pointer;
  touch-action: manipulation;
}

.bionika-chat-launcher svg { width: 24px; height: 24px; flex: none; }
.bionika-chat-launcher:hover { background: #115e59; }
.bionika-chat-launcher:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
  box-shadow: 0 0 0 7px #082529;
}

body:has(.service-sticky.is-visible) .bionika-chat-launcher {
  bottom: calc(108px + env(safe-area-inset-bottom));
}

/* Keep the existing back-to-top control, clear of chat and the booking dock. */
body:has(.bionika-chat-launcher:not([hidden])) .scroll-to-top {
  right: auto;
  left: max(24px, env(safe-area-inset-left));
  bottom: calc(24px + env(safe-area-inset-bottom));
}
body:has(.bionika-chat-launcher:not([hidden])):has(.service-sticky.is-visible) .scroll-to-top {
  bottom: calc(108px + env(safe-area-inset-bottom));
}

/* Do not override hidden: only Zamia decides whether chat is available. */
body:has(.marketing-consent:not([hidden])) .bionika-chat-launcher,
body:has(.contact-modal-backdrop.active) .bionika-chat-launcher,
body:has(.service-chat-options.visible, .floating-chat-options.visible, .sticky-chat-options.visible, .location-popup.visible) .bionika-chat-launcher,
body.service-sheet-open .bionika-chat-launcher,
body.service-menu-open .bionika-chat-launcher,
body.menu-open .bionika-chat-launcher {
  visibility: hidden;
}

@media (max-width: 700px) {
  .bionika-chat-launcher {
    right: max(16px, env(safe-area-inset-right));
    min-height: 48px;
    padding: 11px 16px;
    font-size: 14px;
  }
  .bionika-chat-slot--inline:not([data-bionika-chat-state="unavailable"]) {
    display: flex;
    box-sizing: border-box;
    min-height: 68px;
    padding-block: 10px;
  }
  .service-hero__actions .bionika-chat-slot--inline {
    min-height: 48px;
    padding: 0;
  }
  body:has(.service-sticky.is-visible) .bionika-chat-slot { display: none; }
  .bionika-chat-launcher--inline {
    position: static;
    width: 100%;
    margin: 0;
  }
}

/* At the end of a page, all footer text must scroll above both floating rows. */
body.homepage #home-sticky-cta.is-visible + footer.footer,
body:has(.service-sticky.is-visible) .service-footer {
  padding-bottom: calc(180px + env(safe-area-inset-bottom));
}

/* Homepage only: a stable title column, with the real chat button below Call.
   Availability never changes content geometry; desktop/services stay unchanged. */
@media (max-width: 700px) {
  body.homepage .bionika-chat-slot { display: none; }
  body.homepage .hero-panel-actions { position: relative; }
  body.homepage .hero-conversion-title {
    padding-inline-end: 72px;
    min-height: 52px;
  }
  body.homepage .bionika-chat-launcher {
    box-sizing: border-box;
    width: 52px;
    height: 52px;
    min-width: 52px;
    min-height: 52px;
    padding: 0;
    gap: 0;
    border-radius: 50%;
  }
  body.homepage .hero-panel-actions > .bionika-chat-launcher--inline {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    bottom: auto;
    margin: 0;
  }
  body.homepage .bionika-chat-launcher [data-bionika-chat-label] {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

/* Keep the status plus Maps/Call row inside very narrow home screens. */
@media (max-width: 350px) {
  body.homepage .hero-eyebrow { font-size: .68rem; }
}
