/* WhatsApp Privacy Chat - isolated front-office styles */
.wpc-widget,
.wpc-widget * {
  box-sizing: border-box;
}

.wpc-widget {
  --wpc-color: #25d366;
  --wpc-bottom-desktop: 24px;
  --wpc-side-desktop: 24px;
  --wpc-bottom-mobile: 12px;
  --wpc-side-mobile: 12px;
  position: fixed;
  bottom: calc(var(--wpc-bottom-desktop) + env(safe-area-inset-bottom, 0px));
  z-index: 2147483000;
  width: 64px;
  height: 64px;
  color: #25312b;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.35;
  text-align: left;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wpc-widget--right {
  right: var(--wpc-side-desktop);
  left: auto;
}

.wpc-widget--left {
  right: auto;
  left: var(--wpc-side-desktop);
}

.wpc-launcher,
.wpc-close,
.wpc-chat-button {
  margin: 0;
  border: 0;
  font: inherit;
  text-transform: none;
  appearance: none;
  -webkit-appearance: none;
}

.wpc-launcher {
  position: absolute;
  right: 0;
  bottom: 0;
  display: inline-flex;
  width: 64px;
  height: 64px;
  align-items: center;
  justify-content: center;
  padding: 0;
  overflow: visible;
  border-radius: 50%;
  background: var(--wpc-color);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(27, 67, 47, 0.23), 0 3px 9px rgba(27, 67, 47, 0.18);
  opacity: 1;
  transform: scale(1);
  transition: transform 180ms ease, opacity 180ms ease, box-shadow 180ms ease;
}

.wpc-widget--left .wpc-launcher {
  right: auto;
  left: 0;
}

.wpc-launcher:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 15px 34px rgba(27, 67, 47, 0.27), 0 4px 10px rgba(27, 67, 47, 0.18);
}

.wpc-launcher:active {
  transform: scale(0.96);
}

.wpc-whatsapp-icon {
  display: block;
  width: 37px;
  height: 37px;
}

.wpc-panel {
  position: absolute;
  right: 0;
  bottom: 0;
  display: flex;
  width: 400px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px);
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(32, 76, 55, 0.08);
  border-radius: 28px;
  background: #f7fffb;
  box-shadow: 0 18px 48px rgba(27, 49, 38, 0.24), 0 3px 10px rgba(27, 49, 38, 0.12);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(16px) scale(0.96);
  transform-origin: right bottom;
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
}

.wpc-widget--left .wpc-panel {
  right: auto;
  left: 0;
  transform-origin: left bottom;
}

.wpc-widget.is-open .wpc-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.wpc-widget.is-open .wpc-launcher {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.78);
}

.wpc-panel-header {
  display: flex;
  min-height: 70px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 18px 13px 20px;
  background: var(--wpc-color);
  color: #fff;
}

