.ppap-popup,
.ppap-popup * {
  box-sizing: border-box;
}

.ppap-popup[hidden] {
  display: none !important;
}

.ppap-popup {
  --ppap-accent: #16a064;
  --ppap-button: #16231c;
  --ppap-button-text: #ffffff;
  --ppap-bg: #ffffff;
  --ppap-border: #bfe8d2;
  --ppap-title: #16231c;
  --ppap-muted: #66736b;
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 999999;
  width: min(380px, calc(100vw - 32px));
  min-height: 144px;
  padding: 16px 18px 15px;
  border: 1px solid var(--ppap-border);
  border-left: 4px solid var(--ppap-accent);
  border-radius: 16px;
  background: var(--ppap-bg);
  color: var(--ppap-title);
  box-shadow: 0 18px 50px rgba(18, 34, 27, 0.2);
  font-family: inherit;
  transform: translateY(18px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .22s ease, transform .22s ease, visibility .22s ease;
}

.ppap-popup.ppap-visible {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.ppap-popup.ppap-has-logo {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 13px;
  align-items: start;
}

.ppap-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  margin-top: 16px;
  border: 1px solid color-mix(in srgb, var(--ppap-accent) 22%, transparent);
  border-radius: 13px;
  background: color-mix(in srgb, var(--ppap-accent) 7%, #ffffff);
  overflow: hidden;
}

.ppap-logo {
  display: block;
  max-width: 46px;
  max-height: 46px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.ppap-close {
  position: absolute;
  top: 8px;
  right: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ppap-muted);
  font: inherit;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}

.ppap-close:hover,
.ppap-close:focus-visible {
  background: color-mix(in srgb, var(--ppap-muted) 10%, transparent);
  color: var(--ppap-title);
  outline: none;
}

.ppap-content {
  min-width: 0;
  padding-right: 22px;
}

.ppap-eyebrow {
  margin: 0 0 6px;
  color: var(--ppap-muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.ppap-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--ppap-title);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.22;
}

.ppap-dot {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ppap-accent);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--ppap-accent) 14%, transparent);
}

.ppap-facts {
  margin-top: 7px;
  color: var(--ppap-muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.ppap-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 13px;
}

.ppap-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 15px;
  border-radius: 10px;
  background: var(--ppap-button);
  color: var(--ppap-button-text) !important;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  text-decoration: none !important;
  box-shadow: 0 7px 16px color-mix(in srgb, var(--ppap-button) 20%, transparent);
  transition: transform .15s ease, filter .15s ease;
}

.ppap-primary:hover,
.ppap-primary:focus-visible {
  color: var(--ppap-button-text) !important;
  transform: translateY(-1px);
  filter: brightness(.94);
  outline: none;
}

.ppap-secondary {
  color: var(--ppap-accent) !important;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ppap-secondary:hover,
.ppap-secondary:focus-visible {
  color: var(--ppap-accent) !important;
  filter: brightness(.78);
  outline: none;
}

.ppap-notice {
  margin-top: 9px;
  color: var(--ppap-muted);
  font-size: 10px;
  line-height: 1.35;
}

@media (max-width: 600px) {
  .ppap-popup {
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    width: calc(100vw - 20px);
    min-height: 132px;
    padding: 14px 14px 13px;
    border-radius: 14px;
  }

  .ppap-popup.ppap-has-logo {
    grid-template-columns: 50px minmax(0, 1fr);
    gap: 10px;
  }

  .ppap-logo-wrap {
    width: 50px;
    height: 50px;
    margin-top: 17px;
    border-radius: 11px;
  }

  .ppap-logo {
    max-width: 40px;
    max-height: 40px;
  }

  .ppap-content {
    padding-right: 20px;
  }

  .ppap-eyebrow {
    font-size: 10px;
  }

  .ppap-title {
    font-size: 16px;
  }

  .ppap-facts {
    font-size: 12px;
  }

  .ppap-actions {
    gap: 10px;
    margin-top: 10px;
  }

  .ppap-primary {
    min-height: 38px;
    padding: 8px 13px;
    font-size: 13px;
  }

  .ppap-secondary {
    font-size: 12px;
  }
}

@supports not (color: color-mix(in srgb, #000 20%, transparent)) {
  .ppap-logo-wrap {
    border-color: rgba(22, 160, 100, .2);
    background: #f4fbf7;
  }

  .ppap-dot {
    box-shadow: 0 0 0 5px rgba(22, 160, 100, .14);
  }

  .ppap-primary {
    box-shadow: 0 7px 16px rgba(22, 35, 28, .18);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ppap-popup,
  .ppap-primary {
    transition: none;
  }
}
