/**
 * TripDust Social Proof - Unified Styles
 *
 * @package TripDust_Suite
 * @since 1.0.0
 */

/* ========================================
   CSS VARIABLES
   ======================================== */
:root {
    --td-sp-primary: #1e3a5f;
    --td-sp-accent: #f59e0b;
    --td-sp-white: #ffffff;
    --td-sp-gray-100: #f7fafc;
    --td-sp-gray-200: #edf2f7;
    --td-sp-gray-400: #a0aec0;
    --td-sp-gray-500: #718096;
    --td-sp-gray-700: #4a5568;
    --td-sp-gray-900: #1a202c;
    --td-sp-spacing-sm: 8px;
    --td-sp-spacing: 12px;
    --td-sp-spacing-lg: 16px;
    --td-sp-spacing-xl: 24px;
    --td-sp-radius: 8px;
    --td-sp-radius-full: 50%;
    --td-sp-shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --td-sp-shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* ========================================
   NOTIFICATION CONTAINER
   ======================================== */
.td-social-proof {
    position: fixed;
    z-index: 9999;
    max-width: 380px;
    animation: tdspSlideIn 0.5s ease-out;
}

/* Position variants */
.td-social-proof-bottom-left {
    bottom: var(--td-sp-spacing-xl);
    left: var(--td-sp-spacing-lg);
    animation-name: tdspSlideInLeft;
}

.td-social-proof-bottom-right {
    bottom: var(--td-sp-spacing-xl);
    right: var(--td-sp-spacing-lg);
    animation-name: tdspSlideInRight;
}

.td-social-proof-top-left {
    top: var(--td-sp-spacing-xl);
    left: var(--td-sp-spacing-lg);
    animation-name: tdspSlideInLeft;
}

.td-social-proof-top-right {
    top: var(--td-sp-spacing-xl);
    right: var(--td-sp-spacing-lg);
    animation-name: tdspSlideInRight;
}

/* ========================================
   NOTIFICATION CARD
   ======================================== */
.td-proof-notification {
    display: flex;
    align-items: center;
    gap: var(--td-sp-spacing);
    background: var(--td-sp-white);
    border: 1px solid var(--td-sp-gray-200);
    border-left: 4px solid var(--td-sp-accent);
    border-radius: var(--td-sp-radius);
    padding: var(--td-sp-spacing);
    box-shadow: var(--td-sp-shadow-lg);
    cursor: pointer;
    transition: all 0.3s ease;
}

.td-proof-notification:hover {
    box-shadow: var(--td-sp-shadow-xl);
    transform: translateY(-2px);
}

/* Avatar */
.td-proof-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--td-sp-radius-full);
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--td-sp-accent), #d97706);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--td-sp-white);
    font-size: 18px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Content */
.td-proof-content {
    flex: 1;
    min-width: 0;
}

.td-proof-text {
    font-size: 14px;
    color: var(--td-sp-gray-900);
    line-height: 1.4;
    margin-bottom: 4px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.td-proof-text strong {
    font-weight: 700;
    color: var(--td-sp-primary);
}

.td-proof-time {
    font-size: 12px;
    color: var(--td-sp-gray-500);
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.td-proof-time svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

/* Close button */
.td-proof-close {
    width: 24px;
    height: 24px;
    border-radius: var(--td-sp-radius-full);
    background: transparent;
    border: none;
    color: var(--td-sp-gray-400);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
    padding: 0;
}

.td-proof-close:hover {
    background: var(--td-sp-gray-100);
    color: var(--td-sp-gray-700);
}

.td-proof-close svg {
    width: 14px;
    height: 14px;
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes tdspSlideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes tdspSlideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Default animation for backwards compatibility */
@keyframes tdspSlideIn {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 900px) {
    .td-social-proof {
        left: var(--td-sp-spacing) !important;
        right: var(--td-sp-spacing) !important;
        max-width: none;
        bottom: 100px !important; /* Above mobile sticky elements */
        top: auto !important;
    }

    .td-social-proof-top-left,
    .td-social-proof-top-right {
        top: auto !important;
        bottom: 100px !important;
    }
}

@media (max-width: 640px) {
    .td-proof-notification {
        padding: var(--td-sp-spacing-sm);
    }

    .td-proof-avatar {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .td-proof-text {
        font-size: 13px;
    }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    .td-social-proof,
    .td-proof-notification {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (prefers-contrast: high) {
    .td-proof-notification {
        border-width: 2px;
    }
}

/* Focus visible for accessibility */
.td-proof-close:focus-visible {
    outline: 2px solid var(--td-sp-accent);
    outline-offset: 2px;
}
