/**
 * LetsGrowMore - Purchase Pop-up Simulator - Frontend Styles
 * Clean, modern toast notification design with customizable colors
 */

/* Container */
.lgm-pps-popup-container {
    position: fixed;
    z-index: 999999;
    pointer-events: none;
}

/* Position variants */
.lgm-pps-popup-container.lgm-pps-bottom-right {
    bottom: 20px;
    right: 20px;
}

.lgm-pps-popup-container.lgm-pps-bottom-left {
    bottom: 20px;
    left: 20px;
}

.lgm-pps-popup-container.lgm-pps-top-right {
    top: 20px;
    right: 20px;
}

.lgm-pps-popup-container.lgm-pps-top-left {
    top: 20px;
    left: 20px;
}

/* Popup card */
.lgm-pps-popup {
    pointer-events: auto;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 16px 20px;
    max-width: 320px;
    min-width: 280px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    border-left: 4px solid #10b981;
    position: relative;
}

/* Top position adjustments */
.lgm-pps-top-right .lgm-pps-popup,
.lgm-pps-top-left .lgm-pps-popup {
    transform: translateY(-20px);
}

/* Visible state */
.lgm-pps-popup.lgm-pps-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Close button */
.lgm-pps-close {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s ease, color 0.2s ease;
    padding: 0;
    line-height: 1;
}

.lgm-pps-close:hover {
    background-color: #f3f4f6;
    color: #6b7280;
}

/* Header with icon */
.lgm-pps-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
    padding-right: 20px;
}

/* Shopping bag icon */
.lgm-pps-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lgm-pps-icon svg {
    width: 20px;
    height: 20px;
    fill: #ffffff;
}

/* Content area */
.lgm-pps-content {
    flex: 1;
    min-width: 0;
}

/* Main message */
.lgm-pps-message {
    font-size: 14px;
    line-height: 1.5;
    color: #1f2937;
    margin: 0 0 4px 0;
    font-weight: 500;
}

.lgm-pps-message .lgm-pps-name {
    font-weight: 700;
    color: #111827;
}

.lgm-pps-message .lgm-pps-product {
    font-weight: 600;
    color: #059669;
}

.lgm-pps-message .lgm-pps-coupon {
    font-weight: 600;
    color: #7c3aed;
    background: #f3e8ff;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 13px;
}

/* Price text */
.lgm-pps-price {
    font-size: 13px;
    color: #374151;
    margin: 6px 0 0 0;
    font-weight: 600;
    background: #f3f4f6;
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
}

/* CTA Button */
.lgm-pps-cta {
    display: inline-block;
    margin-top: 12px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.lgm-pps-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
    color: #ffffff;
    text-decoration: none;
}

.lgm-pps-cta:active {
    transform: translateY(0);
}

/* Time indicator */
.lgm-pps-time {
    font-size: 11px;
    color: #9ca3af;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.lgm-pps-time::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
    display: inline-block;
    animation: lgm-pps-pulse 2s infinite;
}

@keyframes lgm-pps-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.4;
    }
}

/* Mobile responsiveness */
@media (max-width: 480px) {
    .lgm-pps-popup-container {
        left: 10px !important;
        right: 10px !important;
        bottom: 10px;
    }
    
    .lgm-pps-popup-container.lgm-pps-top-right,
    .lgm-pps-popup-container.lgm-pps-top-left {
        top: 10px;
        bottom: auto;
    }
    
    .lgm-pps-popup {
        max-width: none;
        min-width: 0;
        width: 100%;
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .lgm-pps-popup {
        transition: opacity 0.2s ease;
        transform: none;
    }
    
    .lgm-pps-popup.lgm-pps-visible {
        transform: none;
    }
    
    .lgm-pps-time::before {
        animation: none;
    }
}
