/* =============================================
   Notification Bell & Panel Styles
   Modern Light Theme - #004f3c / #d3b890
   ============================================= */

.notification-bell-container {
    position: relative;
    display: inline-block;
}

.notification-bell-button {
    position: relative;
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.notification-bell-button:hover {
    background-color: rgba(211, 184, 144, 0.15);
}

.notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: red;
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 0.7rem;
    min-width: 18px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 79, 60, 0.2);
}

/* Notification Panel */
.notification-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 420px;
    max-width: 95vw;
    max-height: 600px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 79, 60, 0.12);
    border: 1px solid rgba(0, 79, 60, 0.08);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ✅ Mobile Fullscreen Mode */
.notification-panel.mobile-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    border: none;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

/* Panel Header */
.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(0, 79, 60, 0.08);
    background: linear-gradient(135deg, #ffffff 0%, #fafaf8 100%);
}

.notification-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #004f3c;
    letter-spacing: -0.02em;
}

.notification-header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-link {
    background: transparent;
    border: none;
    color: #004f3c;
    cursor: pointer;
    font-size: 0.875rem;
    padding: 6px 12px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    font-weight: 500;
}

.btn-link:hover {
    background-color: rgba(0, 79, 60, 0.06);
    color: #003d2e;
}

.btn-icon {
    background: transparent;
    border: none;
    color: black;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 1.25rem;
    line-height: 1;
    transition: all 0.2s;
}

.btn-icon:hover {
    background-color: rgba(0, 0, 0, 0.04);
    color: #333;
}

/* ✅ Mobile Fixed Close Button */
.btn-icon.mobile-close-btn {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 10000;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 79, 60, 0.15);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #004f3c;
    border: 1px solid rgba(0, 79, 60, 0.1);
}

.btn-icon.mobile-close-btn:hover {
    background-color: #fafaf8;
    box-shadow: 0 6px 16px rgba(0, 79, 60, 0.2);
    transform: scale(1.05);
}

/* Tabs */
.notification-tabs {
    display: flex;
    border-bottom: 1px solid rgba(0, 79, 60, 0.08);
    background: #ffffff;
}

.tab-button {
    flex: 1;
    padding: 14px 16px;
    border: none;
    background: transparent;
    color: #666;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
    border-bottom: 3px solid transparent;
}

.tab-button:hover {
    background-color: rgba(0, 79, 60, 0.03);
    color: #004f3c;
}

.tab-button.active {
    color: #004f3c;
    border-bottom-color: #004f3c;
    font-weight: 600;
}

/* Notification List */
.notification-list {
    flex: 1;
    overflow-y: auto;
    max-height: 450px;
    background: #fafaf8;
}

/* ✅ Full height on mobile */
.mobile-fullscreen .notification-list {
    max-height: none;
    height: 100%;
}

.notification-loading,
.notification-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    color: #999;
}

.notification-loading p,
.notification-empty p {
    margin-top: 16px;
    font-size: 0.9rem;
    color: #666;
}

/* Notification Item */
.notification-item {
    display: flex;
    gap: 14px;
    padding: 18px 24px;
    border-bottom: 1px solid rgba(0, 79, 60, 0.06);
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    background: #ffffff;
}

