/* Salam business assistant — scoped widget (does not style page body) */
html.salam-b2b-chatbot-scroll-lock,
html.salam-b2b-chatbot-scroll-lock body {
  overflow: hidden;
  overscroll-behavior: none;
}

.salam-b2b-chatbot-root {
  --salam-chat-z: 99999;
  font-family: "Plus Jakarta Sans", "Codec Pro", "Codec Pro", "Noto Sans", sans-serif;
}

.salam-b2b-chatbot-root *,
.salam-b2b-chatbot-root *::before,
.salam-b2b-chatbot-root *::after {
  box-sizing: border-box;
}

.salam-b2b-chatbot-launcher {
  position: fixed;
  right: max(22px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  touch-action: manipulation;
  z-index: calc(var(--salam-chat-z) - 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 180px;
  height: 48px;
  padding: 0 28px;
  border: 1px solid #003b34;
  border-radius: 10px;
  background: #003b34;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.salam-b2b-chatbot-launcher:hover {
  background: #fff;
  color: #003b34;
  transform: translateY(-1px);
}

.salam-b2b-chatbot-launcher[hidden] {
  display: none !important;
}

.salam-b2b-chatbot-panel {
  position: fixed;
  right: max(22px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  width: min(531px, calc(100vw - 44px));
  height: min(573px, calc(100dvh - 36px));
  max-width: calc(100vw - 44px);
  max-height: calc(100dvh - 36px);
  overscroll-behavior: contain;
  border-radius: 20px;
  overflow: hidden;
  z-index: var(--salam-chat-z);
  background:
    radial-gradient(ellipse 42% 30% at 20% 12%, rgba(176, 208, 166, 0.95) 0%, rgba(176, 208, 166, 0) 100%),
    radial-gradient(ellipse 45% 32% at 88% 10%, rgba(41, 66, 53, 0.95) 0%, rgba(41, 66, 53, 0) 100%),
    radial-gradient(ellipse 30% 22% at 50% 22%, rgba(86, 150, 78, 0.55) 0%, rgba(86, 150, 78, 0) 100%),
    radial-gradient(ellipse 70% 14% at 55% 67%, rgba(142, 166, 144, 0.9) 0%, rgba(142, 166, 144, 0) 100%),
    radial-gradient(ellipse 38% 26% at 58% 96%, rgba(55, 80, 70, 0.95) 0%, rgba(55, 80, 70, 0) 100%),
    radial-gradient(ellipse 18% 45% at 100% 88%, rgba(126, 143, 134, 0.9) 0%, rgba(126, 143, 134, 0) 100%),
    linear-gradient(180deg, #8db383 0%, #77a06e 22%, #5c7f52 42%, #6c8a68 55%, #889e91 66%, #728f8b 76%, #4c7574 86%, #4b7571 100%);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(30px) scale(0.96);
  transform-origin: bottom right;
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

.salam-b2b-chatbot-panel.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.salam-b2b-chatbot-close {
  position: absolute;
  top: max(15px, env(safe-area-inset-top));
  right: max(17px, env(safe-area-inset-right));
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #5fe46f;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  transition: transform 0.2s ease;
}

.salam-b2b-chatbot-close:hover {
  transform: rotate(90deg);
}

.salam-b2b-chatbot-close svg {
  width: 10px;
  height: 10px;
}

.salam-b2b-chatbot-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 48px 16px 16px;
}

.salam-b2b-chatbot-logo {
  flex-shrink: 0;
  width: 115px;
  height: 115px;
  margin: 0 auto;
}

.salam-b2b-chatbot-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.salam-b2b-chatbot-title {
  margin: 49px auto 0;
  color: #fff;
  text-align: center;
  font-size: 28px;
  line-height: 32px;
  font-weight: 600;
}

.salam-b2b-chatbot-description {
  margin: 7px auto 0;
  color: #fff;
  text-align: center;
  font-size: 14.5px;
  line-height: 20px;
  font-weight: 400;
}

.salam-b2b-chatbot-messages {
  flex: 1;
  min-height: 0;
  margin: 16px 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.salam-b2b-chatbot-messages::-webkit-scrollbar {
  width: 4px;
}

.salam-b2b-chatbot-messages::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 10px;
}

.salam-b2b-chatbot-message {
  max-width: 78%;
  padding: 9px 14px;
  border-radius: 18px;
  font-size: 13px;
  line-height: 1.4;
}

.salam-b2b-chatbot-message--bot {
  align-self: flex-start;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.salam-b2b-chatbot-message--user {
  align-self: flex-end;
  color: #0a1f14;
  background: #fff;
}

.salam-b2b-chatbot-message--typing {
  opacity: 0.75;
  font-style: italic;
}

.salam-b2b-chatbot-input:disabled,
.salam-b2b-chatbot-send:disabled,
.salam-b2b-chatbot-service:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.salam-b2b-chatbot-services {
  flex-shrink: 0;
  display: flex;
  gap: 9px;
  margin-bottom: 20px;
  overflow-x: auto;
  scrollbar-width: none;
}

.salam-b2b-chatbot-services::-webkit-scrollbar {
  display: none;
}

.salam-b2b-chatbot-service {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 11px 0 9px;
  border: 0;
  border-radius: 18px;
  background: #fff;
  color: #000a00;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.salam-b2b-chatbot-service:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.salam-b2b-chatbot-service svg,
.salam-b2b-chatbot-service-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  object-fit: contain;
}

.salam-b2b-chatbot-input-wrap {
  flex-shrink: 0;
  position: relative;
  width: 100%;
  height: 56px;
  border: 1px solid rgba(220, 245, 240, 0.45);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.08);
}

.salam-b2b-chatbot-input-wrap:focus-within {
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.12);
}

.salam-b2b-chatbot-input {
  width: 100%;
  height: 100%;
  padding: 0 64px 0 24px;
  border: 0;
  outline: none;
  background: transparent;
  appearance: none;
  color: #fff;
  font-family: inherit;
  font-size: 12.5px;
}

.salam-b2b-chatbot-input::placeholder {
  color: rgba(255, 255, 255, 0.85);
}

.salam-b2b-chatbot-send {
  position: absolute;
  right: 7px;
  top: 7px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #0e2a20;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.salam-b2b-chatbot-send:hover {
  transform: scale(1.05);
}

.salam-b2b-chatbot-send svg {
  width: 20px;
  height: 20px;
}

@media (max-width: 900px) {
  .salam-b2b-chatbot-panel {
    width: min(531px, calc(100vw - 32px));
    right: max(16px, env(safe-area-inset-right));
    left: auto;
  }
}

@media (max-width: 600px) {
  .salam-b2b-chatbot-launcher {
    right: max(10px, env(safe-area-inset-right));
    bottom: max(10px, env(safe-area-inset-bottom));
    min-width: 160px;
    height: 44px;
    font-size: 14px;
  }

  .salam-b2b-chatbot-panel {
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    width: 100%;
    max-width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    transform-origin: bottom center;
  }

  .salam-b2b-chatbot-panel.is-open {
    transform: translateY(0) scale(1);
  }

  .salam-b2b-chatbot-content {
    padding: max(40px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right))
      max(14px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  }

  .salam-b2b-chatbot-logo {
    width: 90px;
    height: 90px;
  }

  .salam-b2b-chatbot-title {
    margin-top: 28px;
    font-size: 23px;
    line-height: 28px;
  }

  .salam-b2b-chatbot-description {
    max-width: 330px;
    font-size: 13px;
    line-height: 19px;
  }

  .salam-b2b-chatbot-description .salam-b2b-chatbot-br-desktop {
    display: none;
  }

  .salam-b2b-chatbot-services {
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
  }

  .salam-b2b-chatbot-input-wrap {
    height: 52px;
  }

  .salam-b2b-chatbot-input {
    font-size: 16px;
  }

  .salam-b2b-chatbot-input::placeholder {
    font-size: 13px;
  }

  .salam-b2b-chatbot-message {
    max-width: 88%;
    font-size: 14px;
  }

  .salam-b2b-chatbot-service {
    min-height: 44px;
    font-size: 12px;
  }

  .salam-b2b-chatbot-send {
    top: 5px;
    right: 5px;
  }
}

@media (max-height: 610px) {
  .salam-b2b-chatbot-content {
    padding-top: 32px;
  }

  .salam-b2b-chatbot-logo {
    width: 72px;
    height: 72px;
  }

  .salam-b2b-chatbot-title {
    margin-top: 16px;
  }
}

@media (max-height: 460px) {
  .salam-b2b-chatbot-logo {
    display: none;
  }

  .salam-b2b-chatbot-title {
    margin-top: 0;
    font-size: 20px;
    line-height: 25px;
  }
}
