.arwlg-lock {
  overflow: hidden;
}

.arwlg-widget {
  --arwlg-primary: #25d366;
  --arwlg-dark: #101828;
  --arwlg-muted: #667085;
  --arwlg-border: #d0d5dd;
  --arwlg-bg: #ffffff;
  font-family: inherit;
}

.arwlg-widget .arwlg-floating-button {
  position: fixed !important;
  z-index: 99998 !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: var(--arwlg-primary) !important;
  color: #fff !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  box-shadow: 0 16px 35px rgba(37, 211, 102, 0.35) !important;
  font-weight: 800 !important;
  font-size: 15px !important;
  line-height: 1 !important;
  transition: transform 160ms ease, box-shadow 160ms ease !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  text-decoration: none !important;
  min-height: auto !important;
}

.arwlg-position-bottom-right .arwlg-floating-button { right: 22px !important; bottom: 22px !important; }
.arwlg-position-bottom-left .arwlg-floating-button { left: 22px !important; bottom: 22px !important; }
.arwlg-position-top-right .arwlg-floating-button { right: 22px !important; top: 22px !important; }
.arwlg-position-top-left .arwlg-floating-button { left: 22px !important; top: 22px !important; }

.arwlg-style-circle .arwlg-floating-button {
  width: 64px !important;
  height: 64px !important;
  padding: 0 !important;
}

.arwlg-style-circle .arwlg-floating-text {
  display: none !important;
}

.arwlg-style-pill .arwlg-floating-button {
  padding: 13px 18px !important;
}

.arwlg-widget .arwlg-floating-button:hover,
.arwlg-widget .arwlg-floating-button:focus {
  transform: translateY(-2px);
  box-shadow: 0 20px 44px rgba(37, 211, 102, 0.45) !important;
  outline: none;
  color: #fff !important;
  background: var(--arwlg-primary) !important;
}

.arwlg-pulse .arwlg-floating-button::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 999px;
  border: 2px solid var(--arwlg-primary);
  opacity: 0.55;
  animation: arwlgPulse 1.8s infinite;
  pointer-events: none;
}

@keyframes arwlgPulse {
  0% { transform: scale(0.88); opacity: 0.55; }
  70% { transform: scale(1.25); opacity: 0; }
  100% { transform: scale(1.25); opacity: 0; }
}

.arwlg-wa-icon {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 32px;
}

.arwlg-style-pill .arwlg-wa-icon {
  width: 26px;
  height: 26px;
  flex-basis: 26px;
}

.arwlg-wa-icon svg,
.arwlg-submit-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.arwlg-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
}

.arwlg-modal.is-active {
  display: block;
}

.arwlg-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.36);
  backdrop-filter: blur(3px);
}

.arwlg-modal-card {
  position: absolute;
  width: min(390px, calc(100vw - 28px));
  background: var(--arwlg-bg);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.25);
  transform: translateY(14px);
  animation: arwlgSlideUp 180ms ease forwards;
}

.arwlg-position-bottom-right .arwlg-modal-card,
.arwlg-position-top-right .arwlg-modal-card {
  right: 24px;
}

.arwlg-position-bottom-left .arwlg-modal-card,
.arwlg-position-top-left .arwlg-modal-card {
  left: 24px;
}

.arwlg-position-bottom-right .arwlg-modal-card,
.arwlg-position-bottom-left .arwlg-modal-card {
  bottom: 98px;
}

.arwlg-position-top-right .arwlg-modal-card,
.arwlg-position-top-left .arwlg-modal-card {
  top: 98px;
}

