﻿/* public/css/components/header/notifications.css */

.notification-item {
    display: flex;
    padding: 1rem;
    gap: 1rem;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    position: relative;
    background: rgba(255, 255, 255, 0.4);
}

.notification-item:hover {
    background: rgba(255, 255, 255, 0.6);
    transform: translateY(-1px);
}

.notification-item.notification-unread {
    background: rgba(59, 130, 246, 0.08);
    /* Light blue tint */
    border-left: 3px solid #3b82f6;
}

.notification-unread-dot {
    width: 8px;
    height: 8px;
    background-color: #3b82f6;
    border-radius: 50%;
    position: absolute;
    top: 1.25rem;
    right: 1rem;
}

.notification-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Р—РјРµРЅСЊС€РµРЅРёР№ СЂРѕР·РјС–СЂ РґР»СЏ С…РµРґРµСЂСѓ */
.notification-icon.notification-icon--header {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.notification-icon.notification-icon--header i {
    font-size: 1rem;
}

/* Base icon colors */
.notification-icon.notif-icon-blue {
    background-color: #eff6ff;
    border-color: #dbeafe;
}

.notification-icon.notif-icon-blue i {
    color: #3b82f6;
}

.notification-icon.notif-icon-green {
    background-color: #f0fdf4;
    border-color: #dcfce7;
}

.notification-icon.notif-icon-green i {
    color: #22c55e;
}

.notification-icon.notif-icon-red {
    background-color: #fef2f2;
    border-color: #fee2e2;
}

.notification-icon.notif-icon-red i {
    color: #ef4444;
}

.notification-icon.notif-icon-yellow {
    background-color: #fefce8;
    border-color: #fef08a;
}

.notification-icon.notif-icon-yellow i {
    color: #eab308;
}

.notification-icon.notif-icon-gray {
    background-color: #f3f4f6;
    border-color: #e5e7eb;
}

.notification-icon.notif-icon-gray i {
    color: #6b7280;
}

.notification-icon i {
    font-size: 1.25rem;
    color: #4b5563;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 0.25rem;
    gap: 0.5rem;
}

.notification-title {
    font-weight: 600;
    font-size: 0.9375rem;
    color: #111827;
    line-height: 1.25;
}

.notification-time {
    font-size: 0.75rem;
    color: #6b7280;
    white-space: nowrap;
    margin-left: auto;
}

.notification-body {
    font-size: 0.875rem;
    color: #4b5563;
    line-height: 1.4;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Disable truncation in the header dropdown */
.header-dropdown .notification-body {
    -webkit-line-clamp: unset;
    line-clamp: unset;
    display: block;
    overflow: visible;
}

.notification-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.notif-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 1.25rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    cursor: pointer;
}

.notif-accept {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.notif-accept:hover {
    background: rgba(16, 185, 129, 0.2);
}

.notif-reject {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.notif-reject:hover {
    background: rgba(239, 68, 68, 0.2);
}

.notif-view {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.notif-view:hover {
    background: rgba(59, 130, 246, 0.2);
}

.notif-like_comment {
    background: rgba(244, 63, 94, 0.1);
    color: #f43f5e;
}

.notif-like_comment:hover {
    background: rgba(244, 63, 94, 0.2);
}

.notif-report_comment {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.notif-report_comment:hover {
    background: rgba(245, 158, 11, 0.2);
}

.notif-delete_comment {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.notif-delete_comment:hover {
    background: rgba(239, 68, 68, 0.2);
}

.notif-dismiss {
    background: #f3f4f6;
    color: #4b5563;
}

.notif-dismiss:hover {
    background: #e5e7eb;
}

.notif-edit {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.notif-edit:hover {
    background: rgba(59, 130, 246, 0.2);
}

.notif-cancel {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.notif-cancel:hover {
    background: rgba(239, 68, 68, 0.2);
}

.notif-status {
    font-size: 0.8125rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    margin-bottom: 0.375rem;
    padding: 0.125rem 0.625rem;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 6px;
    width: fit-content;
}

/* РџСЂРёС…РѕРІСѓРІР°РЅРЅСЏ С‚РµРєСЃС‚Сѓ СЃС‚Р°С‚СѓСЃСѓ РІ С…РµРґРµСЂС– */
.header-dropdown .notif-status .status-text {
    display: none;
}

.header-dropdown .notif-status {
    padding: 0;
    background: transparent;
    margin-bottom: 0.125rem;
}

.notif-status-success {
    color: #059669;
}

.notif-status-danger {
    color: #dc2626;
}

/* Page specific overrides */
main #notifications-container .notification-item {
    margin-bottom: 0.75rem;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: #fff;
    cursor: default;
    transform: none !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: stretch;
    padding-right: 0;
    padding-top: 0;
    padding-bottom: 0;
    overflow: hidden;
}

main #notifications-container .notification-item .notification-icon {
    margin-top: 1.25rem;
    margin-left: 1rem;
}

main #notifications-container .notification-item .notification-content {
    padding: 1rem;
}

/* Disable truncation on the main notifications page for all devices */
main #notifications-container .notification-body {
    -webkit-line-clamp: unset;
    line-clamp: unset;
    display: block;
    overflow: visible;
}

main #notifications-container .notification-item:hover {
    background: #fff;
    transform: none !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

main #notifications-container .notification-item.notification-unread {
    border: 2px solid transparent !important;
    background-origin: padding-box, padding-box, border-box;
    background-clip: padding-box, padding-box, border-box;
    background-image:
        linear-gradient(90deg, rgba(59, 130, 246, 0.05) 0%, rgba(59, 130, 246, 0.12) 50%, rgba(59, 130, 246, 0.05) 100%),
        linear-gradient(#fff, #fff),
        linear-gradient(135deg, #a855f7, #ec4899, #8b5cf6, #ec4899);

    background-size: 200% 100%, 100% 100%, 300% 300%;
    animation: shimmer-purple-border 3s infinite linear;
    box-shadow: 0 4px 6px -1px rgba(168, 85, 247, 0.5), 0 2px 4px -1px rgba(168, 85, 247, 0.1);
}

@keyframes shimmer-purple-border {
    0% {
        background-position: 100% 0, 0 0, 0% 50%;
    }

    50% {
        background-position: 0% 0, 0 0, 100% 50%;
    }

    100% {
        background-position: -100% 0, 0 0, 0% 50%;
    }
}

@keyframes shimmer-bg {
    0% {
        background-position: 100% 0;
    }

    100% {
        background-position: -100% 0;
    }
}

/* Read notification gradients */
main #notifications-container .notification-item.notif-item-blue:not(.notification-unread) {
    background: linear-gradient(to bottom, rgba(59, 130, 246, 0.3) 0%, rgba(255, 255, 255, 0) 30%);
}

main #notifications-container .notification-item.notif-item-green:not(.notification-unread) {
    background: linear-gradient(to bottom, rgba(34, 197, 94, 0.3) 0%, rgba(255, 255, 255, 0) 30%);
}

main #notifications-container .notification-item.notif-item-red:not(.notification-unread) {
    background: linear-gradient(to bottom, rgba(239, 68, 68, 0.3) 0%, rgba(255, 255, 255, 0) 30%);
}

main #notifications-container .notification-item.notif-item-yellow:not(.notification-unread) {
    background: linear-gradient(to bottom, rgba(234, 179, 8, 0.3) 0%, rgba(255, 255, 255, 0) 30%);
}

main #notifications-container .notification-item.notif-item-gray:not(.notification-unread) {
    background: linear-gradient(to bottom, rgba(107, 114, 128, 0.3) 0%, rgba(255, 255, 255, 0) 30%);
}

