﻿/* Desktop Notification Bell Icon */
.desktop-notification-trigger {
    position: relative;
}

    .desktop-notification-trigger .lnk-menu {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Desktop badge styling */
    .desktop-notification-trigger .notification-badge {
        position: absolute;
        top: 0;
        left: calc(100% - 25px);
        background: #ef4444;
        color: white;
        font-size: 17px;
        font-weight: bold;
        min-width: 18px;
        height: 18px;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 1rem 0.5rem;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    }

        .desktop-notification-trigger .notification-badge.hidden {
            display: none !important;
        }

/* Hide desktop bell on mobile/tablet, show mobile bell */
@media (max-width: 1000px) {
    .desktop-notification-trigger {
        display: none !important;
    }
}

/* Mobile Notification Bell Wrapper */
#mobile-notification-bell {
    display: none; /* Hide by default on desktop */
    width: 32px;
    height: 32px;
    position: relative;
    z-index: calc(var(--z-index-mobile-menu) + 5);
}

/* Show on mobile/tablet */
@media (max-width: 1000px) {
    #mobile-notification-bell {
        display: flex;
        align-items: center;
        justify-content: center;
        /* order and margin are set in layout-common.css */
    }
}

/* Notification Menu Container */
.notification-menu {
    position: relative;
    display: inline-block;
    width: 100%;
    height: 100%;
}

.notification-menu-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #1775FF;
    box-shadow: 0 2px 10px rgba(79, 70, 229, 0.3);
    transition: all 0.3s ease;
    padding: 0;
}

    .notification-menu-toggle:hover {
        background-color: #1565D8;
        transform: scale(1.05);
    }

    .notification-menu-toggle .lnk-menu {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        transition: color 0.3s ease;
        width: 100%;
        height: 100%;
    }

        .notification-menu-toggle .lnk-menu i {
            font-size: 16px;
        }

        .notification-menu-toggle .lnk-menu:hover {
            color: white;
        }

/* Unread Badge */
.notification-badge {
    position: absolute;
    top: -5px;
    left: calc(100% - 12px);
    background: #ef4444;
    color: white;
    font-size: 14px;
    font-weight: bold;
    min-width: 16px;
    height: 16px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 0.6rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

    .notification-badge.hidden {
        display: none !important;
    }

/* Notification Overlay */
.notification-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

    .notification-overlay.active {
        opacity: 1;
        visibility: visible;
    }

/* Notification Side Panel */
.notification-side-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 420px;
    max-width: 90vw;
    background: white;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

    .notification-side-panel.active {
        transform: translateX(0);
    }

/* Panel Header */
.notification-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1.25rem;
    border-bottom: 2px solid #e5e7eb;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.notification-panel-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    color: white;
}

.notification-panel-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 2.25rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

    .notification-panel-close:hover {
        background: rgba(255, 255, 255, 0.3);
        transform: rotate(90deg);
    }

.mark-all-read-btn {
    background: none;
    border: none;
    color: #3b82f6;
    font-size: 2rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    margin-left: auto;
}

    .mark-all-read-btn:hover {
        background-color: #eff6ff;
    }

/* Filter Tabs */
.notification-filter-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid #e5e7eb;
    margin-top: 0.25rem;
    gap: 1rem;
}

.filter-tab {
    flex: 1;
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid #d1d5db;
    color: #6b7280;
    font-size: 1.5rem;
    font-weight: 500;
    border-radius: 4rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .filter-tab:hover {
        background-color: #f9fafb;
        border-color: #3b82f6;
    }

    .filter-tab.active {
        background-color: #3b82f6;
        color: white;
        border-color: #3b82f6;
    }

/* Notifications List */
.notification-list {
    overflow-y: auto;
    flex: 1;
    height: 100%;
}

.notification-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 0;
}

.notification-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    text-align: center;
}

    .notification-empty.hidden {
        display: none !important;
    }

/* Notification Items */
.notifications-container {
    padding: 0;
}

.notification-item {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    transition: background-color 0.2s ease;
    position: relative;
}

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

    .notification-item.unread {
        background-color: #eff6ff;
    }

        .notification-item.unread::before {
            content: '';
            position: absolute;
            left: 0;
            top: 0;
            bottom: 0;
            width: 4px;
            background-color: #3b82f6;
        }

.notification-icon-wrapper {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

    /* Notification Type Colors */
    .notification-icon-wrapper.info {
        background-color: #dbeafe;
        color: #3b82f6;
    }

    .notification-icon-wrapper.alert {
        background-color: #fee2e2;
        color: #ef4444;
    }

    .notification-icon-wrapper.success {
        background-color: #d1fae5;
        color: #10b981;
    }

    .notification-icon-wrapper.offer {
        background-color: #fef3c7;
        color: #f59e0b;
    }

    .notification-icon-wrapper.event {
        background-color: #e9d5ff;
        color: #a855f7;
    }

    .notification-icon-wrapper.payment {
        background-color: #d1fae5;
        color: #059669;
    }

    .notification-icon-wrapper.reservation {
        background-color: #dbeafe;
        color: #0284c7;
    }

.notification-content {
    flex: 1;
    min-width: 0;
    padding-right: 3rem;
}

.notification-item-title {
    font-size: 1.5rem;
    text-align: left;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 0.25rem 0;
    line-height: 1.4;
}

.notification-item-body {
    font-size: 1.4rem;
    text-align: left;
    color: #6b7280;
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notification-item-time {
    font-size: 1.3rem;
    color: #9ca3af;
    display: flex;
}

.notification-mark-read {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 1.9rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    opacity: 0.5;
    transition: all 0.2s ease;
}

.notification-item:hover .notification-mark-read {
    opacity: 1;
}

.notification-mark-read:hover {
    color: #3b82f6;
    background-color: #eff6ff;
}

/* Always show mark-read button for unread notifications */
.notification-item.unread .notification-mark-read {
    opacity: 0.7;
}

.notification-item.unread:hover .notification-mark-read {
    opacity: 1;
}

/* Footer */
.notification-footer {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

.view-all-link {
    color: #3b82f6;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

    .view-all-link:hover {
        color: #2563eb;
        text-decoration: underline;
    }

/* Mobile Responsive */
@media (max-width: 768px) {
    .notification-side-panel {
        width: 100%;
        max-width: 100vw;
    }

    .notification-panel-title {
        font-size: 1.75rem;
    }

    .filter-tab {
        font-size: 1.4rem;
        padding: 0.4rem 0.75rem;
    }

    .mark-all-read-btn {
        font-size: 1.75rem;
    }

    .notification-filter-tabs,
    .notification-item {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .notification-icon-wrapper {
        width: 36px;
        height: 36px;
        font-size: 1.5rem;
    }

    .notification-item-title {
        font-size: 1.5rem;
    }

    .notification-item-body {
        font-size: 1.25rem;
    }

    .notification-item-time {
        font-size: 1.2rem;
    }
}

/* Scrollbar Styling */
.notification-list::-webkit-scrollbar {
    width: 6px;
}

.notification-list::-webkit-scrollbar-track {
    background: #f3f4f6;
}

.notification-list::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

    .notification-list::-webkit-scrollbar-thumb:hover {
        background: #9ca3af;
    }

/* Prevent body scroll when panel is open - applied via JS */
body.notification-panel-open {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
}

html.notification-panel-open {
    overflow: hidden !important;
}