.notification-item:hover {
    background: linear-gradient(135deg, #fafaf8 0%, #f5f5f3 100%);
 
}

.notification-item.unread {
    background: linear-gradient(135deg, #f0f7f5 0%, #e8f4f0 100%);
    border-left: 4px solid #004f3c;
}

.notification-item.unread:hover {
    background: linear-gradient(135deg, #e8f4f0 0%, #dff0ea 100%);
}

/* Priority Styling */
.notification-item.notification-urgent {
    border-left: 4px solid #d3b890;
    background: linear-gradient(135deg, #fef9f3 0%, #fdf6ed 100%);
}

.notification-item.notification-high {
    border-left: 4px solid #c5a77f;
}

.notification-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 79, 60, 0.08);
}

/* Notification Type Colors - Modern & Light */
.notification-system {
    background: linear-gradient(135deg, #e8f4f0 0%, #d4ebe4 100%);
    color: #004f3c;
}

.notification-mention {
    background: linear-gradient(135deg, #fef9f3 0%, #fdf4e9 100%);
    color: #8b6f47;
}

.notification-assignment {
    background: linear-gradient(135deg, #f0f7f5 0%, #e1f0ec 100%);
    color: #006b54;
}

.notification-update {
    background: linear-gradient(135deg, #e8f4f0 0%, #d8ede8 100%);
    color: #005f4a;
}

.notification-approval {
    background: linear-gradient(135deg, #fef9f3 0%, #fcf3e8 100%);
    color: #9b7f52;
}

.notification-message {
    background: linear-gradient(135deg, #f0f7f5 0%, #e3f0ed 100%);
    color: #005241;
}

.notification-reminder {
    background: linear-gradient(135deg, #fdf6ed 0%, #fbeee0 100%);
    color: #a68561;
}

.notification-share {
    background: linear-gradient(135deg, #e8f4f0 0%, #d4ebe4 100%);
    color: #004f3c;
}

/* Content */
.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 6px;
}

.notification-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1a1a1a;
    flex: 1;
    line-height: 1.4;
}

.priority-badge {
    font-size: 0.7rem;
    padding: 3px 10px;
    border-radius: 6px;
    font-weight: 600;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.priority-badge.notification-urgent {
    background: linear-gradient(135deg, #d3b890 0%, #c5a77f 100%);
    color: #004f3c;
    box-shadow: 0 2px 4px rgba(211, 184, 144, 0.3);
}

.priority-badge.notification-high {
    background: linear-gradient(135deg, #e8dcc8 0%, #d3b890 100%);
    color: #004f3c;
    box-shadow: 0 2px 4px rgba(211, 184, 144, 0.2);
}

.notification-message {
    font-size: 0.875rem;
    color: #555;
    margin: 4px 0 10px 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notification-meta {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    font-size: 0.75rem;
    color: #888;
    margin-top: 6px;
}

.notification-time {
    font-weight: 400;
    color: #666;
}

.notification-author {
    color: #777;
}

/* ✅ Inline Link Separator */
.notification-separator {
    color: #d0d0d0;
}

/* ✅ Inline Link for Navigation - Modern Style */
.notification-inline-link {
    color: white;
    font-weight: 400;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    padding: 2px 6px;
    border-radius: 4px;
    background: #004f3c;
}

.notification-inline-link:hover {
    color: #004f3c;
    background: rgba(0, 79, 60, 0.1);
    text-decoration: none;
    transform: translateX(2px);
}

.notification-inline-link:active {
    transform: translateX(0);
    background: rgba(0, 79, 60, 0.15);
}

.unread-indicator {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    background: linear-gradient(135deg, #004f3c 0%, #003d2e 100%);
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 79, 60, 0.3);
}

/* Notification Actions */
.notification-actions {
    display: flex;
    gap: 8px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.notification-action-btn {
    padding: 8px 16px;
    font-size: 0.8125rem;
    border: 1.5px solid #004f3c;
    background: #ffffff;
    color: #004f3c;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 79, 60, 0.08);
}

.notification-action-btn:hover {
    background: #004f3c;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 79, 60, 0.2);
}

.notification-action-btn:active {
    transform: translateY(0);
}

/* Panel Footer */
.notification-footer {
    padding: 16px 24px;
    border-top: 1px solid rgba(0, 79, 60, 0.08);
    text-align: center;
    background: linear-gradient(135deg, #ffffff 0%, #fafaf8 100%);
}

.notification-footer .btn-link {
    color: #004f3c;
    font-weight: 600;
}

/* Responsive Design - Mobile/PWA */
@media (max-width: 768px) {
    .notification-panel {
        width: 100vw;
        max-width: 100vw;
        right: -12px;
        border-radius: 12px 12px 0 0;
    }

    .notification-item {
        padding: 16px 20px;
    }

    .notification-header {
        padding: 18px 20px;
        padding-right: 70px; /* Space for fixed close button */
    }

    .notification-meta {
        font-size: 0.7rem;
    }

    .notification-inline-link {
        font-size: 0.75rem;
        padding: 3px 8px;
    }

    /* Larger touch targets on mobile */
    .tab-button {
        padding: 16px 12px;
        font-size: 0.875rem;
    }

    /* Make action buttons full width on mobile */
    .notification-actions {
        flex-direction: column;
    }

    .notification-action-btn {
        width: 100%;
        padding: 12px;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .notification-panel {
        right: 0;
    }

    .notification-header h3 {
        font-size: 1.125rem;
    }

    .notification-item {
        padding: 14px 16px;
    }

    .notification-icon {
        width: 40px;
        height: 40px;
        font-size: 1.125rem;
    }
}

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

.notification-list::-webkit-scrollbar-track {
    background: rgba(0, 79, 60, 0.03);
}

.notification-list::-webkit-scrollbar-thumb {
    background: rgba(0, 79, 60, 0.15);
    border-radius: 3px;
}

.notification-list::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 79, 60, 0.25);
}

/* PWA Safe Areas */
@supports (padding: env(safe-area-inset-top)) {
    .mobile-fullscreen .notification-header {
        padding-top: calc(18px + env(safe-area-inset-top));
    }

    .mobile-fullscreen .notification-footer {
        padding-bottom: calc(16px + env(safe-area-inset-bottom));
    }

    .btn-icon.mobile-close-btn {
        top: calc(16px + env(safe-area-inset-top));
        right: calc(16px + env(safe-area-inset-right));
    }
}

/* Smooth transitions */
* {
    -webkit-tap-highlight-color: transparent;
}

.notification-item,
.tab-button,
.btn-link,
.btn-icon,
.notification-inline-link,
.notification-action-btn {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Focus states for accessibility */
.notification-bell-button:focus,
.tab-button:focus,
.btn-link:focus,
.btn-icon:focus,
.notification-inline-link:focus,
.notification-action-btn:focus {
    outline: 2px solid #004f3c;
    outline-offset: 2px;
}

/* Modern subtle animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.notification-item {
    animation: fadeIn 0.2s ease-out;
}