/* Leline • Lela v2. Conversation-first, mobile-first; all rules scoped to widget. */
#lela-chat {
  --lela-plum:#905c73;
  --lela-plum-dark:#76465e;
  --lela-text:#342d34;
  --lela-soft:#faf2f5;
  --lela-line:#eadde3;
  position:fixed;
  z-index:1100;
  right:20px;
  bottom:175px;
  font-family:"Noto Sans Georgian","DM Sans",system-ui,sans-serif;
  color:var(--lela-text);
}
#lela-chat,
#lela-chat * { box-sizing:border-box; }
#lela-chat button,
#lela-chat input { font-family:inherit; }
#lela-chat a { text-decoration:none; }

#lela-chat .lela-launcher {
  position:relative;
  display:grid;
  place-items:center;
  width:62px;height:62px;
  border:2px solid #fff;border-radius:50%;
  padding:2px;
  background:linear-gradient(145deg,#f6e4eb,#fff);
  box-shadow:0 8px 28px rgba(56,31,44,.22);
  cursor:pointer;
  transition:transform .18s ease,box-shadow .18s ease;
}
#lela-chat .lela-launcher:hover { transform:translateY(-3px);box-shadow:0 12px 30px rgba(56,31,44,.24); }
#lela-chat .lela-launcher img { display:block;width:100%;height:100%;object-fit:cover;object-position:center top;border-radius:50%; }
#lela-chat .lela-launcher-status {
  position:absolute;right:2px;bottom:1px;
  width:14px;height:14px;
  background:#39a17e;border:2px solid #fff;border-radius:50%;
}
#lela-chat.is-open .lela-launcher { visibility:hidden;pointer-events:none; }

#lela-chat .lela-panel {
  position:absolute;right:0;bottom:72px;
  display:flex;flex-direction:column;
  width:min(394px,calc(100vw - 24px));
  height:min(620px,calc(100dvh - 210px));
  min-height:320px;
  overflow:hidden;
  background:#fff;border:1px solid var(--lela-line);border-radius:21px;
  box-shadow:0 16px 55px rgba(50,30,39,.23);
}
#lela-chat .lela-panel[hidden] { display:none !important; }
#lela-chat.is-open .lela-panel { bottom:0; }

