.guapa-wf-chat {
  position: fixed;
  left: 1.25rem;
  right: auto;
  bottom: 1.25rem;
  z-index: 12040;
  font-family: Alexandria, ui-sans-serif, system-ui, sans-serif;
}

[dir="rtl"] .guapa-wf-chat {
  left: auto;
  right: 1.25rem;
}

/* Keep clear of Jawaba widget on the opposite side when both are open */
body:has(.ai-bot-widget) .guapa-wf-chat {
  bottom: 5.5rem;
}

.guapa-wf-chat__launcher {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.95rem 0.45rem 0.45rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #633479, #4a2659);
  color: #fff;
  box-shadow: 0 12px 32px rgba(74, 38, 89, 0.28);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.guapa-wf-chat__launcher:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(74, 38, 89, 0.34);
}

.guapa-wf-chat__launcher-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.85);
  background: #fff;
}

.guapa-wf-chat__launcher-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.guapa-wf-chat__launcher-label {
  font-size: 0.92rem;
  font-weight: 700;
  padding-inline-end: 0.2rem;
}

.guapa-wf-chat__panel {
  position: absolute;
  left: 0;
  bottom: calc(100% + 0.75rem);
  width: min(380px, calc(100vw - 2rem));
  height: min(640px, calc(100vh - 6.5rem));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 22px;
  background: #fff;
  border: 1px solid #e9e7ef;
  box-shadow: 0 24px 60px rgba(74, 38, 89, 0.22);
}

[dir="rtl"] .guapa-wf-chat__panel {
  left: auto;
  right: 0;
}

.guapa-wf-chat__panel[hidden] {
  display: none !important;
}

.guapa-wf-chat.is-open .guapa-wf-chat__launcher {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.9);
}

.guapa-wf-chat__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 0.95rem;
  background: linear-gradient(180deg, #faf7fd 0%, #fff 100%);
  border-bottom: 1px solid #e9e7ef;
}

.guapa-wf-chat__header-main {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.guapa-wf-chat__header-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: #f5f0f8;
}

.guapa-wf-chat__header-title,
.guapa-wf-chat__header-subtitle {
  display: block;
}

.guapa-wf-chat__header-title {
  font-size: 0.95rem;
  color: #1c1530;
}

.guapa-wf-chat__header-subtitle {
  font-size: 0.75rem;
  color: #6b7280;
}

.guapa-wf-chat__header-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.guapa-wf-chat__open-page,
.guapa-wf-chat__close {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: #f5f0f8;
  color: #4a2659;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
}

.guapa-wf-chat__close svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.guapa-wf-chat__body {
  flex: 1;
  min-height: 0;
  background: #f4f2f7;
}

.guapa-wf-chat__frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #f4f2f7;
}

.guapa-chatbot-page {
  padding: 2rem 1rem 3rem;
  background:
    radial-gradient(900px 320px at 100% 0%, rgba(255, 192, 90, 0.14), transparent 55%),
    radial-gradient(800px 360px at 0% 0%, rgba(99, 52, 121, 0.12), transparent 50%),
    #f4f2f7;
}

.guapa-chatbot-page__inner {
  width: min(920px, 100%);
  margin: 0 auto;
}

.guapa-chatbot-page__intro {
  margin-bottom: 1.25rem;
}

.guapa-chatbot-page__eyebrow {
  margin: 0 0 0.35rem;
  color: #633479;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.guapa-chatbot-page__intro h1 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.5rem, 2vw, 2rem);
  color: #1c1530;
}

.guapa-chatbot-page__intro p {
  margin: 0;
  color: #6b7280;
}

.guapa-chatbot-page__frame-wrap {
  height: min(720px, calc(100vh - 220px));
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid #e9e7ef;
  background: #fff;
  box-shadow: 0 18px 50px rgba(74, 38, 89, 0.12);
}

.guapa-chatbot-page__frame {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

@media (max-width: 640px) {
  .guapa-wf-chat {
    left: 0.85rem;
    bottom: 0.85rem;
  }

  [dir="rtl"] .guapa-wf-chat {
    right: 0.85rem;
  }

  .guapa-wf-chat__panel {
    position: fixed;
    inset: 0.75rem;
    width: auto;
    height: auto;
    bottom: 0.75rem;
    left: 0.75rem;
    right: 0.75rem;
  }

  .guapa-wf-chat__launcher-label {
    display: none;
  }
}
