/* Purchase Notification Popup Styles */

.purchase-notification {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 9999;
    max-width: 400px;
    width: calc(100% - 40px);
    opacity: 0;
    transform: translateX(-120%);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: none;
    will-change: transform, opacity;
    isolation: isolate;
}

.purchase-notification.show {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.purchase-notification-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid #e0e0e0;
    border-radius: 16px;
    padding: 16px 20px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12), 0 2px 4px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    position: relative;
    contain: layout style paint;
    overflow: hidden;
}

.purchase-notification-emoji {
    font-size: 32px;
    line-height: 1;
    flex-shrink: 0;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.purchase-notification-text {
    flex: 1;
    min-width: 0;
}

.purchase-notification-name {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 4px;
    line-height: 1.3;
}

.purchase-notification-action {
    font-size: 14px;
    color: #4a5568;
    margin-bottom: 8px;
    line-height: 1.4;
}

.purchase-notification-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 12px;
}

.purchase-notification-time {
    color: #718096;
    display: flex;
    align-items: center;
    gap: 4px;
}

.purchase-notification-time::before {
    content: "🕐";
    font-size: 14px;
}

.purchase-notification-verified {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #3182ce;
    font-weight: 600;
    background: #ebf8ff;
    padding: 2px 8px;
    border-radius: 12px;
}

.verified-icon {
    width: 14px;
    height: 14px;
    color: #3182ce;
}

.purchase-notification-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: transparent;
    border: none;
    color: #a0aec0;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 4px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
}

.purchase-notification-close:hover {
    background: #f7fafc;
    color: #4a5568;
}

/* Mobile responsiveness */
@media (max-width: 640px) {
    .purchase-notification {
        left: 10px;
        bottom: 10px;
        width: calc(100% - 20px);
        max-width: none;
    }

    .purchase-notification-content {
        padding: 12px 16px;
    }

    .purchase-notification-emoji {
        font-size: 28px;
    }

    .purchase-notification-name {
        font-size: 14px;
    }

    .purchase-notification-action {
        font-size: 13px;
    }
}

/* Dark mode support (for pages with dark backgrounds) */
@media (prefers-color-scheme: dark) {
    .purchase-notification-content {
        background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
        border-color: #4a5568;
    }

    .purchase-notification-name {
        color: #ffffff;
    }

    .purchase-notification-action {
        color: #e2e8f0;
    }

    .purchase-notification-time {
        color: #a0aec0;
    }

    .purchase-notification-verified {
        background: rgba(49, 130, 206, 0.2);
        color: #63b3ed;
    }

    .verified-icon {
        color: #63b3ed;
    }

    .purchase-notification-close {
        color: #718096;
    }

    .purchase-notification-close:hover {
        background: #4a5568;
        color: #e2e8f0;
    }
}

/* Force dark mode for pages with dark backgrounds */
body[data-theme="dark"] .purchase-notification-content,
.bg-black .purchase-notification-content,
.bg-neutral-900 .purchase-notification-content {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    border-color: #4a5568;
}

body[data-theme="dark"] .purchase-notification-name,
.bg-black .purchase-notification-name,
.bg-neutral-900 .purchase-notification-name {
    color: #ffffff;
}

body[data-theme="dark"] .purchase-notification-action,
.bg-black .purchase-notification-action,
.bg-neutral-900 .purchase-notification-action {
    color: #e2e8f0;
}

body[data-theme="dark"] .purchase-notification-time,
.bg-black .purchase-notification-time,
.bg-neutral-900 .purchase-notification-time {
    color: #a0aec0;
}

body[data-theme="dark"] .purchase-notification-verified,
.bg-black .purchase-notification-verified,
.bg-neutral-900 .purchase-notification-verified {
    background: rgba(49, 130, 206, 0.2);
    color: #63b3ed;
}

body[data-theme="dark"] .verified-icon,
.bg-black .verified-icon,
.bg-neutral-900 .verified-icon {
    color: #63b3ed;
}

body[data-theme="dark"] .purchase-notification-close,
.bg-black .purchase-notification-close,
.bg-neutral-900 .purchase-notification-close {
    color: #718096;
}

body[data-theme="dark"] .purchase-notification-close:hover,
.bg-black .purchase-notification-close:hover,
.bg-neutral-900 .purchase-notification-close:hover {
    background: #4a5568;
    color: #e2e8f0;
}
