/* alzak_app/static/css/notifications.css */

/* Анимации появления/исчезновения */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

/* Основные стили уведомлений */
.notifications-enter {
    animation: slideIn 0.3s ease-out;
}

.notifications-leave {
    animation: slideOut 0.2s ease-in;
}

.notification-badge {
    transition: transform 0.2s;
}

.notification-badge:hover {
    transform: scale(1.1);
}

/* Стили для разных типов уведомлений */
.notification-order {
    border-left: 4px solid #4F46E5;
}

.notification-defect {
    border-left: 4px solid #EF4444;
}

.notification-print {
    border-left: 4px solid #F59E0B;
}

/* Адаптивность для iPad Air 4 */
@media (min-width: 820px) and (max-width: 1180px) {
    .notifications-panel {
        max-width: 400px;
        right: 1rem;
    }
    
    .notifications-list {
        max-height: 60vh;
    }
    
    /* Оптимизация для горизонтальной ориентации */
    @media (orientation: landscape) {
        .notifications-panel {
            height: 90vh;
        }
        
        .notifications-list {
            max-height: 75vh;
        }
    }
}

/* Оптимизация для мобильных устройств */
@media (max-width: 819px) {
    .notifications-panel {
        width: 100%;
        max-width: none;
        right: 0;
    }
    
    .notification-item {
        padding: 1rem 0.75rem;
    }
    
    .notification-actions {
        padding: 0.5rem;
    }
}

/* Стили для непрочитанных уведомлений */
.notification-unread {
    background-color: rgb(239 246 255);
}

/* Анимация колокольчика */
@keyframes bell-ring {
    0% { transform: rotate(0); }
    20% { transform: rotate(10deg); }
    40% { transform: rotate(-10deg); }
    60% { transform: rotate(5deg); }
    80% { transform: rotate(-5deg); }
    100% { transform: rotate(0); }
}

.bell-animation {
    animation: bell-ring 0.5s ease;
}

/* Стили для счетчика */
.notification-badge {
    transition: all 0.3s ease;
}

.notification-badge.has-notifications {
    transform: scale(1.1);
}

.notification-unread:hover {
    background-color: rgb(219 234 254);
}

/* Анимация бейджа с количеством */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

.badge-pulse {
    animation: pulse 1s ease-in-out;
}

/* Полоса прокрутки */
.notifications-list::-webkit-scrollbar {
    width: 6px;
}

.notifications-list::-webkit-scrollbar-track {
    background: rgb(243 244 246);
    border-radius: 3px;
}

.notifications-list::-webkit-scrollbar-thumb {
    background: rgb(156 163 175);
    border-radius: 3px;
}

.notifications-list::-webkit-scrollbar-thumb:hover {
    background: rgb(107 114 128);
}

/* Стили для затемнения фона */
.notifications-backdrop {
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

/* Тени для улучшения читаемости */
.notification-item {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.notifications-panel {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 
                0 2px 4px -1px rgba(0, 0, 0, 0.06);
    position: absolute;
    top: 100%;
    margin-top: 0.5rem;
    right: 0;
    z-index: 50;
}