/* ========== КОНТЕЙНЕР УВЕДОМЛЕНИЙ ========== */
.notification-container {
    position: fixed;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.notification-container-top-right {
    top: 80px;
    right: 20px;
}

/* ========== УВЕДОМЛЕНИЕ ========== */
.notification {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    color: white;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.3s ease;
    max-width: 350px;
    min-width: 250px;
    backdrop-filter: blur(10px);
    pointer-events: auto;
    position: relative;
    overflow: hidden;
}

/* Прогресс-бар */
.notification::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    animation: progress 5s linear forwards;
}

@keyframes progress {
    from { width: 100%; }
    to { width: 0%; }
}

.notification:hover::before {
    animation-play-state: paused;
}

.notification-icon {
    font-size: 18px;
    font-weight: bold;
    flex-shrink: 0;
}

.notification-message {
    flex: 1;
    line-height: 1.4;
}

/* Крестик ТОЛЬКО для мобильных устройств */
.notification-close {
    display: none; /* Скрыт по умолчанию */
}

/* ============================================
   УВЕДОМЛЕНИЕ-ПОДТВЕРЖДЕНИЕ (CONFIRM)
   ============================================ */
.notification-confirm {
    background: linear-gradient(135deg, #17a2b8, #138496) !important;
    padding: 0 !important;
    min-width: 320px;
    max-width: 380px;
    border-radius: 12px !important;
}

.notification-confirm .notification-icon {
    display: none;
}

.notification-confirm .notification-message {
    display: block;
    text-align: center;
    padding: 18px 15px 14px;
    font-size: 14px;
    line-height: 1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.notification-buttons {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
}

.notification-btn {
    flex: 1;
    padding: 6px 16px;
    border: none;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    color: white;
    text-align: center;
}

/* Кнопка ДА (первая, справа) */
.notification-btn-confirm {
    background: #c20e00;
    order: 2;
}

.notification-btn-confirm:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-1px);
}

/* Кнопка ОТМЕНА (вторая, слева) */
.notification-btn-cancel {
    background: rgba(46, 192, 12, 0.3);
    order: 1;
}

.notification-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

/* Убираем прогресс-бар у confirm уведомлений */
.notification-confirm::before {
    display: none;
}
/* ============================================
   КОЛОКОЛЬЧИК УВЕДОМЛЕНИЙ
   ============================================ */
    .notification-bell-wrapper {
        position: relative;
    }

    .notification-bell {
        background: none;
        border: none;
        cursor: pointer;
        padding: 8px;
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #fff;
        transition: all 0.2s;
    }

    .notification-bell:hover {
        color: #e44c2c;
        transform: scale(1.05);
    }

    .notification-badge {
        position: absolute;
        top: 0;
        right: 0;
        background: #e44c2c;
        color: white;
        font-size: 10px;
        font-weight: bold;
        min-width: 18px;
        height: 18px;
        border-radius: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0 4px;
    }

    .notification-dropdown {
        position: absolute;
        top: 100%;
        right: 0;
        width: 350px;
        max-height: 400px;
        background: white;
        border-radius: 12px;
        box-shadow: 0 8px 24px rgba(0,0,0,0.15);
        z-index: 1000;
        display: none;
        overflow: hidden;
        flex-direction: column;
    }

    .notification-dropdown.show {
        display: flex;
    }

    .notification-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 16px;
        border-bottom: 1px solid #e0e0e0;
        background: #f8f9fa;
    }

    .notification-header span {
        font-weight: 600;
        color: #333;
    }

    .mark-all-read {
        background: none;
        border: none;
        color: #007bff;
        font-size: 12px;
        cursor: pointer;
    }

    .mark-all-read:hover {
        text-decoration: underline;
    }

    .notification-list {
        overflow-y: auto;
        max-height: 350px;
    }

    .notification-item {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 16px;
        border-bottom: 1px solid #f0f0f0;
        transition: background 0.2s;
        cursor: pointer;
        text-decoration: none;
    }

    .notification-item:hover {
        background: #f8f9fa;
    }

    .notification-item.unread {
        background: #e8f4f8;
    }

    .notification-icon {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 18px;
    }

    .notification-icon.cart { background: #e8f5e9; }
    .notification-icon.favorite { background: #ffebee; }
    .notification-icon.order { background: #e3f2fd; }
    .notification-icon.system { background: #f3e5f5; }
    .notification-icon.promo { background: #fff8e1; }

    .notification-content {
        flex: 1;
    }

    .notification-title {
        font-weight: 600;
        font-size: 14px;
        color: #333;
        margin-bottom: 4px;
    }

    .notification-message {
        font-size: 12px;
        color: #666;
        margin-bottom: 4px;
    }

    .notification-time {
        font-size: 11px;
        color: #999;
    }

    .notification-empty {
        text-align: center;
        padding: 40px;
        color: #999;
        font-size: 14px;
    }

    @media (max-width: 500px) {
        .notification-dropdown {
            width: calc(100vw - 40px);
            right: -10px;
        }
    }
/* На мобильных устройствах */
@media (max-width: 768px) {
    .notification-confirm {
        min-width: 280px;
        max-width: 320px;
    }

    .notification-confirm .notification-message {
        padding: 16px 16px 12px;
        font-size: 13px;
    }

    .notification-buttons {
        gap: 10px;
        padding: 10px 14px;
    }

    .notification-btn {
        padding: 8px 12px;
        font-size: 13px;
    }
}

/* ========== МОБИЛЬНАЯ ВЕРСИЯ ========== */
@media (max-width: 768px) {
    .notification-container-top-right {
        left: 10px;
        right: 10px;
        top: 10px;
        bottom: auto;
    }
    
    .notification {
        max-width: none;
        width: 93%;
        min-width: auto;
        padding: 14px 16px;
        font-size: 15px;
        border-radius: 10px;
        cursor: default; /* Убираем курсор pointer на мобильных */
    }
    
    /* Показываем крестик только на мобильных */
    .notification-close {
        display: flex;
        background: none;
        border: none;
        color: inherit;
        font-size: 24px;
        cursor: pointer;
        padding: 0;
        margin: 0;
        margin-left: 8px;
        opacity: 0.7;
        transition: opacity 0.2s;
        flex-shrink: 0;
        width: 32px;
        height: 32px;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
    }
    
    .notification-close:active {
        opacity: 1;
        background: rgba(255, 255, 255, 0.2);
        transform: scale(0.95);
    }
    
    /* Убираем hover эффекты на мобильных */
    .notification:hover {
        transform: none;
    }
    
    /* Анимации для мобильных */
    @keyframes slideDown {
        from {
            transform: translateY(-100%);
            opacity: 0;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }
    
    @keyframes slideUp {
        from {
            transform: translateY(0);
            opacity: 1;
        }
        to {
            transform: translateY(-100%);
            opacity: 0;
        }
    }
}

/* Типы уведомлений */
.notification-success {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.notification-error {
    background: linear-gradient(135deg, #dc3545, #c82333);
}

.notification-warning {
    background: linear-gradient(135deg, #ffc107, #ff9800);
    color: #333;
}

.notification-info {
    background: linear-gradient(135deg, #17a2b8, #138496);
}

/* Анимации для десктопа */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Десктоп: клик по уведомлению закрывает его */
@media (min-width: 769px) {
    .notification {
        cursor: pointer;
    }
    
    .notification:active {
        transform: scale(0.98);
    }
}