.wpc-panel-heading {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.wpc-heading-icon {
  display: block;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
}

.wpc-panel-title {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #fff;
  font-family: inherit;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wpc-close {
  display: inline-flex;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.24);
  color: #fff;
  cursor: pointer;
  transition: background-color 160ms ease, transform 160ms ease;
}

.wpc-close:hover {
  background: rgba(0, 0, 0, 0.34);
  transform: rotate(4deg);
}

.wpc-close svg {
  display: block;
  width: 22px;
  height: 22px;
}

.wpc-panel-body {
  min-height: 0;
  flex: 1 1 auto;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 22px 20px 18px;
  background: #f7fffb;
  scrollbar-width: thin;
}

.wpc-consent-block {
  position: relative;
}

.wpc-checkbox {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.wpc-consent-label {
  display: grid;
  grid-template-columns: 23px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  margin: 0;
  color: #303a35;
  cursor: pointer;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.38;
}

.wpc-checkmark {
  display: inline-flex;
  width: 23px;
  height: 23px;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
  border: 2px solid var(--wpc-color);
  border-radius: 4px;
  background: #fff;
  color: transparent;
  transition: background-color 150ms ease, color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.wpc-checkmark svg {
  display: block;
  width: 17px;
  height: 17px;
}

.wpc-checkbox:checked + .wpc-consent-label .wpc-checkmark {
  background: var(--wpc-color);
  color: #fff;
  transform: scale(1.02);
}

.wpc-checkbox:focus-visible + .wpc-consent-label .wpc-checkmark {
  outline: 3px solid rgba(37, 211, 102, 0.28);
  outline-offset: 2px;
}

.wpc-policy-copy {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.wpc-policy-title {
  display: block;
  margin: 0 0 2px;
  color: #29332e;
  font-size: 13px;
  font-weight: 500;
}

.wpc-policy-text {
  display: block;
  color: #3b4540;
  white-space: pre-line;
}

.wpc-policy-link {
  display: inline-block;
  margin: 9px 0 0 33px;
  color: #176f3e;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.wpc-policy-link:hover,
.wpc-policy-link:focus {
  color: #0d512c;
  text-decoration-thickness: 2px;
}

.wpc-consent-error {
  margin: 10px 0 0 33px;
  color: #a4262c;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.35;
}

.wpc-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 22px;
}

.wpc-chat-button {
  display: inline-flex;
  min-width: 162px;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 17px 12px 24px;
  border-radius: 999px;
  background: #a4a4a4;
  color: #fff;
  cursor: not-allowed;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.1;
  box-shadow: 0 3px 7px rgba(38, 49, 43, 0.17);
  opacity: 0.88;
  transition: background-color 160ms ease, box-shadow 160ms ease, opacity 160ms ease, transform 160ms ease;
}

.wpc-chat-button:not(:disabled) {
  background: var(--wpc-color);
  cursor: pointer;
  opacity: 1;
}

.wpc-chat-button:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 7px 16px rgba(31, 114, 68, 0.24);
}

.wpc-chat-button:not(:disabled):active {
  transform: translateY(0) scale(0.98);
}

.wpc-send-icon {
  display: block;
  width: 35px;
  height: 35px;
  flex: 0 0 35px;
}

.wpc-launcher:focus-visible,
.wpc-close:focus-visible,
.wpc-chat-button:focus-visible,
.wpc-policy-link:focus-visible {
  outline: 3px solid rgba(18, 92, 50, 0.38);
  outline-offset: 3px;
}

@media (max-width: 767.98px) {
  .wpc-widget {
    bottom: calc(var(--wpc-bottom-mobile) + env(safe-area-inset-bottom, 0px));
    width: 58px;
    height: 58px;
  }

  .wpc-widget--right {
    right: var(--wpc-side-mobile);
  }

  .wpc-widget--left {
    left: var(--wpc-side-mobile);
  }

  .wpc-launcher {
    width: 58px;
    height: 58px;
  }

  .wpc-whatsapp-icon {
    width: 34px;
    height: 34px;
  }

  .wpc-panel,
  .wpc-widget--left .wpc-panel {
    position: fixed;
    right: var(--wpc-side-mobile);
    bottom: calc(var(--wpc-bottom-mobile) + env(safe-area-inset-bottom, 0px));
    left: var(--wpc-side-mobile);
    width: auto;
    max-width: none;
    max-height: calc(100vh - var(--wpc-bottom-mobile) - 20px - env(safe-area-inset-bottom, 0px));
    border-radius: 25px;
    transform-origin: center bottom;
  }

  @supports (height: 100dvh) {
    .wpc-panel,
    .wpc-widget--left .wpc-panel {
      max-height: calc(100dvh - var(--wpc-bottom-mobile) - 20px - env(safe-area-inset-bottom, 0px));
    }
  }

  .wpc-panel-header {
    min-height: 68px;
    padding: 12px 16px 12px 18px;
  }

  .wpc-panel-body {
    padding: 20px 16px 16px;
  }

  .wpc-consent-label {
    font-size: 13px;
    line-height: 1.36;
  }

  .wpc-actions {
    margin-top: 20px;
  }

  .wpc-chat-button {
    min-width: 160px;
    min-height: 56px;
  }
}

@media (max-width: 389.98px) {
  .wpc-panel-title {
    font-size: 18px;
  }

  .wpc-panel-body {
    padding-right: 14px;
    padding-left: 14px;
  }

  .wpc-consent-label {
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 8px;
    font-size: 12.5px;
  }

  .wpc-checkmark {
    width: 22px;
    height: 22px;
  }

  .wpc-policy-link,
  .wpc-consent-error {
    margin-left: 30px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wpc-launcher,
  .wpc-panel,
  .wpc-close,
  .wpc-checkmark,
  .wpc-chat-button {
    transition: none;
  }
}