@keyframes arwlgSlideUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.arwlg-modal-header {
  background: linear-gradient(135deg, #128c7e 0%, var(--arwlg-primary) 100%);
  color: #fff;
  padding: 18px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

.arwlg-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: var(--arwlg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 19px;
  flex: 0 0 auto;
  overflow: hidden;
}

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

.arwlg-modal-header strong {
  display: block;
  font-size: 15px;
  line-height: 1.25;
  padding-right: 34px;
}

.arwlg-modal-header span {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  font-size: 13px;
  opacity: 0.94;
}

.arwlg-modal-header span i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #b5ff87;
  display: inline-block;
}

.arwlg-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.arwlg-modal-body {
  padding: 20px;
  background: #f7f7f7;
}

.arwlg-message-bubble {
  background: #fff;
  color: var(--arwlg-dark);
  border-radius: 18px;
  padding: 16px 16px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
  margin-bottom: 16px;
  font-size: 15px;
  line-height: 1.45;
}

.arwlg-form {
  display: grid;
  gap: 10px;
}

.arwlg-input {
  width: 100%;
  border: 1px solid var(--arwlg-border) !important;
  background: #fff !important;
  border-radius: 13px !important;
  padding: 14px 14px !important;
  font-size: 15px !important;
  color: var(--arwlg-dark) !important;
  box-sizing: border-box;
  min-height: 50px;
}

.arwlg-input:focus {
  outline: none;
  border-color: var(--arwlg-primary) !important;
  box-shadow: 0 0 0 4px rgba(37, 211, 102, 0.16);
}

.arwlg-select {
  color: #344054 !important;
}

.arwlg-privacy {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: #344054;
  font-size: 13px;
  line-height: 1.35;
  margin: 2px 0 4px;
}

.arwlg-privacy input {
  margin-top: 2px;
}

.arwlg-privacy a {
  color: var(--arwlg-dark);
  font-weight: 700;
  text-decoration: underline;
}

.arwlg-error {
  display: none;
  background: #fee2e2;
  color: #991b1b;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
}

.arwlg-widget .arwlg-submit {
  width: 100% !important;
  border: 0 !important;
  border-radius: 14px !important;
  background: var(--arwlg-primary) !important;
  color: #fff !important;
  cursor: pointer !important;
  padding: 15px 16px !important;
  display: inline-flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 9px !important;
  font-weight: 900 !important;
  font-size: 16px !important;
  box-shadow: 0 12px 28px rgba(37, 211, 102, 0.25) !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}

.arwlg-widget .arwlg-submit:hover,
.arwlg-widget .arwlg-submit:focus {
  background: var(--arwlg-primary) !important;
  color: #fff !important;
}

.arwlg-submit:disabled {
  opacity: 0.72;
  cursor: not-allowed;
}

.arwlg-submit-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 600px) {
  .arwlg-position-bottom-right .arwlg-floating-button,
  .arwlg-position-top-right .arwlg-floating-button {
    right: 16px !important;
  }

  .arwlg-position-bottom-left .arwlg-floating-button,
  .arwlg-position-top-left .arwlg-floating-button {
    left: 16px !important;
  }

  .arwlg-position-bottom-right .arwlg-floating-button,
  .arwlg-position-bottom-left .arwlg-floating-button {
    bottom: 16px !important;
  }

  .arwlg-position-top-right .arwlg-floating-button,
  .arwlg-position-top-left .arwlg-floating-button {
    top: 16px !important;
  }

  .arwlg-style-pill .arwlg-floating-button {
    padding: 13px 15px !important;
  }

  .arwlg-style-pill .arwlg-floating-text {
    display: none;
  }

  .arwlg-modal-card {
    left: 14px !important;
    right: 14px !important;
    width: auto;
    border-radius: 20px;
  }

  .arwlg-position-bottom-right .arwlg-modal-card,
  .arwlg-position-bottom-left .arwlg-modal-card {
    bottom: 92px;
  }

  .arwlg-position-top-right .arwlg-modal-card,
  .arwlg-position-top-left .arwlg-modal-card {
    top: 92px;
  }
}


/* V1.3 - Burbuja conversacional auto-hide */
.arwlg-launcher {
  position: fixed !important;
  z-index: 99998 !important;
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  pointer-events: none;
}

.arwlg-position-bottom-right .arwlg-launcher { right: 22px !important; bottom: 22px !important; flex-direction: row; }
.arwlg-position-bottom-left .arwlg-launcher { left: 22px !important; bottom: 22px !important; flex-direction: row-reverse; }
.arwlg-position-top-right .arwlg-launcher { right: 22px !important; top: 22px !important; flex-direction: row; }
.arwlg-position-top-left .arwlg-launcher { left: 22px !important; top: 22px !important; flex-direction: row-reverse; }

.arwlg-widget .arwlg-floating-button {
  position: relative !important;
  right: auto !important;
  left: auto !important;
  top: auto !important;
  bottom: auto !important;
  pointer-events: auto;
}

.arwlg-style-circle .arwlg-floating-button {
  width: 72px !important;
  height: 72px !important;
  border: 4px solid rgba(255,255,255,0.72) !important;
}

.arwlg-style-circle .arwlg-wa-icon {
  width: 36px;
  height: 36px;
  flex-basis: 36px;
}

