/* Frontend Styles for Social Proof Notifications */

:root {
    --spn-bg-color: #f4f4f5;
    --spn-text-color: #18181b;
    --spn-icon-color: #16a34a;
    --spn-border-color: #e4e4e7;
    --spn-max-width: 480px;
    --spn-border-radius: 6px;
    --spn-box-padding: 20px;
    --spn-icon-size: 40px;
    --spn-title-size: 15px;
    --spn-description-size: 13px;
}

#spn-notification-container,
.spn-elementor-widget {
    position: fixed;
    z-index: 999999;
    max-width: var(--spn-max-width);
    width: calc(100% - 40px);
    margin: 20px;
}

.spn-elementor-widget:not([class*="spn-position-"]) {
    position: relative;
    z-index: 1;
    margin: 0;
    width: 100%;
}

/* Position variants */
#spn-notification-container.spn-position-bottom-left,
.spn-elementor-widget.spn-position-bottom-left {
    bottom: 0;
    left: 0;
}

#spn-notification-container.spn-position-bottom-right,
.spn-elementor-widget.spn-position-bottom-right {
    bottom: 0;
    right: 0;
}

#spn-notification-container.spn-position-top-left,
.spn-elementor-widget.spn-position-top-left {
    top: 0;
    left: 0;
}

#spn-notification-container.spn-position-top-right,
.spn-elementor-widget.spn-position-top-right {
    top: 0;
    right: 0;
}

/* Notification card */
.spn-notification {
    background: var(--spn-bg-color);
    border: 1px solid var(--spn-border-color);
    border-radius: var(--spn-border-radius);
    padding: var(--spn-box-padding);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: flex-start;
    gap: 16px;
    position: relative;
    animation: spnSlideIn 0.5s ease-out;
    transition: opacity 0.3s, transform 0.3s;
}

/* Box shadow variants */
.spn-box-shadow-small .spn-notification {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.spn-box-shadow-medium .spn-notification {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.spn-box-shadow-large .spn-notification {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.spn-box-shadow-none .spn-notification {
    box-shadow: none;
}

.spn-notification.spn-hiding {
    opacity: 0;
    transform: translateY(10px);
}

/* Animation for bottom positions */
.spn-position-bottom-left .spn-notification,
.spn-position-bottom-right .spn-notification {
    animation: spnSlideInBottom 0.5s ease-out;
}

.spn-position-bottom-left .spn-notification.spn-hiding,
.spn-position-bottom-right .spn-notification.spn-hiding {
    transform: translateY(10px);
}

/* Animation for top positions */
.spn-position-top-left .spn-notification,
.spn-position-top-right .spn-notification {
    animation: spnSlideInTop 0.5s ease-out;
}

.spn-position-top-left .spn-notification.spn-hiding,
.spn-position-top-right .spn-notification.spn-hiding {
    transform: translateY(-10px);
}

@keyframes spnSlideInBottom {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spnSlideInTop {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Icon */
.spn-notification-icon {
    width: var(--spn-icon-size);
    height: var(--spn-icon-size);
    border-radius: 50%;
    background: var(--spn-icon-color);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.spn-notification-icon svg {
    width: calc(var(--spn-icon-size) * 0.6);
    height: calc(var(--spn-icon-size) * 0.6);
}

/* Content */
.spn-notification-content {
    flex: 1;
    min-width: 0;
}

.spn-notification-title {
    font-size: var(--spn-title-size);
    font-weight: 600;
    color: var(--spn-text-color);
    line-height: 1.4;
    margin-bottom: 6px;
}

.spn-notification-description {
    font-size: var(--spn-description-size);
    color: var(--spn-text-color);
    opacity: 0.8;
    line-height: 1.5;
    margin-bottom: 6px;
}

.spn-notification-timestamp {
    font-size: 11px;
    color: var(--spn-text-color);
    opacity: 0.6;
    margin-bottom: 8px;
}

/* Rating stars */
.spn-notification-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
}

.spn-stars {
    display: flex;
    gap: 2px;
}

.spn-star {
    color: #fbbf24;
}

.spn-star-empty {
    color: #d1d5db;
}

.spn-rating-text {
    font-size: 12px;
    color: var(--spn-text-color);
    opacity: 0.7;
}

/* Close button */
.spn-notification-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    color: var(--spn-text-color);
    opacity: 0.4;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: opacity 0.2s;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spn-notification-close:hover {
    opacity: 0.8;
}

.spn-notification-close:focus {
    outline: 2px solid var(--spn-icon-color);
    outline-offset: 2px;
}

/* Mobile responsive */
@media screen and (max-width: 640px) {
    #spn-notification-container,
    .spn-elementor-widget[class*="spn-position-"] {
        max-width: 100%;
        width: calc(100% - 20px);
        margin: 10px;
    }
    
    .spn-notification {
        padding: 16px;
        gap: 12px;
    }
    
    .spn-notification-icon {
        width: 36px;
        height: 36px;
    }
    
    .spn-notification-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .spn-notification-title {
        font-size: 14px;
        margin-bottom: 4px;
        padding-right: 24px;
    }
    
    .spn-notification-description {
        font-size: 12px;
    }
    
    .spn-notification-close {
        top: 8px;
        right: 8px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .spn-notification {
        animation: none;
    }
    
    .spn-notification.spn-hiding {
        transition: opacity 0.1s;
        transform: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .spn-notification {
        border-width: 2px;
    }
}
