.gpwa-widget {
  --gpwa-panel-radius: 20px;
  --gpwa-box-shadow: 0 14px 42px rgba(15, 23, 42, 0.18);
  --gpwa-current-size: var(--gpwa-size);
  position: fixed;
  z-index: 9998;
  bottom: var(--gpwa-offset-y);
  box-sizing: border-box;
  color: #1f2937;
  font-family: inherit;
  line-height: 1.45;
}

.gpwa-widget *, .gpwa-widget *::before, .gpwa-widget *::after { box-sizing: border-box; }
.gpwa-position-right { right: var(--gpwa-offset-x); }
.gpwa-position-left { left: var(--gpwa-offset-x); }
.gpwa-border-soft { --gpwa-panel-radius: 12px; }
.gpwa-border-square { --gpwa-panel-radius: 3px; }
.gpwa-shadow-none { --gpwa-box-shadow: none; }
.gpwa-shadow-strong { --gpwa-box-shadow: 0 20px 58px rgba(15, 23, 42, 0.3); }

.gpwa-launcher {
  display: flex;
  width: var(--gpwa-current-size);
  height: var(--gpwa-current-size);
  align-items: center;
  justify-content: center;
  margin-left: auto;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  background: var(--gpwa-button-bg);
  box-shadow: var(--gpwa-box-shadow);
  color: var(--gpwa-button-color);
  cursor: pointer;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.gpwa-position-left .gpwa-launcher { margin-right: auto; margin-left: 0; }
.gpwa-launcher:hover { color: var(--gpwa-button-color); filter: brightness(0.97); transform: translateY(-3px); text-decoration: none; }
.gpwa-launcher:focus-visible, .gpwa-close:focus-visible, .gpwa-cta:focus-visible { outline: 3px solid #0b8061; outline-offset: 3px; }
.gpwa-launcher svg { width: 58%; height: 58%; fill: currentColor; }
.gpwa-checkout { z-index: 900; }
.gpwa-checkout .gpwa-launcher { animation: none !important; }

.gpwa-info {
  position: absolute;
  right: 0;
  bottom: calc(var(--gpwa-current-size) + 13px);
  display: flex;
  width: max-content;
  max-width: min(290px, calc(100vw - 32px));
  align-items: flex-start;
  gap: 9px;
  padding: 12px 11px 12px 14px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 9px 28px rgba(15, 23, 42, 0.16);
  color: #34443d;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transform: translateY(7px) scale(0.98);
  transform-origin: bottom right;
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms;
}

.gpwa-info::after {
  position: absolute;
  right: 21px;
  bottom: -7px;
  width: 13px;
  height: 13px;
  border-right: 1px solid rgba(148, 163, 184, 0.24);
  border-bottom: 1px solid rgba(148, 163, 184, 0.24);
  background: #fff;
  content: "";
  transform: rotate(45deg);
}

.gpwa-position-left .gpwa-info { right: auto; left: 0; transform-origin: bottom left; }
.gpwa-position-left .gpwa-info::after { right: auto; left: 21px; }
.gpwa-info-visible .gpwa-info { opacity: 1; pointer-events: auto; visibility: visible; transform: translateY(0) scale(1); }
.gpwa-info span { position: relative; z-index: 1; }
.gpwa-info button { position: relative; z-index: 1; display: flex; width: 24px; height: 24px; flex: 0 0 24px; align-items: center; justify-content: center; margin: -5px -5px -5px 0; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #718078; cursor: pointer; }
.gpwa-info button:hover { background: #edf3f0; color: #26372f; }
.gpwa-info button:focus-visible { outline: 2px solid #0b8061; outline-offset: 1px; }
.gpwa-info button svg { width: 15px; height: 15px; fill: currentColor; }

.gpwa-panel {
  position: absolute;
  right: 0;
  bottom: calc(var(--gpwa-current-size) + 14px);
  display: block;
  width: min(370px, calc(100vw - 32px));
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: var(--gpwa-panel-radius);
  background: #fff;
  box-shadow: var(--gpwa-box-shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(0.985);
  transform-origin: bottom right;
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms;
}

.gpwa-position-left .gpwa-panel { right: auto; left: 0; transform-origin: bottom left; }
.gpwa-widget.gpwa-open .gpwa-panel { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }

.gpwa-panel-header {
  position: relative;
  display: flex;
  min-height: 82px;
  align-items: center;
  gap: 12px;
  padding: 15px 48px 15px 17px;
  background: var(--gpwa-header-bg);
  color: var(--gpwa-header-color);
}

.gpwa-avatar {
  display: flex;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.58);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
}

.gpwa-avatar img { width: 100%; height: 100%; object-fit: cover; }
.gpwa-avatar svg { width: 28px; height: 28px; fill: currentColor; }
.gpwa-heading { display: flex; min-width: 0; flex-direction: column; }
.gpwa-heading strong { overflow: hidden; font-size: 16px; font-weight: 700; letter-spacing: -0.01em; text-overflow: ellipsis; white-space: nowrap; }
.gpwa-heading span { overflow: hidden; margin-top: 2px; font-size: 12.5px; opacity: 0.84; text-overflow: ellipsis; white-space: nowrap; }

.gpwa-close {
  position: absolute;
  top: 13px;
  right: 11px;
  display: flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--gpwa-header-color);
  cursor: pointer;
  opacity: 0.8;
}

.gpwa-close:hover { background: rgba(255, 255, 255, 0.12); opacity: 1; }
.gpwa-close svg { width: 20px; height: 20px; fill: currentColor; }
.gpwa-panel-body { padding: 18px; background: #f4f7f6; }

.gpwa-message {
  position: relative;
  margin: 0 8px 17px 0;
  padding: 13px 15px 14px;
  border-radius: 4px 15px 15px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(15, 23, 42, 0.07);
}

.gpwa-message::before { position: absolute; top: 0; left: -7px; width: 12px; height: 12px; background: #fff; clip-path: polygon(100% 0, 100% 100%, 0 0); content: ""; }
.gpwa-message strong { display: block; margin-bottom: 4px; color: #17221e; font-size: 14px; font-weight: 700; }
.gpwa-message p { margin: 0; color: #52615b; font-size: 13.5px; line-height: 1.55; }

.gpwa-cta {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 16px;
  border: 2px solid transparent;
  border-radius: 12px;
  background: var(--gpwa-button-bg);
  box-shadow: 0 5px 14px rgba(15, 23, 42, 0.1);
  color: var(--gpwa-button-color);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  transition: filter 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.gpwa-cta:hover { box-shadow: 0 7px 18px rgba(15, 23, 42, 0.16); color: var(--gpwa-button-color); filter: brightness(0.96); transform: translateY(-1px); text-decoration: none; }
.gpwa-cta svg { width: 21px; height: 21px; flex: 0 0 21px; fill: currentColor; }
.gpwa-panel-footer { display: flex; align-items: center; justify-content: center; gap: 5px; margin: 12px 0 -2px; color: #6b7b75; font-size: 11px; text-align: center; }
.gpwa-panel-footer svg { width: 13px; height: 13px; flex: 0 0 13px; fill: currentColor; }
.gpwa-svg-defs { position: absolute; overflow: hidden; }

.gpwa-theme-dark { --gpwa-header-bg: #111827 !important; --gpwa-header-color: #fff !important; --gpwa-button-bg: #1f2937 !important; --gpwa-button-color: #fff !important; }
.gpwa-theme-purple { --gpwa-header-bg: #5b21b6 !important; --gpwa-header-color: #fff !important; --gpwa-button-bg: #7c3aed !important; --gpwa-button-color: #fff !important; }
.gpwa-animated .gpwa-launcher { animation: gpwa-enter 420ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }

@keyframes gpwa-enter {
  from { opacity: 0; transform: translateY(12px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 767.98px) {
  .gpwa-widget { --gpwa-current-size: var(--gpwa-mobile-size); bottom: var(--gpwa-mobile-offset-y); }
  .gpwa-position-right { right: var(--gpwa-mobile-offset-x); }
  .gpwa-position-left { left: var(--gpwa-mobile-offset-x); }
  .gpwa-hide-mobile { display: none !important; }
  .gpwa-info { max-width: min(270px, calc(100vw - 24px)); }
  .gpwa-panel, .gpwa-position-left .gpwa-panel { position: fixed; right: 12px; bottom: calc(var(--gpwa-mobile-offset-y) + var(--gpwa-current-size) + 12px); left: 12px; width: auto; max-height: calc(100dvh - var(--gpwa-mobile-offset-y) - var(--gpwa-current-size) - 28px); }
  .gpwa-info-hide-mobile { display: none !important; }
  .gpwa-panel-body { overflow: auto; max-height: calc(100dvh - 180px); overscroll-behavior: contain; }
}

@media (min-width: 768px) {
  .gpwa-hide-desktop, .gpwa-info-hide-desktop { display: none !important; }
}

@supports (bottom: env(safe-area-inset-bottom)) {
  .gpwa-safe-area { bottom: calc(var(--gpwa-offset-y) + env(safe-area-inset-bottom)); }
  @media (max-width: 767.98px) {
    .gpwa-safe-area { bottom: calc(var(--gpwa-mobile-offset-y) + env(safe-area-inset-bottom)); }
    .gpwa-safe-area .gpwa-panel { bottom: calc(var(--gpwa-mobile-offset-y) + env(safe-area-inset-bottom) + var(--gpwa-current-size) + 12px); }
  }
}

@media (prefers-reduced-motion: reduce) {
  .gpwa-widget * { scroll-behavior: auto !important; animation: none !important; transition-duration: 0.01ms !important; }
}
