/* ── Site chatbot ── */
.sl-chatbot {
  position: fixed;
  right: 20px;
  bottom: 24px;
  z-index: 950;
  font-family: 'DM Sans', system-ui, sans-serif;
}

.sl-chatbot--open .sl-chatbot-fab {
  opacity: 0.92;
}

.sl-chatbot-fab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--dark-green, #1a5c38), #0f3d24);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(26, 92, 56, 0.45);
  transition: transform 0.2s, box-shadow 0.2s;
}

.sl-chatbot-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(26, 92, 56, 0.5);
}

.sl-chatbot-fab i {
  font-size: 18px;
}

.sl-chatbot-panel {
  position: absolute;
  right: 0;
  bottom: 58px;
  width: min(380px, calc(100vw - 24px));
  max-height: min(560px, calc(100vh - 120px));
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(0, 0, 0, 0.08);
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.sl-chatbot-panel.is-open {
  display: flex;
}

.sl-chatbot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #1a5c38, #0f3d24);
  color: #fff;
}

.sl-chatbot-header-text strong {
  display: block;
  font-size: 15px;
}

.sl-chatbot-header-text span {
  font-size: 12px;
  opacity: 0.9;
}

.sl-chatbot-close {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
}

.sl-chatbot-close:hover {
  background: rgba(255, 255, 255, 0.28);
}

.sl-chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 200px;
  max-height: 280px;
  background: #f6f8f6;
}

.sl-chatbot-msg {
  max-width: 92%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.sl-chatbot-msg--bot {
  align-self: flex-start;
  background: #fff;
  border: 1px solid #e2e8e2;
  color: #1a2e1a;
  border-bottom-left-radius: 4px;
}

.sl-chatbot-msg--user {
  align-self: flex-end;
  background: #1a5c38;
  color: #fff;
  border-bottom-right-radius: 4px;
}

.sl-chatbot-msg--typing {
  opacity: 0.7;
  font-style: italic;
}

.sl-chatbot-projects {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.sl-chatbot-project {
  display: flex;
  gap: 10px;
  padding: 10px;
  background: #fff;
  border: 1px solid #dce5dc;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.sl-chatbot-project:hover {
  border-color: #1a5c38;
  box-shadow: 0 4px 14px rgba(26, 92, 56, 0.12);
}

.sl-chatbot-project img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  background: #e8efe8;
}

.sl-chatbot-project-body {
  min-width: 0;
  flex: 1;
}

.sl-chatbot-project-body strong {
  display: block;
  font-size: 14px;
  color: #0f3d24;
}

.sl-chatbot-project-body em {
  display: block;
  font-size: 11px;
  font-style: normal;
  color: #1a5c38;
  margin-top: 2px;
}

.sl-chatbot-project-body span {
  display: block;
  font-size: 12px;
  color: #5a6b5a;
  margin-top: 4px;
}

.sl-chatbot-project-price {
  font-size: 13px;
  font-weight: 600;
  color: #1a5c38;
  margin-top: 4px;
}

.sl-chatbot-lead {
  padding: 12px 14px 14px;
  border-top: 1px solid #e8ece8;
  background: #fff;
}

.sl-chatbot-lead-step label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #1a3d28;
  margin-bottom: 8px;
}

.sl-chatbot-lead-step input[type='text'],
.sl-chatbot-lead-step input[type='tel'] {
  width: 100%;
  padding: 11px 12px;
  border: 1.5px solid #d0ddd0;
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
}

.sl-chatbot-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sl-chatbot-chips button {
  padding: 8px 12px;
  border: 1.5px solid #c5d5c5;
  border-radius: 999px;
  background: #f4f8f4;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}

.sl-chatbot-chips button:hover,
.sl-chatbot-chips button.is-selected {
  border-color: #1a5c38;
  background: #e8f5e9;
  color: #0f3d24;
}

.sl-chatbot-submit-lead {
  margin-top: 10px;
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: #1a5c38;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.sl-chatbot-compose {
  border-top: 1px solid #e8ece8;
  background: #fff;
}

.sl-chatbot-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 12px 0;
}

.sl-chatbot-suggestions button {
  padding: 6px 10px;
  font-size: 12px;
  border: 1px solid #c5d5c5;
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  font-family: inherit;
  color: #1a5c38;
}

.sl-chatbot-form {
  display: flex;
  gap: 8px;
  padding: 10px 12px 12px;
}

.sl-chatbot-form input[type='text'] {
  flex: 1;
  padding: 10px 12px;
  border: 1.5px solid #d0ddd0;
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
}

.sl-chatbot-form button[type='submit'] {
  width: 44px;
  border: none;
  border-radius: 10px;
  background: #1a5c38;
  color: #fff;
  cursor: pointer;
}

@media (max-width: 520px) {
  .sl-chatbot {
    right: max(12px, env(safe-area-inset-right, 0px));
    bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  }

  .sl-chatbot-fab-label {
    display: none;
  }

  .sl-chatbot-fab {
    width: 52px;
    height: 52px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
  }

  .sl-chatbot-panel {
    width: calc(100vw - 24px);
    max-height: calc(100vh - 100px);
  }
}
