/**
 * Notifications de confirmation - Style Crypto.com Pro
 * Notifications en temps réel avec photos de profil
 */

/* Container des notifications */
.live-notifications {
    position: fixed;
    top: 100px;
    left: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
    max-height: calc(100vh - 150px);
    overflow: hidden;
}

/* Notification individuelle */
.notification-popup {
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.98) 0%, rgba(10, 15, 28, 0.98) 100%);
    border: 1px solid rgba(56, 97, 251, 0.2);
    border-radius: 16px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 320px;
    max-width: 380px;
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        0 0 30px rgba(56, 97, 251, 0.1);
    animation: slideInNotification 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    pointer-events: auto;
    position: relative;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.notification-popup.hiding {
    animation: slideOutNotification 0.4s cubic-bezier(0.5, 0, 0.75, 0) forwards;
}

/* Animation d'entrée */
@keyframes slideInNotification {
    0% {
        opacity: 0;
        transform: translateX(-120px) scale(0.8);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

/* Animation de sortie */
@keyframes slideOutNotification {
    0% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateX(-80px) scale(0.8);
    }
}

/* Wrapper pour photo + emoji */
.notification-avatar-wrapper {
    position: relative;
    flex-shrink: 0;
}

/* Photo de profil */
.notification-photo {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(56, 97, 251, 0.5);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Emoji d'action sur la photo */
.notification-action-emoji {
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #1a1f2e, #0d1117);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    border: 2px solid rgba(56, 97, 251, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Avatar fallback (ancien style) */
.notification-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    flex-shrink: 0;
    position: relative;
}

.notification-avatar.green { background: linear-gradient(135deg, #0ECB81 0%, #0a9d63 100%); color: #fff; }
.notification-avatar.gold { background: linear-gradient(135deg, #F0B90B 0%, #c99b09 100%); color: #fff; }
.notification-avatar.blue { background: linear-gradient(135deg, #3861FB 0%, #2a4bc9 100%); color: #fff; }
.notification-avatar.red { background: linear-gradient(135deg, #F6465D 0%, #c4384a 100%); color: #fff; }
.notification-avatar.purple { background: linear-gradient(135deg, #8B5CF6 0%, #6d48c4 100%); color: #fff; }
.notification-avatar.cyan { background: linear-gradient(135deg, #06B6D4 0%, #0891B2 100%); color: #fff; }

/* Contenu de la notification */
.notification-content {
    flex: 1;
    min-width: 0;
}

/* Header avec nom et badges */
.notification-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.notification-name {
    font-weight: 700;
    font-size: 14px;
    color: #fff;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Badges */
.notification-badge {
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.notification-badge.expert {
    background: linear-gradient(135deg, #3861FB 0%, #1E40AF 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(56, 97, 251, 0.4);
}

.notification-badge.vip {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    color: #000;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

.notification-badge.pro {
    background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.4);
}

.notification-badge.elite {
    background: linear-gradient(135deg, #EC4899 0%, #DB2777 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(236, 72, 153, 0.4);
}

.notification-badge.trader {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}

.notification-badge.country {
    background: rgba(255, 255, 255, 0.1);
    color: #94A3B8;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Message de la notification */
.notification-message {
    font-size: 13px;
    color: #94A3B8;
    line-height: 1.4;
    margin-bottom: 6px;
}

.notification-message .amount {
    color: #10B981;
    font-weight: 800;
    font-size: 14px;
}

.notification-message .amount.withdraw {
    color: #F59E0B;
}

.notification-message .amount.invest {
    color: #3861FB;
}

.notification-message .amount.bonus {
    color: #EC4899;
}

/* Footer avec pays et temps */
.notification-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.notification-country {
    font-size: 12px;
    color: #64748B;
    display: flex;
    align-items: center;
    gap: 5px;
}

.notification-country .flag {
    font-size: 16px;
}

.notification-time {
    font-size: 11px;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 4px;
}

.notification-time i {
    font-size: 10px;
}

/* Bouton fermer */
.notification-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: #64748B;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    transition: all 0.2s ease;
    opacity: 0;
}

.notification-popup:hover .notification-close {
    opacity: 1;
}

.notification-close:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #EF4444;
}

/* Animation pulse pour montant */
@keyframes amountPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.9; transform: scale(1.02); }
}

.notification-message .amount {
    animation: amountPulse 2s ease-in-out infinite;
}

/* Indicateur live */
.notification-live-indicator {
    position: absolute;
    top: -3px;
    right: -3px;
    width: 12px;
    height: 12px;
    background: #10B981;
    border-radius: 50%;
    border: 2px solid #0d1117;
    animation: liveIndicatorPulse 1.5s ease-in-out infinite;
}

@keyframes liveIndicatorPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    50% { transform: scale(1.1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
}

/* Notification importante */
.notification-popup.important {
    border-color: rgba(245, 158, 11, 0.4);
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(245, 158, 11, 0.2),
        0 0 40px rgba(245, 158, 11, 0.15);
}

.notification-popup.important .notification-live-indicator {
    background: #F59E0B;
}

/* Responsive */
@media (max-width: 768px) {
    .live-notifications {
        top: 80px;
        left: 10px;
        right: 10px;
    }

    .notification-popup {
        min-width: unset;
        max-width: 100%;
        padding: 12px 14px;
    }

    .notification-photo {
        width: 44px;
        height: 44px;
    }

    .notification-action-emoji {
        width: 20px;
        height: 20px;
        font-size: 12px;
    }

    .notification-name {
        font-size: 13px;
    }

    .notification-message {
        font-size: 12px;
    }

    .notification-badge {
        font-size: 9px;
        padding: 2px 6px;
    }
}

/* Mode clair */
[data-theme="light"] .notification-popup {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.98) 100%);
    border-color: rgba(56, 97, 251, 0.15);
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.12),
        0 0 0 1px rgba(0, 0, 0, 0.05),
        0 0 30px rgba(56, 97, 251, 0.08);
}

[data-theme="light"] .notification-name {
    color: #1E293B;
}

[data-theme="light"] .notification-message {
    color: #475569;
}

[data-theme="light"] .notification-country,
[data-theme="light"] .notification-time {
    color: #64748B;
}

[data-theme="light"] .notification-close {
    background: rgba(0, 0, 0, 0.05);
    color: #64748B;
}

[data-theme="light"] .notification-close:hover {
    background: rgba(239, 68, 68, 0.1);
}

[data-theme="light"] .notification-action-emoji {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border-color: rgba(56, 97, 251, 0.2);
}

[data-theme="light"] .notification-live-indicator {
    border-color: #fff;
}

/* ==========================================
   MARKET NOTIFICATIONS - Crypto Price Alerts
   ========================================== */

.notification-popup.market {
    border-color: rgba(16, 185, 129, 0.3);
}

.notification-popup.market.positive {
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(16, 185, 129, 0.15),
        0 0 30px rgba(16, 185, 129, 0.1);
}

.notification-popup.market.negative {
    border-color: rgba(239, 68, 68, 0.3);
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(239, 68, 68, 0.15),
        0 0 30px rgba(239, 68, 68, 0.1);
}

.notification-avatar-wrapper.market {
    position: relative;
}

.crypto-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    border: 2px solid currentColor;
}

.notification-live-indicator.positive {
    background: #10B981;
}

.notification-live-indicator.negative {
    background: #EF4444;
}

.notification-badge.market {
    font-weight: 700;
    padding: 4px 10px;
}

.notification-badge.market.positive {
    background: rgba(16, 185, 129, 0.2);
    color: #10B981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.notification-badge.market.negative {
    background: rgba(239, 68, 68, 0.2);
    color: #EF4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.notification-message.market {
    color: #E2E8F0;
    font-weight: 500;
}

.notification-price {
    font-weight: 700;
    color: #F5A623;
    font-size: 13px;
}

/* Amount colors for different currencies */
.notification-message .amount {
    display: inline;
}

.notification-message .amount.bonus {
    color: #EC4899;
}
