/* ==========================================================================
   KC Demo Purchase Popup — Scoped Styles
   Matches Keycode landing-page.html design language:
   Inter font, sharp corners, #4361ee accent, soft shadows, subtle borders.
   ========================================================================== */

.kc-popup-wrap {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 99999;
    pointer-events: none;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
}

.kc-popup {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0;
    padding: 16px 18px;
    width: 340px;
    max-width: calc(100vw - 48px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
    opacity: 0;
    transform: translateY(16px) translateX(-8px);
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.kc-popup.kc-popup--visible {
    opacity: 1;
    transform: translateY(0) translateX(0);
}

.kc-popup.kc-popup--hiding {
    opacity: 0;
    transform: translateY(8px) translateX(-8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Icon */
.kc-popup__icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: #eef2ff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
}

.kc-popup__icon svg {
    width: 20px;
    height: 20px;
    color: #4361ee;
}

/* Content */
.kc-popup__body {
    flex: 1;
    min-width: 0;
}

.kc-popup__text {
    font-size: 13.5px;
    font-weight: 500;
    color: #1a1a2e;
    line-height: 1.45;
    margin: 0 0 4px;
}

.kc-popup__text strong {
    font-weight: 700;
    color: #0f0f1a;
}

.kc-popup__product {
    font-weight: 600;
    color: #4361ee;
}

.kc-popup__meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    color: #9ca3af;
    font-weight: 500;
}

.kc-popup__pulse {
    width: 6px;
    height: 6px;
    background: #4361ee;
    border-radius: 50%;
    animation: kcPopupPulse 2s ease-in-out infinite;
}

@keyframes kcPopupPulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(67, 97, 238, 0.45); }
    50%      { opacity: 0.7; box-shadow: 0 0 0 5px rgba(67, 97, 238, 0); }
}

/* Close button */
.kc-popup__close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: #c4c8d0;
    cursor: pointer;
    padding: 0;
    border-radius: 0;
    transition: color 0.2s, background 0.2s;
}

.kc-popup__close:hover {
    color: #6b7280;
    background: #f3f4f6;
}

.kc-popup__close svg {
    width: 14px;
    height: 14px;
}

/* ── Responsive ── */
@media (max-width: 480px) {
    .kc-popup-wrap {
        bottom: 12px;
        left: 12px;
        right: 12px;
    }

    .kc-popup {
        width: 100%;
        max-width: none;
        padding: 14px 14px;
    }
}
