/* gipix-notifications.css — dropdown уведомлений в шапке.
   Вынесено из templates/_notifications.html. */
.notif-dropdown {
    width: 420px;
    max-width: 92vw;
    padding: 0;
    border: none;
    border-radius: 14px;
    box-shadow: var(--md-elevation-8, 0 16px 40px rgba(0,0,0,0.18));
    overflow: hidden;
}

.notif-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--md-gray-200, #e5e7eb);
    background: linear-gradient(180deg, var(--md-gray-50, #fafafa), #fff);
}

.notif-header h6 {
    font-weight: 600;
    color: var(--md-gray-800, #1f2937);
}

.notif-header .badge {
    background: var(--md-primary, #1976d2);
    color: #fff;
}

.notif-list {
    max-height: 520px;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

.notif-list::-webkit-scrollbar { width: 6px; }
.notif-list::-webkit-scrollbar-track { background: var(--md-gray-100, #f3f4f6); border-radius: 3px; }
.notif-list::-webkit-scrollbar-thumb { background: var(--md-gray-400, #9ca3af); border-radius: 3px; }
.notif-list::-webkit-scrollbar-thumb:hover { background: var(--md-gray-500, #6b7280); }

.notif-item {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--md-gray-100, #f3f4f6);
    position: relative;
    background: #fff;
    transition: background-color 0.2s ease;
}

.notif-item:hover { background-color: var(--md-gray-50, #f9fafb); }
.notif-item:hover .notif-title { color: var(--md-gray-800, #1f2937); }
.notif-item:hover .notif-message { color: var(--md-gray-700, #374151); }
.notif-item:last-child { border-bottom: none; }

.notif-item.info { border-left: 4px solid var(--md-primary, #1976d2); }
.notif-item.success { border-left: 4px solid var(--md-success, #2e7d32); }
.notif-item.warning { border-left: 4px solid var(--md-warning, #ed6c02); }
.notif-item.danger { border-left: 4px solid var(--md-danger, #d32f2f); }

.notif-avatar { flex: 0 0 40px; }
.avatar-img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.avatar-placeholder {
    width: 40px; height: 40px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--md-gray-100, #f3f4f6);
    color: var(--md-gray-600, #6b7280);
}

.notif-content { flex: 1 1 auto; min-width: 0; }
.notif-title { font-weight: 600; color: var(--md-gray-800, #1f2937); }
.notif-message {
    font-size: 0.92rem;
    color: var(--md-gray-600, #6b7280);
    line-height: 1.5;
    word-wrap: break-word;
}

.notif-message .notif-link {
    color: var(--md-primary, #1976d2);
    text-decoration: underline;
    font-weight: 500;
    transition: color 0.2s ease;
}
.notif-message .notif-link:hover {
    color: var(--md-primary-dark, #1565c0);
    text-decoration: underline;
}

.notif-action { font-weight: 600; color: var(--md-primary, #1976d2); text-decoration: none; }
.notif-action:hover { text-decoration: underline; }

.notif-close {
    position: absolute;
    top: 8px; right: 8px;
    border: none; background: transparent;
    color: var(--md-gray-500, #9ca3af);
    padding: 4px; border-radius: 6px;
}
.notif-close:hover { background: var(--md-gray-100, #f3f4f6); color: var(--md-danger, #d32f2f); }

.notif-empty { text-align: center; padding: 32px 16px; color: var(--md-gray-600, #6b7280); }
.notif-empty .material-icons { color: var(--md-gray-400, #9ca3af); font-size: 28px; }

.notif-icon .material-icons { font-size: 26px; }
.notif-icon:hover { opacity: 0.85; }

.notif-permanent-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    color: var(--md-gray-500);
    font-size: 14px;
    opacity: 0.6;
}

.notif-footer {
    padding: 10px 16px;
    border-top: 1px solid var(--md-gray-200);
    background: var(--md-gray-50);
    position: sticky;
    bottom: 0;
    z-index: 10;
}

.notif-footer .btn { transition: all 0.2s ease; }
.notif-footer .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.notif-item.priority-high {
    border-left-width: 4px;
    background: rgba(220, 53, 69, 0.02);
}
.notif-item.priority-medium { border-left-width: 3px; }
.notif-item.priority-low { border-left-width: 2px; opacity: 0.9; }

@keyframes notifSlideIn {
    0% { opacity: 0; transform: translateX(100%); }
    100% { opacity: 1; transform: translateX(0); }
}
.notif-item.new { animation: notifSlideIn 0.3s ease-out; }

@keyframes notifFadeInUp {
    0% { opacity: 0; transform: translateY(6px); }
    100% { opacity: 1; transform: translateY(0); }
}
.notif-fade-in { animation: notifFadeInUp .25s ease-out both; }

@keyframes notifFadeOut {
    to { opacity: 0; transform: translateY(-6px); height: 0; margin: 0; padding-top: 0; padding-bottom: 0; }
}
.notif-fade-out { animation: notifFadeOut .22s ease-in forwards; }

@keyframes shakeAnim {
    10%, 90% { transform: translateX(-1px); }
    20%, 80% { transform: translateX(2px); }
    30%, 50%, 70% { transform: translateX(-4px); }
    40%, 60% { transform: translateX(4px); }
}
.shake { animation: shakeAnim .45s linear; }

@media (max-width: 768px) {
    .notif-dropdown { width: calc(100vw - 24px); border-radius: 12px; }
}
