/**
 * Стили для системы уведомлений поставщика
 */

/* Счетчики уведомлений в меню */
.notification-counter {
    display: inline-block;
    background: #e74c3c;
    color: white;
    font-size: 11px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 8px;
    min-width: 18px;
    text-align: center;
    line-height: 1.2;
}

/* Контейнер уведомлений */
.notifications-container {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: white;
}

/* Элемент уведомления */
.notification-item {
    display: flex;
    align-items: flex-start;
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s ease;
    position: relative;
}

.notification-item:hover {
    background-color: #f8f9fa;
}

.notification-item.unread {
    background-color: #f0f8ff;
    border-left: 3px solid #007cba;
}

.notification-item:last-child {
    border-bottom: none;
}

/* Иконка уведомления */
.notification-icon {
    font-size: 20px;
    margin-right: 12px;
    margin-top: 2px;
    flex-shrink: 0;
}

/* Контент уведомления */
.notification-content {
    flex: 1;
    min-width: 0;
}

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

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

.notification-time {
    font-size: 11px;
    color: #999;
    font-style: italic;
}

/* Точка для непрочитанных уведомлений */
.notification-dot {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 8px;
    height: 8px;
    background: #e74c3c;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Состояние "нет уведомлений" */
.no-notifications {
    padding: 40px 20px;
    text-align: center;
    color: #999;
    font-style: italic;
}

/* Общий счетчик непрочитанных */
#unread-count {
    display: inline-block;
    background: #e74c3c;
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 1px 5px;
    border-radius: 8px;
    margin-left: 4px;
    min-width: 16px;
    text-align: center;
}

/* Анимации */
@keyframes notificationSlideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.notification-item {
    animation: notificationSlideIn 0.3s ease-out;
}

/* Адаптивность */
@media (max-width: 768px) {
    .notification-item {
        padding: 10px 12px;
    }
    
    .notification-icon {
        font-size: 18px;
        margin-right: 10px;
    }
    
    .notification-title {
        font-size: 13px;
    }
    
    .notification-message {
        font-size: 12px;
    }
    
    .notification-time {
        font-size: 10px;
    }
    
    .notification-counter {
        font-size: 10px;
        padding: 1px 5px;
        margin-left: 6px;
    }
}

/* Темная тема (если нужна) */
@media (prefers-color-scheme: dark) {
    .notifications-container {
        background: #2c2c2c;
        border-color: #444;
    }
    
    .notification-item {
        border-bottom-color: #444;
    }
    
    .notification-item:hover {
        background-color: #3c3c3c;
    }
    
    .notification-item.unread {
        background-color: #1a2332;
        border-left-color: #007cba;
    }
    
    .notification-title {
        color: #fff;
    }
    
    .notification-message {
        color: #ccc;
    }
    
    .notification-time {
        color: #999;
    }
    
    .no-notifications {
        color: #999;
    }
}

/* Стили для различных типов уведомлений */
.notification-item[data-type="order_status"] .notification-icon {
    color: #28a745;
}

.notification-item[data-type="pickup_point_status"] .notification-icon {
    color: #17a2b8;
}

.notification-item[data-type="payment_status"] .notification-icon {
    color: #ffc107;
}

.notification-item[data-type="photo_request_status"] .notification-icon {
    color: #6f42c1;
}

/* Анимация появления новых уведомлений */
@keyframes notificationPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.notification-item.new {
    animation: notificationPulse 0.6s ease-in-out;
}

/* Стили для модального окна уведомлений */
.notifications-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.notifications-modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.notifications-modal-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.notifications-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.notifications-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.notifications-modal-close:hover {
    background-color: #f0f0f0;
    color: #333;
}

.notifications-modal-body {
    padding: 0;
    max-height: 60vh;
    overflow-y: auto;
}

/* Кнопки действий */
.notification-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.notification-action-btn {
    background: #007cba;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.notification-action-btn:hover {
    background: #005a87;
}

.notification-action-btn.secondary {
    background: #6c757d;
}

.notification-action-btn.secondary:hover {
    background: #545b62;
}