#lela-chat .lela-header {
  display:flex;align-items:center;gap:10px;
  flex:0 0 auto;
  padding:12px 13px;
  background:#fcf7f9;
  border-bottom:1px solid var(--lela-line);
}
#lela-chat .lela-portrait { position:relative;flex:none;width:43px;height:43px; }
#lela-chat .lela-portrait img { display:block;width:43px;height:43px;object-fit:cover;border-radius:50%;background:#f3dfe7; }
#lela-chat .lela-portrait::after { content:"";position:absolute;right:0;bottom:0;width:11px;height:11px;border-radius:50%;background:#39a17e;border:2px solid white; }
#lela-chat .lela-header-info { display:flex;flex-direction:column;gap:2px;flex:1;min-width:0; }
#lela-chat .lela-header-info strong { font-size:16px;font-weight:700;line-height:1.35;letter-spacing:0; }
#lela-chat .lela-header-info span { color:#786d75;font-size:10.5px;line-height:1.35;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
#lela-chat .lela-header-book {
  flex:none;display:inline-flex;align-items:center;justify-content:center;
  min-height:36px;padding:6px 11px;
  color:var(--lela-plum-dark);border:1px solid #e5ced8;
  background:white;border-radius:12px;
  font-size:11px;font-weight:650;white-space:nowrap;
}
#lela-chat .lela-close {
  flex:none;display:grid;place-items:center;
  width:40px;height:40px;border:0;border-radius:12px;
  background:transparent;color:#675b64;cursor:pointer;
}
#lela-chat .lela-close:hover { background:#f3e7ec; }
#lela-chat .lela-scroll {
  display:flex;flex:1 1 0;flex-direction:column;gap:12px;
  min-height:0;overflow-y:auto;overscroll-behavior:contain;
  padding:17px 14px 18px;background:#fff;
  scrollbar-color:#e4cbd4 transparent;
}
#lela-chat .lela-message {
  width:fit-content;max-width:92%;
  padding:11px 13px;border-radius:16px;
  font-size:13.5px;line-height:1.6;font-weight:400;
  white-space:pre-wrap;overflow-wrap:anywhere;
}
#lela-chat .lela-assistant { align-self:flex-start;background:var(--lela-soft);border-bottom-left-radius:5px; }
#lela-chat .lela-user { align-self:flex-end;background:var(--lela-plum);color:white;border-bottom-right-radius:5px; }
#lela-chat .lela-welcome { max-width:100%; }
#lela-chat .lela-typing { color:#76616e;font-size:12px; }
#lela-chat .lela-suggestions { display:flex;flex-wrap:wrap;gap:7px;max-width:100%; }
#lela-chat .lela-suggestions[hidden] { display:none !important; }
#lela-chat .lela-suggestions button {
  display:inline-flex;align-items:center;justify-content:center;
  max-width:100%;min-height:37px;padding:8px 12px;
  border:1px solid #e4cbd5;border-radius:19px;background:white;color:var(--lela-plum-dark);
  font-size:11.5px;font-weight:500;line-height:1.45;text-align:center;cursor:pointer;
}
#lela-chat .lela-suggestions button:hover { background:#faf1f5; }
#lela-chat .lela-suggestions button:disabled { opacity:.55;cursor:wait; }
#lela-chat .lela-cards { display:flex;flex-direction:column;gap:8px;width:100%; }
#lela-chat .lela-service-card {
  display:flex;align-items:center;gap:9px;justify-content:space-between;
  padding:11px;border:1px solid var(--lela-line);border-radius:13px;background:#fff;
}
#lela-chat .lela-service-card > div { min-width:0;flex:1; }
#lela-chat .lela-service-card strong { display:block;font-size:12px;line-height:1.4;color:var(--lela-text); }
#lela-chat .lela-service-card small { display:block;margin-top:5px;font-size:10.5px;color:#756a73; }
#lela-chat .lela-service-card a { display:inline-flex;align-items:center;justify-content:center;flex:none;min-height:37px;padding:8px 10px;background:var(--lela-plum);border-radius:10px;color:white;font-size:11px; }

