/**
 * Growtification Frontend Styles
 *
 * Social proof notification popup styling
 *
 * @package Growtification
 */

/* Notification Container */
#growtification-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 999999;
    max-width: 440px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

/* Notification Content Box */
.growtification-content {
    display: flex;
    align-items: center;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 14px 16px;
    position: relative;
    animation: growtification-slide-in 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Slide-in Animation */
@keyframes growtification-slide-in {
    from {
        opacity: 0;
        transform: translateX(-30px) translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateX(0) translateY(0);
    }
}

/* Product Image */
.growtification-image {
    flex-shrink: 0;
    margin-right: 14px;
}

.growtification-image img {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    display: block;
}

/* Text Content */
.growtification-text {
    flex: 1;
    color: #5f6368;
    padding-right: 20px;
}

/* Message styling */
.growtification-message {
    display: block;
}

.growtification-message strong {
    font-weight: 600;
    color: #de5b93;
}

.growtification-time {
    font-style: italic;
    font-size: 13px;
}

/* Product Link */
.growtification-message a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.growtification-message a:hover {
    color: #de5b93;
}

.growtification-message a strong {
    color: #de5b93;
    transition: color 0.2s ease;
}

.growtification-message a:hover strong {
    color: #b8447a;
}

/* Close Button */
.growtification-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    color: #9aa0a6;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.growtification-close:hover {
    color: #5f6368;
    background: #f1f3f4;
}

.growtification-close:focus {
    outline: none;
    box-shadow: 0 0 0 2px #de5b93;
}

/* Fade Out Animation (applied via JS) */
#growtification-container.growtification-fade-out {
    animation: growtification-fade-out 0.3s ease-out forwards;
}

@keyframes growtification-fade-out {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-20px);
    }
}

/* Mobile Styles */
@media (max-width: 480px) {
    #growtification-container {
        left: 10px;
        right: 10px;
        bottom: 10px;
        max-width: none;
    }

    .growtification-content {
        padding: 12px 14px;
    }

    .growtification-image {
        margin-right: 12px;
    }

    .growtification-image img {
        width: 44px;
        height: 44px;
    }

    .growtification-text {
        font-size: 13px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .growtification-content {
        border: 2px solid #000;
    }

    .growtification-close {
        border: 1px solid currentColor;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .growtification-content {
        animation: none;
    }

    #growtification-container.growtification-fade-out {
        animation: none;
        opacity: 0;
    }
}

/* Dark mode support (if theme supports) */
@media (prefers-color-scheme: dark) {
    /* Only apply if not explicitly overridden */
    .growtification-dark-mode .growtification-content {
        background: #2d2d2d;
        box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    }

    .growtification-dark-mode .growtification-name {
        color: #8ab4f8;
    }

    .growtification-dark-mode .growtification-text {
        color: #e8eaed;
    }

    .growtification-dark-mode .growtification-action,
    .growtification-dark-mode .growtification-price {
        color: #9aa0a6;
    }

    .growtification-dark-mode .growtification-product {
        color: #fff;
    }

    .growtification-dark-mode .growtification-close {
        color: #9aa0a6;
    }

    .growtification-dark-mode .growtification-close:hover {
        color: #e8eaed;
        background: #3c4043;
    }
}
