/* notification-icon.component.scss */
.notification-wrapper {
    position: relative;
    display: inline-block;
}

.notification-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;

    &:hover {
        background: rgba(0, 0, 0, 0.05);
        transform: scale(1.05);
    }

    &.active {
        background: rgba(59, 130, 246, 0.1);
        color: #3b82f6;
    }
}

.bell-icon {
    width: 24px;
    height: 24px;
    color: #6b7280;
    transition: color 0.3s ease;

    .notification-icon:hover & {
        color: #374151;
    }

    .notification-icon.active & {
        color: #3b82f6;
    }
}

.notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #ef4444;
    color: white;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    padding: 4px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);

    &.pulse {
        animation: pulse 2s infinite;
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 4px 8px rgba(239, 68, 68, 0.5);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
    }
}

.notification-dropdown {
    position: absolute;
    top: 100%;
    width: 360px;
    max-height: 480px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    overflow: hidden;
    transform: translateY(-10px);
    /*opacity: 0;*/
    /*visibility: hidden;*/
    transition: all 0.3s ease;

    &.open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
}

.dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #f3f4f6;
    background: #f9fafb;

    h3 {
        margin: 0;
        font-size: 16px;
        font-weight: 600;
        color: #111827;
    }
}

.clear-all-btn {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 14px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;

    &:hover {
        background: #e5e7eb;
        color: #374151;
    }
}

.notification-list {
    max-height: 400px;
    overflow-y: auto;

    &::-webkit-scrollbar {
        width: 6px;
    }

    &::-webkit-scrollbar-track {
        background: #f1f5f9;
    }

    &::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 3px;

        &:hover {
            background: #94a3b8;
        }
    }
}

.notification-item {
    position: relative;
    padding: 16px 20px;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.2s ease;

    &:hover {
        background: #f9fafb;
    }

    &:last-child {
        border-bottom: none;
    }

// Types de notifications
&.notification-success {
    border-left: 4px solid #10b981;
}

    &.notification-warning {
        border-left: 4px solid #f59e0b;
    }

    &.notification-error {
        border-left: 4px solid #ef4444;
    }

    &.notification-info {
        border-left: 4px solid #3b82f6;
    }
}

.notification-content {
    padding-right: 32px;
}

.notification-title {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 4px;
    line-height: 1.4;
}

.notification-message {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.4;
    margin-bottom: 6px;
}

.notification-time {
    font-size: 12px;
    color: #9ca3af;
}

.remove-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    transition: all 0.2s ease;

    &:hover {
        background: #f3f4f6;
        color: #6b7280;
    }

    svg {
        width: 14px;
        height: 14px;
        stroke-width: 2;
    }
}

.notification-cta {
    display: inline-block;
    margin-top: 8px;
    padding: 4px 12px;
    background: #3b82f6;
    color: white;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    border-radius: 6px;
    transition: background-color 0.2s ease;

    &:hover {
        background: #2563eb;
        text-decoration: none;
    }
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #9ca3af;

    .empty-icon {
        width: 48px;
        height: 48px;
        margin-bottom: 12px;
        stroke-width: 1.5;
    }

    p {
        margin: 0;
        font-size: 14px;
    }
}

// Responsive
@media (max-width: 480px) {
    .notification-dropdown {
        width: 320px;
        right: -10px;
    }

    .notification-item {
        padding: 12px 16px;
    }

    .dropdown-header {
        padding: 12px 16px;
    }
}

// Animation pour le slide down
@keyframes slideDown {
    from {
        transform: translateY(-10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

// Classes utilitaires pour l'animation
.slide-enter {
    animation: slideDown 0.3s ease-out;
}

// Dark mode (optionnel)
@media (prefers-color-scheme: dark) {
    .notification-dropdown {
        background: #1f2937;
        border-color: #374151;
    }

    .dropdown-header {
        background: #111827;
        border-color: #374151;

        h3 {
            color: #f9fafb;
        }
    }

    .clear-all-btn {
        color: #9ca3af;

        &:hover {
            background: #374151;
            color: #d1d5db;
        }
    }

    .notification-item {
        border-color: #374151;

        &:hover {
            background: #111827;
        }
    }

    .notification-title {
        color: #f9fafb;
    }

    .notification-message {
        color: #d1d5db;
    }

    .remove-btn {
        color: #6b7280;

        &:hover {
            background: #374151;
            color: #9ca3af;
        }
    }

    .empty-state {
        color: #6b7280;
    }
}