.arwlg-chat-bubble {
  position: relative;
  border: 0 !important;
  background: #fff !important;
  color: #333 !important;
  border-radius: 999px !important;
  padding: 13px 22px !important;
  min-height: 48px !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.22) !important;
  font-size: 18px !important;
  line-height: 1.2 !important;
  font-weight: 500 !important;
  white-space: nowrap !important;
  max-width: calc(100vw - 126px);
  cursor: pointer !important;
  pointer-events: auto;
  opacity: 0;
  transform: translateX(8px) scale(0.96);
  animation: arwlgBubbleIn 360ms ease 240ms forwards;
  transition: opacity 260ms ease, transform 260ms ease, visibility 260ms ease;
}

.arwlg-position-bottom-left .arwlg-chat-bubble,
.arwlg-position-top-left .arwlg-chat-bubble {
  transform: translateX(-8px) scale(0.96);
}

.arwlg-chat-bubble span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.arwlg-chat-bubble::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -9px;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 11px solid #fff;
  filter: drop-shadow(2px 2px 2px rgba(15,23,42,0.08));
}

.arwlg-position-bottom-left .arwlg-chat-bubble::after,
.arwlg-position-top-left .arwlg-chat-bubble::after {
  right: auto;
  left: -9px;
  border-left: 0;
  border-right: 11px solid #fff;
}

.arwlg-chat-bubble.is-hidden {
  opacity: 0 !important;
  transform: translateX(12px) scale(0.96) !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.arwlg-position-bottom-left .arwlg-chat-bubble.is-hidden,
.arwlg-position-top-left .arwlg-chat-bubble.is-hidden {
  transform: translateX(-12px) scale(0.96) !important;
}

@keyframes arwlgBubbleIn {
  to { opacity: 1; transform: translateX(0) scale(1); }
}

@media (max-width: 600px) {
  .arwlg-position-bottom-right .arwlg-launcher,
  .arwlg-position-top-right .arwlg-launcher { right: 16px !important; }

  .arwlg-position-bottom-left .arwlg-launcher,
  .arwlg-position-top-left .arwlg-launcher { left: 16px !important; }

  .arwlg-position-bottom-right .arwlg-launcher,
  .arwlg-position-bottom-left .arwlg-launcher { bottom: 16px !important; }

  .arwlg-position-top-right .arwlg-launcher,
  .arwlg-position-top-left .arwlg-launcher { top: 16px !important; }

  .arwlg-chat-bubble {
    max-width: calc(100vw - 112px);
    font-size: 15px !important;
    padding: 12px 16px !important;
    min-height: 44px !important;
  }

  .arwlg-style-circle .arwlg-floating-button {
    width: 64px !important;
    height: 64px !important;
  }

  .arwlg-style-circle .arwlg-wa-icon {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
  }
}


/* V1.4 - Refinamiento visual del botón de WhatsApp */
.arwlg-widget .arwlg-floating-button {
  box-shadow: 0 10px 28px rgba(16,24,40,0.18), 0 6px 16px rgba(37,211,102,0.18) !important;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease !important;
}

.arwlg-style-circle .arwlg-floating-button {
  width: 66px !important;
  height: 66px !important;
  border: 0 !important;
  outline: none !important;
  background: #5ad769 !important;
  box-shadow: 0 12px 28px rgba(16,24,40,0.18), 0 0 0 1px rgba(255,255,255,0.04) inset !important;
}

.arwlg-style-circle .arwlg-floating-button:hover,
.arwlg-style-circle .arwlg-floating-button:focus {
  transform: scale(1.04) !important;
  box-shadow: 0 14px 32px rgba(16,24,40,0.2), 0 8px 20px rgba(37,211,102,0.18) !important;
  filter: saturate(1.02);
}

.arwlg-style-circle .arwlg-wa-icon {
  width: 38px;
  height: 38px;
  flex-basis: 38px;
}

.arwlg-style-circle .arwlg-wa-icon svg {
  filter: drop-shadow(0 0 0 rgba(255,255,255,0));
}

.arwlg-pulse .arwlg-floating-button::after {
  inset: -7px;
  border-width: 1.5px;
  opacity: 0.22;
  animation: arwlgPulse 2.15s infinite;
}

@keyframes arwlgPulse {
  0% { transform: scale(0.92); opacity: 0.22; }
  70% { transform: scale(1.18); opacity: 0; }
  100% { transform: scale(1.18); opacity: 0; }
}

@media (max-width: 600px) {
  .arwlg-style-circle .arwlg-floating-button {
    width: 62px !important;
    height: 62px !important;
  }

  .arwlg-style-circle .arwlg-wa-icon {
    width: 35px;
    height: 35px;
    flex-basis: 35px;
  }
}
