.big-huda-chat-root {
  --big-huda-accent: #111111;
  position: fixed;
  z-index: 999999;
  bottom: 24px;
  font-family: inherit;
  line-height: 1.5;
}

.big-huda-chat-root.is-right {
  right: 24px;
}

.big-huda-chat-root.is-left {
  left: 24px;
}

.big-huda-launcher {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: var(--big-huda-accent);
  color: #fff;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.2);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.big-huda-launcher:hover,
.big-huda-launcher:focus-visible,
.big-huda-send:hover,
.big-huda-send:focus-visible,
.big-huda-contact-form button:hover,
.big-huda-contact-form button:focus-visible {
  filter: brightness(1.12);
}

.big-huda-launcher-icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  color: var(--big-huda-accent);
}

.big-huda-panel {
  position: absolute;
  bottom: 66px;
  width: min(390px, calc(100vw - 32px));
  height: min(650px, calc(100vh - 120px));
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 20px;
  background: #fff;
  color: #111;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
}

.big-huda-chat-root.is-right .big-huda-panel {
  right: 0;
}

.big-huda-chat-root.is-left .big-huda-panel {
  left: 0;
}

.big-huda-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 14px 18px;
  background: var(--big-huda-accent);
  color: #fff;
}

.big-huda-header div {
  display: grid;
  gap: 2px;
}

.big-huda-header strong {
  font-size: 16px;
}

.big-huda-header span {
  font-size: 12px;
  opacity: 0.78;
}

.big-huda-close {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}

.big-huda-messages {
  height: calc(100% - 142px);
  overflow-y: auto;
  padding: 18px;
  background: #f6f6f6;
}

.big-huda-message {
  display: flex;
  margin-bottom: 12px;
}

.big-huda-message.is-user {
  justify-content: flex-end;
}

.big-huda-message.is-assistant {
  justify-content: flex-start;
}

.big-huda-bubble {
  max-width: 84%;
  padding: 11px 14px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.big-huda-message.is-user .big-huda-bubble {
  background: var(--big-huda-accent);
  color: #fff;
  border-end-end-radius: 5px;
}

.big-huda-message.is-assistant .big-huda-bubble {
  border-end-start-radius: 5px;
}

.big-huda-message.is-error .big-huda-bubble {
  border: 1px solid #d63638;
  color: #8a1f20;
}

.big-huda-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  min-height: 70px;
  padding: 12px;
  border-top: 1px solid #e5e5e5;
  background: #fff;
}

.big-huda-form textarea {
  width: 100%;
  min-height: 44px;
  max-height: 120px;
  resize: none;
  padding: 10px 12px;
  border: 1px solid #d7d7d7;
  border-radius: 12px;
  color: #111;
  background: #fff;
  font: inherit;
}

.big-huda-form textarea:focus {
  outline: 2px solid color-mix(in srgb, var(--big-huda-accent) 28%, transparent);
  outline-offset: 1px;
  border-color: var(--big-huda-accent);
}

.big-huda-send,
.big-huda-contact-form button {
  border: 0;
  border-radius: 12px;
  padding: 0 16px;
  background: var(--big-huda-accent);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.big-huda-send:disabled,
.big-huda-contact-form button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.big-huda-contact {
  position: absolute;
  right: 12px;
  left: 12px;
  bottom: 82px;
  z-index: 2;
}

.big-huda-contact-card {
  padding: 14px;
  border: 1px solid #ddd;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
}

.big-huda-contact-card p {
  margin: 6px 0 12px;
  font-size: 13px;
  color: #555;
}

.big-huda-contact-form {
  display: grid;
  gap: 8px;
}

.big-huda-contact-form input {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #d7d7d7;
  border-radius: 10px;
  font: inherit;
}

.big-huda-contact-form button {
  min-height: 42px;
}

.big-huda-contact-error {
  color: #b32d2e;
}

.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 520px) {
  .big-huda-chat-root {
    right: 16px !important;
    left: 16px !important;
    bottom: 16px;
  }

  .big-huda-launcher {
    margin-inline-start: auto;
  }

  .big-huda-chat-root.is-left .big-huda-launcher {
    margin-inline-start: 0;
  }

  .big-huda-panel {
    right: 0 !important;
    left: 0 !important;
    width: 100%;
    height: min(680px, calc(100vh - 96px));
    bottom: 64px;
  }

  .big-huda-launcher-label {
    display: none;
  }

  .big-huda-launcher {
    width: 54px;
    padding: 0;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .big-huda-chat-root * {
    scroll-behavior: auto !important;
  }
}