#lela-chat .lela-bottom {
  flex:0 0 auto;
  padding:10px 13px 11px;
  background:#fff;border-top:1px solid #f0e7eb;
}
#lela-chat .lela-disclosure { margin:0 0 8px;color:#7e747d;font-size:10px;line-height:1.45; }
#lela-chat .lela-form {
  display:grid;grid-template-columns:minmax(0,1fr) 46px;gap:8px;align-items:center;
  width:100%;min-width:0;margin:0;padding:0;
}
#lela-chat .lela-form label[hidden] { display:none !important; }
#lela-chat .lela-form input[type="text"] {
  display:block;min-width:0;width:100%;max-width:none;height:46px;min-height:46px;
  margin:0;padding:9px 13px;
  color:var(--lela-text);background:#fff;border:1px solid #dbd0d7;border-radius:13px;
  font-size:16px;line-height:1.25;
}
#lela-chat .lela-form input[type="text"]::placeholder { color:#a399a2;opacity:1; }
#lela-chat .lela-form input[type="text"]:focus { outline:2px solid #bd8da4;outline-offset:0;border-color:#bd8da4; }
#lela-chat .lela-send {
  display:grid;place-items:center;
  width:46px;height:46px;min-width:46px;min-height:46px;
  border:0;border-radius:13px;padding:0;
  background:var(--lela-plum);color:white;cursor:pointer;
}
#lela-chat .lela-send:disabled { opacity:.55;cursor:wait; }
#lela-chat .lela-actions { display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);gap:8px;align-items:stretch;margin-top:9px; }
#lela-chat .lela-booking-cta {
  display:flex;align-items:center;justify-content:center;gap:6px;
  min-height:39px;padding:8px 11px;
  background:#f7ebf0;border:1px solid #eedce4;border-radius:12px;
  color:var(--lela-plum-dark);font-size:11.5px;font-weight:700;line-height:1.35;text-align:center;
}
#lela-chat .lela-booking-cta span { font-size:15px; }
#lela-chat .lela-human-link {
  display:flex;align-items:center;justify-content:center;
  min-height:39px;padding:7px 8px;
  border:1px solid #e6dde1;border-radius:12px;
  color:#65545e;background:#fff;font-size:11px;font-weight:600;line-height:1.4;text-align:center;
}
#lela-chat .lela-utilities { display:flex;align-items:flex-start;justify-content:space-between;gap:8px;margin-top:9px; }
#lela-chat .lela-privacy-settings { min-width:0;flex:1;color:#796d75;font-size:10.5px;line-height:1.45; }
#lela-chat .lela-privacy-settings summary { display:inline-flex;align-items:center;gap:4px;cursor:pointer;list-style:none;padding:3px 0; }
#lela-chat .lela-privacy-settings summary::-webkit-details-marker { display:none; }
#lela-chat .lela-privacy-settings summary::before { content:"⌄";font-size:14px;line-height:1;color:var(--lela-plum); }
#lela-chat .lela-privacy-settings[open] summary::before { transform:rotate(180deg); }
#lela-chat .lela-privacy-content { margin:7px 0 0;padding:10px;border-radius:10px;background:#faf6f8; }
#lela-chat .lela-privacy-content > a { display:inline-block;margin-top:6px;color:var(--lela-plum-dark);font-size:10.5px; }
#lela-chat .lela-consent { display:flex;align-items:flex-start;gap:8px;margin:0;color:#655961;font-size:11px;line-height:1.5; }
#lela-chat .lela-consent input[type="checkbox"] { flex:none;width:17px;height:17px;min-width:17px;margin:1px 0 0;accent-color:var(--lela-plum); }
#lela-chat #lela-clear { flex:none;padding:3px 0;margin:0;background:none;border:0;color:#82747c;font-size:10.5px;line-height:1.45;white-space:nowrap;cursor:pointer; }
#lela-chat button:focus-visible,
#lela-chat a:focus-visible,
#lela-chat summary:focus-visible { outline:2px solid #bc839e;outline-offset:3px; }

@media(max-width:700px) {
  body.lela-chat-open { overflow:hidden; }
  body.lela-chat-open .mobile-booking-bar,
  body.lela-chat-open .floating-contact { visibility:hidden;pointer-events:none; }
  #lela-chat { right:14px;bottom:calc(95px + env(safe-area-inset-bottom)); }
  #lela-chat.is-open {
    position:fixed;
    inset:var(--lela-vv-top,0px) 0 auto 0;
    width:100vw;
    height:var(--lela-vv-height,100dvh);
    background:rgba(39,25,34,.15);
    border-radius:0;
  }
  #lela-chat.is-open .lela-panel {
    position:absolute;inset:8px 0 0 0;
    display:flex;
    width:100%;height:calc(100% - 8px);
    max-height:none;min-height:0;
    border:0;border-radius:22px 22px 0 0;
    box-shadow:0 -10px 38px rgba(47,30,39,.15);
  }
  #lela-chat .lela-header { padding:10px 14px; }
  #lela-chat .lela-scroll { padding:15px 16px 18px;gap:11px; }
  #lela-chat .lela-message { font-size:13.5px; }
  #lela-chat .lela-bottom { padding:9px 14px calc(10px + env(safe-area-inset-bottom)); }
  #lela-chat .lela-disclosure { font-size:9.5px; }
  #lela-chat .lela-form { grid-template-columns:minmax(0,1fr) 47px; }
  #lela-chat .lela-form input[type="text"],
  #lela-chat .lela-send { height:47px;min-height:47px; }
  #lela-chat .lela-send { width:47px;min-width:47px; }
  #lela-chat .lela-actions { margin-top:8px; }
  /* During text entry, reserve the visible viewport for messages and composer.
     The quick booking action remains available in the header. */
  #lela-chat.is-open.has-keyboard .lela-actions,
  #lela-chat.is-open.has-keyboard .lela-utilities,
  #lela-chat.is-open.has-keyboard .lela-disclosure { display:none; }
  #lela-chat.is-open.has-keyboard .lela-bottom { padding-top:8px;padding-bottom:8px; }
}
@media(max-width:350px) {
  #lela-chat .lela-header-info span { font-size:9.5px; }
  #lela-chat .lela-header-book { padding:6px 8px; }
  #lela-chat .lela-scroll { padding-inline:11px; }
  #lela-chat .lela-bottom { padding-inline:10px; }
  #lela-chat .lela-actions { grid-template-columns:1fr 1fr; }
}
@media(max-height:470px) and (max-width:700px) {
  #lela-chat .lela-header { padding-top:6px;padding-bottom:6px; }
  #lela-chat .lela-header-book { min-height:31px; }
  #lela-chat .lela-bottom { padding-top:6px;padding-bottom:6px; }
  #lela-chat .lela-actions { margin-top:5px; }
  #lela-chat .lela-booking-cta,
  #lela-chat .lela-human-link { min-height:31px; }
  #lela-chat .lela-disclosure { margin-bottom:5px; }
}
@media(prefers-reduced-motion:reduce) {
  #lela-chat .lela-launcher { transition:none; }
}

