/**
 * Syncsity Proof Frontend Styles
 *
 * @package Syncsity_Proof
 * @since   1.0.0
 */

/* Notification Container */
.syncsity-proof-container {
    position: fixed;
    z-index: 999999;
    width: 100%;
    pointer-events: none;
    max-width: 280px; /* Narrower to reduce whitespace */
}

/* Container Positions */
.syncsity-proof-bottom-left {
    bottom: 20px;
    left: 20px;
}

.syncsity-proof-bottom-right {
    bottom: 20px;
    right: 20px;
}

.syncsity-proof-top-left {
    top: 20px;
    left: 20px;
}

.syncsity-proof-top-right {
    top: 20px;
    right: 20px;
}

/* Notification Item */
.syncsity-proof-notification {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 8px; /* Even less rounded corners */
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    margin-bottom: 8px; /* Further reduced margin */
    display: flex; /* Change to flexbox for better control */
    align-items: center;
    pointer-events: auto;
    max-width: 100%;
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease-in-out;
    font-size: 13px;
    line-height: 1.2; /* Even tighter line height */
    color: #333;
    padding: 6px 10px; /* Further reduced padding */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    border-left: 3px solid #826CDE;
}

.syncsity-proof-notification.syncsity-proof-show {
    opacity: 1;
    transform: translateY(0);
}

.syncsity-proof-notification.syncsity-proof-hide {
    opacity: 0;
    transform: translateY(-20px);
}

/* Avatar - now used in flexbox layout */
.syncsity-proof-image {
    width: 36px; /* Even smaller avatar */
    height: 36px; /* Even smaller avatar */
    min-width: 36px; /* Prevent shrinking */
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    position: relative;
    overflow: hidden;
    border-radius: 50%;
    margin-right: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.syncsity-proof-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensure the image covers the container properly */
}

/* Content Container */
.syncsity-proof-content {
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0; /* Prevent overflow issues */
    gap: 1px; /* Even tighter spacing between elements */
    flex: 1; /* Take up remaining space */
}

/* Name and location row */
.syncsity-proof-name {
    font-weight: 600;
    font-size: 13px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 0;
    line-height: 1.1;
}

/* Bullet separator between name and city */
.syncsity-proof-city:before {
    content: '•';
    margin-right: 6px;
    color: #999;
}

.syncsity-proof-city {
    font-weight: normal;
    color: #555;
}

.syncsity-proof-action {
    font-size: 13px;
    color: #555;
    margin-top: 1px;
}

/* Time and powered-by container for horizontal alignment */
.syncsity-proof-time {
    font-size: 12px;
    color: #888;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 4px; /* Smaller gap */
    margin-top: 4px; /* Less space above */
    width: 100%;
}

/* Powered by text styling - positioned inline with time */
.syncsity-proof-powered-by {
    font-size: 11px;
    color: #888;
    display: inline-flex;
    align-items: center;
    margin: 0; /* Remove margin since it's now inline */
}

.syncsity-proof-powered-by a {
    color: #888;
    text-decoration: none;
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
}

.syncsity-proof-powered-by a:hover {
    color: #555;
}

/* Hide powered by text when disabled */
.syncsity-proof-hide-powered-by .syncsity-proof-powered-by {
    display: none;
}

/* Lightning bolt icon before powered by text - keeping only one */
.syncsity-proof-powered-by a:before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 4px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><path fill="%23f39c12" d="M296 160H180.6l42.6-129.8C227.2 15 215.7 0 200 0H56C44 0 33.8 8.9 32.2 20.8l-32 240C-1.7 275.2 9.5 288 24 288h118.7L96.6 482.5c-3.6 15.2 8 29.5 23.3 29.5 8.4 0 16.4-4.4 20.8-12l176-304c9.3-15.9-2.2-36-20.7-36z"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
}

/* Clock icon for time */
.syncsity-proof-time::before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="%23888888" d="M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm0 448c-110.5 0-200-89.5-200-200S145.5 56 256 56s200 89.5 200 200-89.5 200-200 200zm61.8-104.4l-84.9-61.7c-3.1-2.3-4.9-5.9-4.9-9.7V116c0-6.6 5.4-12 12-12h32c6.6 0 12 5.4 12 12v141.7l66.8 48.6c5.4 3.9 6.5 11.4 2.6 16.8L334.6 349c-3.9 5.3-11.4 6.5-16.8 2.6z"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    margin-right: 2px;
    vertical-align: text-top;
}

/* Name styling */
.syncsity-proof-name {
    display: block;
    font-weight: 600;
    font-size: 15px;
    line-height: 1.2;
    color: #333;
    margin-bottom: 2px;
}

/* Action text styling */
.syncsity-proof-action {
    display: block;
    font-size: 14px;
    line-height: 1.4;
    color: #555;
    margin-top: 4px;
}

/* City styling */
.syncsity-proof-city {
    font-size: 12px;
    color: #888;
    display: inline;
    margin-left: 3px;
}

/* Close Button */
.syncsity-proof-close {
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    font-size: 18px;
    color: #aaa;
    cursor: pointer;
    position: absolute;
    top: 5px;
    right: 5px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.syncsity-proof-close:hover {
    opacity: 1;
}

/* Message Content */
.syncsity-proof-message {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
    color: #333;
}

.syncsity-proof-message-line {
    display: block;
}

.syncsity-proof-message-line-1 {
    font-weight: 600;
}

.syncsity-proof-message-line-2 {
    font-weight: normal;
}

/* Link Styling */
.syncsity-proof-link {
    color: inherit;
    text-decoration: none;
    display: block;
    cursor: pointer;
}

.syncsity-proof-link:hover .syncsity-proof-message {
    text-decoration: underline;
}

/* Notification Types Styling */
.syncsity-proof-type-woocommerce_sales {
    border-left: 3px solid #7f54b3; /* WooCommerce Purple */
}

.syncsity-proof-type-user_registrations {
    border-left: 3px solid #4CAF50; /* Green */
}

.syncsity-proof-type-custom {
    border-left: 3px solid #2196F3; /* Blue */
}

.syncsity-proof-type-live_viewers {
    border-left: 3px solid #FF9800; /* Orange */
}

.syncsity-proof-type-product_viewers {
    border-left: 3px solid #E91E63; /* Pink */
}

/* Animations */
@keyframes syncsityProofFadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.syncsity-proof-animation-fadein {
    animation: syncsityProofFadeInUp 0.3s ease-out forwards;
}

.syncsity-proof-animation-fadeout {
    animation: syncsityProofFadeOutDown 0.3s ease-in forwards;
}

/* Responsive Styles */
@media only screen and (max-width: 480px) {
    .syncsity-proof-container {
        max-width: calc(100% - 20px);
        left: 10px;
        right: 10px;
        bottom: 10px;
    }
    
    .syncsity-proof-bottom-left,
    .syncsity-proof-bottom-right {
        bottom: 10px;
    }
    
    .syncsity-proof-top-left,
    .syncsity-proof-top-right {
        top: 10px;
    }
    
    .syncsity-proof-notification {
        width: 100%;
    }
}