/* Sidebar container (reserved space) */
main #notifications-container .notification-sidebar {
    margin-top: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    gap: 0;
    width: 45px;
    min-height: 135px;
    /* Р РµР·РµСЂРІСѓС”РјРѕ 3 РјС–СЃС†СЏ РїРѕ 45px */
    height: auto;
    background: rgba(0, 0, 0, 0.01);
    border-left: 1px solid rgba(0, 0, 0, 0.03);
    position: relative;
    /* For absolute children */
}

/* Time styling (rotated) */
main #notifications-container .notification-sidebar .notification-time {
    writing-mode: vertical-lr;
    transform: rotate(180deg);
    white-space: nowrap;
    font-size: 0.75rem;
    color: #9ca3af;
    padding: 10px 0;
    text-align: center;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Actions container (sliding) */
main #notifications-container .notification-actions {
    position: absolute;
    top: 0;
    left: 0;
    margin: 0;
    gap: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    /* Align buttons to bottom of container if needed, or stretch */
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    /* Cover the time */
    z-index: 10;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

/* Slide in on hover (works on mobile tap too usually, or we can use :active) */
main #notifications-container .notification-item:hover .notification-actions {
    transform: translateX(0);
}

main #notifications-container .notif-action-btn {
    padding: 0;
    width: 100%;
    flex: 1;
    border-radius: 0;
    flex-shrink: 0;
}

.notif-user-link {
    color: #3b82f6;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.15s ease;
}

.notif-user-link:hover {
    color: #2563eb;
    text-decoration: underline;
}

.notif-quote {
    display: block;
    margin-top: 0.375rem;
    padding-left: 0.75rem;
    border-left: 2px solid rgba(59, 130, 246, 0.5);
    color: #6b7280;
    font-style: italic;
    font-size: 0.8125rem;
    line-height: 1.4;
}

@media (max-width: 639px) {
    #mark-all-read-btn span {
        display: none;
    }

    #mark-all-read-btn i {
        font-size: 1.25rem;
        margin-right: 0 !important;
    }

    /* Hide icons on mobile to save space */
    main #notifications-container .notification-item .notification-icon {
        display: none;
    }

    /* Smaller text and no truncation on mobile */
    main #notifications-container .notification-title {
        font-size: 0.875rem;
        /* 14px */
    }

    main #notifications-container .notification-body {
        font-size: 0.8125rem;
        /* 13px */
    }

    /* Приховуємо текст статусу на мобільних */
    main #notifications-container .notification-status .status-text {
        display: none;
    }

    main #notifications-container .notification-status {
        width: 24px;
        height: 24px;
        padding: 0;
        background: transparent;
        margin-bottom: 0.25rem;
    }
}

/* Показуємо текст статусу на ПК (Desktop) */
@media (min-width: 640px) {
    main #notifications-container .notification-status {
        width: auto !important;
        height: auto !important;
        padding: 4px 10px !important;
        border-radius: 6px !important;
        font-size: 0.8125rem !important;
        background: rgba(0, 0, 0, 0.05) !important;
    }

    main #notifications-container .notification-status .status-text {
        display: inline-block !important;
        margin-left: 4px !important;
    }
}