/* A soft, once-per-session inactivity hint. Never fakes unread messages. */
#lela-chat .lela-idle-nudge {
  position:absolute;right:0;bottom:79px;
  width:min(265px,calc(100vw - 28px));
  display:flex;flex-direction:column;gap:10px;
  padding:13px 14px 12px;
  background:#fff;border:1px solid #e8d5de;border-radius:17px;
  box-shadow:0 9px 32px rgba(59,32,44,.16);
  font-size:12px;line-height:1.5;color:#44343d;
}
#lela-chat .lela-idle-nudge[hidden] { display:none !important; }
#lela-chat .lela-idle-nudge::after {
  content:"";position:absolute;right:22px;bottom:-6px;
  width:10px;height:10px;background:#fff;
  border-right:1px solid #e8d5de;border-bottom:1px solid #e8d5de;
  transform:rotate(45deg);
}
#lela-chat .lela-idle-nudge-copy { font-size:12px;line-height:1.5;font-weight:600; }
#lela-chat .lela-idle-nudge-actions { display:flex;justify-content:space-between;align-items:center;gap:8px; }
#lela-chat .lela-nudge-ask {
  min-height:34px;padding:7px 13px;
  border:1px solid #dfc3d0;border-radius:10px;
  background:#f8ecf2;color:#76465e;
  font-size:11px;font-weight:700;cursor:pointer;
}
#lela-chat .lela-nudge-dismiss {
  display:grid;place-items:center;flex:0 0 auto;
  width:34px;height:34px;padding:0;border:0;border-radius:9px;
  background:transparent;color:#897781;font-size:20px;cursor:pointer;
}
#lela-chat .lela-nudge-ask:focus-visible,
#lela-chat .lela-nudge-dismiss:focus-visible { outline:2px solid #ad7991;outline-offset:2px; }
@keyframes lela-idle-halo {
  0%,100% { box-shadow:0 8px 28px rgba(56,31,44,.22),0 0 0 0 rgba(154,97,120,0); }
  40% { box-shadow:0 8px 28px rgba(56,31,44,.22),0 0 0 9px rgba(154,97,120,.14); }
}
#lela-chat.lela-idle-notice .lela-launcher { animation:lela-idle-halo 1.6s ease-in-out 2; }
@media (max-width:700px) {
  #lela-chat .lela-idle-nudge { bottom:78px; }
}
@media (prefers-reduced-motion:reduce) {
  #lela-chat.lela-idle-notice .lela-launcher { animation:none; }
}
