.kcp-root {
  position: fixed;
  z-index: 99999;
  right: 18px;
  bottom: 18px;
  left: auto;
  max-width: min(390px, calc(100vw - 24px));
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  pointer-events: none;
}

.kcp-root.kcp-position-bottom-left {
  right: auto;
  left: 18px;
}

.kcp-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 10px 10px 10px 12px;
  border: 1px solid rgba(218, 176, 95, .5);
  border-radius: 14px;
  background: rgba(9, 11, 16, .94);
  box-shadow: 0 18px 46px rgba(0, 0, 0, .32);
  color: #fff;
  opacity: 0;
  visibility: hidden;
  transform: translateY(18px) scale(.98);
  transition: opacity .28s ease, transform .28s ease, visibility .28s ease;
  pointer-events: none;
  overflow: hidden;
}

.kcp-card.kcp-is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.kcp-root:not(.kcp-js-ready) .kcp-card {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.kcp-card.kcp-theme-light {
  color: #20170f;
  background: rgba(255, 250, 241, .96);
  box-shadow: 0 18px 46px rgba(63, 39, 16, .18);
}

.kcp-card:before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 8% 0, rgba(176, 15, 20, .16), transparent 34%),
    linear-gradient(90deg, rgba(218, 176, 95, .1), transparent 40%);
  pointer-events: none;
}

.kcp-thumb {
  position: relative;
  z-index: 1;
  width: 58px;
  height: 72px;
  border-radius: 9px;
  overflow: hidden;
  background: linear-gradient(135deg, #21150f, #7b0f13);
  box-shadow: 0 8px 18px rgba(0, 0, 0, .26);
}

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

.kcp-thumb span {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: #f5d898;
  font-weight: 900;
}

.kcp-content {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.kcp-line {
  display: flex;
  gap: 7px;
  align-items: center;
  min-height: 18px;
  margin: 0 0 4px;
  color: #f8d58d;
  font-size: .78rem;
  font-weight: 800;
}

.kcp-theme-light .kcp-line {
  color: #8a1014;
}

.kcp-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #21d176;
  box-shadow: 0 0 0 4px rgba(33, 209, 118, .18);
}

.kcp-message {
  margin: 0;
  color: inherit;
  font-size: .92rem;
  font-weight: 750;
  line-height: 1.2;
}

.kcp-product {
  display: block;
  margin-top: 2px;
  color: rgba(255, 255, 255, .72);
  font-size: .78rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kcp-theme-light .kcp-product {
  color: rgba(32, 23, 15, .66);
}

.kcp-actions {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  justify-items: end;
}

.kcp-buy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(180deg, #b3191e, #710b0f);
  box-shadow: 0 10px 18px rgba(113, 11, 15, .28);
  font-size: .72rem;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}

.kcp-close {
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 999px;
  color: inherit;
  background: rgba(255, 255, 255, .12);
  cursor: pointer;
}

.kcp-theme-light .kcp-close {
  background: rgba(32, 23, 15, .1);
}

.kcp-mini {
  position: fixed;
  z-index: 99998;
  right: 18px;
  bottom: 18px;
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 13px;
  border: 1px solid rgba(218, 176, 95, .5);
  border-radius: 999px;
  color: #fff;
  background: rgba(9, 11, 16, .94);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .26);
  font-size: .78rem;
  font-weight: 900;
  cursor: pointer;
  pointer-events: auto;
}

.kcp-position-bottom-left .kcp-mini {
  right: auto;
  left: 18px;
}

.kcp-mini.kcp-theme-light {
  color: #20170f;
  background: rgba(255, 250, 241, .96);
}

.kcp-root.kcp-is-minimized .kcp-card {
  display: none;
}

.kcp-root.kcp-is-minimized .kcp-mini {
  display: inline-flex;
}

.kcp-root.kcp-is-cycle-hidden .kcp-card,
.kcp-root.kcp-is-cycle-hidden .kcp-mini {
  display: none;
}

@media (max-width: 520px) {
  .kcp-root,
  .kcp-root.kcp-position-bottom-left {
    right: 12px;
    left: 12px;
    bottom: 12px;
    max-width: none;
  }

  .kcp-card {
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 8px;
    padding: 7px 8px;
    border-radius: 12px;
  }

  .kcp-thumb {
    width: 42px;
    height: 47px;
    border-radius: 8px;
  }

  .kcp-line {
    min-height: 14px;
    margin-bottom: 2px;
    font-size: .68rem;
  }

  .kcp-dot {
    width: 7px;
    height: 7px;
    box-shadow: 0 0 0 3px rgba(33, 209, 118, .18);
  }

  .kcp-message {
    font-size: .8rem;
    line-height: 1.08;
  }

  .kcp-product {
    margin-top: 1px;
    font-size: .68rem;
  }

  .kcp-actions {
    grid-template-columns: auto;
    gap: 5px;
    align-items: center;
    justify-items: end;
  }

  .kcp-buy {
    min-height: 34px;
    padding: 8px 12px;
    font-size: .72rem;
  }

  .kcp-close {
    width: 24px;
    height: 24px;
  }

  .kcp-mini,
  .kcp-position-bottom-left .kcp-mini {
    right: 12px;
    left: auto;
    bottom: 12px;
  }
}
