/* KDF App Growth — compact non-intrusive install CTAs */
:root {
  --kdf-ag-green: #0f3d2e;
  --kdf-ag-gold: #d4af37;
  --kdf-ag-safe: env(safe-area-inset-bottom, 0px);
}

body.kdf-checkout-flow #kdf-app-growth { display: none !important; }
/* Cart page: allow dual-choice modal; hide bottom banner */
body.kdf-ag-on-cart #kdf-app-growth { display: none !important; }
body.kdf-ag-on-cart .kdf-ag-modal.is-open { display: flex !important; }
/* Real checkout/payment steps: no install UI */
body.kdf-checkout-flow:not(.kdf-ag-on-cart) .kdf-ag-modal { display: none !important; }

#kdf-app-growth {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(96px + var(--kdf-ag-safe));
  z-index: 1030;
  display: none;
  pointer-events: none;
}
#kdf-app-growth.is-visible {
  display: block;
  pointer-events: auto;
  animation: kdfAgIn .28s ease;
}
@keyframes kdfAgIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.kdf-ag-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  background: linear-gradient(135deg, #0f3d2e 0%, #166534 70%);
  color: #fff;
  border: 1px solid rgba(212, 175, 55, 0.35);
  box-shadow: 0 10px 28px rgba(15, 61, 46, 0.35);
}
.kdf-ag-banner__icon {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: cover;
  background: #fff;
}
.kdf-ag-banner__copy {
  flex: 1 1 auto;
  min-width: 0;
}
.kdf-ag-banner__badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #0f3d2e;
  background: var(--kdf-ag-gold);
  border-radius: 999px;
  padding: 2px 7px;
  margin-bottom: 3px;
}
.kdf-ag-banner__title {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kdf-ag-banner__sub {
  margin: 2px 0 0;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.82);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kdf-ag-banner__cta {
  flex: 0 0 auto;
  border: 0;
  border-radius: 10px;
  height: 34px;
  padding: 0 12px;
  background: #fff;
  color: var(--kdf-ag-green);
  font-weight: 800;
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
}
.kdf-ag-banner__close {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

/* Cart / strong dual-choice modal */
.kdf-ag-modal {
  position: fixed;
  inset: 0;
  z-index: 1060;
  display: none;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  padding: 16px;
  padding-bottom: calc(16px + var(--kdf-ag-safe));
}
.kdf-ag-modal.is-open { display: flex; }
.kdf-ag-modal__card {
  width: min(420px, 100%);
  background: #fff;
  border-radius: 18px;
  padding: 18px 16px 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
  animation: kdfAgIn .28s ease;
}
.kdf-ag-modal__eyebrow {
  margin: 0 0 6px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #b45309;
}
.kdf-ag-modal__title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--kdf-ag-green);
  line-height: 1.25;
}
.kdf-ag-modal__sub {
  margin: 6px 0 14px;
  font-size: 13px;
  color: #6b7280;
  line-height: 1.4;
}
.kdf-ag-modal__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.kdf-ag-modal__primary {
  border: 0;
  border-radius: 12px;
  height: 44px;
  background: var(--kdf-ag-green);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
}
.kdf-ag-modal__secondary {
  border: 1px solid rgba(15, 61, 46, 0.2);
  border-radius: 12px;
  height: 42px;
  background: #fff;
  color: var(--kdf-ag-green);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

/* Inline product CTA (compact) */
.kdf-ag-inline {
  display: none;
  margin: 0 0 14px;
}
.kdf-ag-inline.is-ready { display: block; }
.kdf-ag-inline__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration: none !important;
  color: inherit !important;
  border: 1px solid rgba(15, 61, 46, 0.16);
  background: linear-gradient(90deg, rgba(15, 61, 46, 0.07), #f7faf8);
}
.kdf-ag-inline__ico {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--kdf-ag-green);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex: 0 0 auto;
}
.kdf-ag-inline__copy { flex: 1 1 auto; min-width: 0; }
.kdf-ag-inline__copy strong {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: var(--kdf-ag-green);
}
.kdf-ag-inline__copy span {
  display: block;
  font-size: 11px;
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kdf-ag-inline__go {
  font-size: 12px;
  font-weight: 800;
  color: var(--kdf-ag-green);
  white-space: nowrap;
}

@media (min-width: 768px) {
  #kdf-app-growth { display: none !important; }
}
