/* ==========================================================================
   L&L Cleaners — chat assistant widget styles
   Loaded on every page. Uses the site's existing CSS variables so it matches
   the brand automatically in light and dark mode.
   ========================================================================== */

.llchat-btn {
  position: fixed;
  right: 20px;
  bottom: 84px; /* sits above the mobile call bar */
  z-index: 999;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: var(--brand, #145049);
  color: var(--text-on-brand, #F7F4EE);
  box-shadow: 0 6px 18px rgba(15, 42, 40, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .15s ease, background .15s ease;
}
.llchat-btn:hover { transform: scale(1.06); background: var(--brand-2, #1F6F63); }
.llchat-btn svg { width: 28px; height: 28px; }
.llchat-btn .llchat-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent, #E86A33);
  border: 2px solid var(--surface, #fff);
}
@media (min-width: 761px) {
  .llchat-btn { bottom: 24px; }
}

.llchat-panel {
  position: fixed;
  right: 20px;
  bottom: 152px;
  z-index: 1000;
  width: min(340px, calc(100vw - 40px));
  height: min(520px, calc(100vh - 190px));
  display: none;
  flex-direction: column;
  background: var(--surface, #fff);
  color: var(--text, #2B2622);
  border: 1px solid var(--border, #CFC8B7);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(15, 42, 40, 0.3);
  font-family: "Work Sans", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}
.llchat-panel.open { display: flex; }
@media (min-width: 761px) {
  .llchat-panel { bottom: 96px; }
}

.llchat-head {
  background: var(--brand, #145049);
  color: var(--text-on-brand, #F7F4EE);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.llchat-head .llchat-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(247, 244, 238, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.llchat-head .llchat-avatar svg { width: 20px; height: 20px; }
.llchat-head-txt { line-height: 1.25; min-width: 0; }
.llchat-head-txt strong { display: block; font-size: .95rem; }
.llchat-head-txt span { font-size: .74rem; opacity: .85; }
.llchat-close {
  margin-left: auto;
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  line-height: 0;
}
.llchat-close:hover { background: rgba(247, 244, 238, 0.15); }
.llchat-close svg { width: 18px; height: 18px; }

.llchat-log {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg, #F7F4EE);
}
.llchat-msg {
  max-width: 85%;
  padding: 9px 12px;
  border-radius: 14px;
  font-size: .86rem;
  line-height: 1.45;
  white-space: pre-line;
  overflow-wrap: break-word;
}
.llchat-msg.bot {
  align-self: flex-start;
  background: var(--surface, #fff);
  border: 1px solid var(--border, #CFC8B7);
  border-bottom-left-radius: 4px;
}
.llchat-msg.user {
  align-self: flex-end;
  background: var(--brand, #145049);
  color: var(--text-on-brand, #F7F4EE);
  border-bottom-right-radius: 4px;
}
.llchat-msg a { color: var(--accent-dark, #C24E1F); font-weight: 600; }
.llchat-msg.bot .llchat-typing {
  display: inline-block;
  animation: llchat-blink 1s infinite;
}
@keyframes llchat-blink { 50% { opacity: .3; } }

.llchat-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 14px 10px;
  background: var(--bg, #F7F4EE);
}
.llchat-quick button {
  border: 1px solid var(--brand, #145049);
  color: var(--brand, #145049);
  background: var(--surface, #fff);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.llchat-quick button:hover {
  background: var(--brand, #145049);
  color: var(--text-on-brand, #F7F4EE);
}

.llchat-inputrow {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid var(--border, #CFC8B7);
  background: var(--surface, #fff);
}
.llchat-inputrow input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--border, #CFC8B7);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: .88rem;
  font-family: inherit;
  background: var(--bg, #F7F4EE);
  color: var(--text, #2B2622);
}
.llchat-inputrow input:focus {
  outline: 2px solid var(--brand-2, #1F6F63);
  outline-offset: 1px;
}
.llchat-send {
  border: none;
  border-radius: 10px;
  background: var(--accent, #E86A33);
  color: #fff;
  width: 42px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.llchat-send:hover { background: var(--accent-dark, #C24E1F); }
.llchat-send svg { width: 18px; height: 18px; }

@media print { .llchat-btn, .llchat-panel { display: none !important; } }
