/* ============================================
   FLOATING NOTIFICATION TAB
   ============================================ */

.notification-floating-tab {
    position: fixed;
    top: 50%;
    right: -30px;  /* Hide 30px off-screen, so 50px sticks out (80px total - 30px hidden = 50px visible) */
    transform: translateY(-50%);
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    transition: right 0.3s ease;
}

.notification-floating-tab:hover {
    right: -10px;  /* On hover, slide to -10px to show 70px (80px total - 10px hidden = 70px visible) */
}

/* The Tab Button */
.notification-tab-button {
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px 0 0 8px;
    padding: 12px 10px;
    padding-right: 40px;  /* Extra padding on right to extend past edge (30px + 10px) */
    cursor: pointer;
    box-shadow: -2px 2px 12px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;  /* 70px + 10px more */
    height: 50px;
}

.notification-tab-button:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    box-shadow: -4px 4px 16px rgba(0,0,0,0.3);
    transform: translateX(-5px);
}

.notification-tab-button i {
    color: white;
    font-size: 24px;  /* 20% larger (20px * 1.2 = 24px) */
}

/* Notification Badge - now independent element */
.notification-badge {
    position: fixed;
    top: calc(50% - 30px);  /* Align with tab by default */
    right: 45px;  /* Position on tab when not hovered (tab is at right: -20px, so badge at 65-20=45px) */
    background: #dc3545;
    color: white;
    border-radius: 12px;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    display: none;
    transition: all 0.3s ease;
    z-index: 10001 !important;  /* Force above panel with !important */
}

/* Badge follows tab on hover */
.notification-floating-tab:hover ~ .notification-badge:not(.on-panel) {
    right: 65px;  /* Move with tab when tab is hovered (tab moves to right: 0) */
}

/* Badge positioned on notification panel when panel is open */
.notification-badge.on-panel {
    top: 15px !important;  /* Position at top of full-height panel */
    right: 365px !important;  /* Move to panel upper-right area */
}

.notification-badge.has-notifications {
    display: block;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Bell jingle animation - only when there are notifications */
.notification-badge.has-notifications ~ .notification-tab-button i,
.notification-tab-button:has(+ .notification-badge.has-notifications) i {
    animation: jingle 5s ease-in-out infinite;
    transform-origin: top center;
}

/* Fallback for browsers that don't support :has() - use JavaScript to add class */
.notification-tab-button.has-unread i {
    animation: jingle 5s ease-in-out infinite;
    transform-origin: top center;
}

@keyframes jingle {
    0%, 90%, 100% { transform: rotate(0deg); }
    91% { transform: rotate(-15deg); }
    93% { transform: rotate(15deg); }
    95% { transform: rotate(-10deg); }
    97% { transform: rotate(10deg); }
    99% { transform: rotate(-5deg); }
}

/* The Sliding Panel */
.notification-panel {
    position: fixed;
    top: 0;  /* Full height - start at top of screen */
    bottom: 0;
    right: -400px;
    width: 400px;
    max-width: 100%;
    background: white;
    box-shadow: -4px 0 20px rgba(0,0,0,0.15);
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    z-index: 10000;
    border-radius: 0;  /* No rounded corners for full height */
}

.notification-panel.open {
    right: 0;
}

.notification-panel.open {
    right: 0;
}

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

.notification-panel-header h6 {
    color: white;
    font-weight: 600;
    margin: 0;
    font-size: 19.2px;  /* Default h6 is ~16px, 16px * 1.2 = 19.2px (20% larger) */
    display: flex;
    align-items: center;  /* Vertically center icon and text */
}

/* Bell icon in panel header rings when there are notifications */
.notification-panel-header h6 i.bi-bell-fill {
    display: inline-flex;
    align-items: center;
    transform-origin: top center;
}

.notification-panel.has-notifications .notification-panel-header h6 i.bi-bell-fill {
    animation: jingle 5s ease-in-out infinite;
}

.notification-panel-header .btn-link {
    color: white !important;
    font-size: 18px;
}

.notification-panel-header .btn-link:hover {
    color: #f8f9fa !important;
}

/* Panel Content */
.notification-panel-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Notification Items */
.notification-item {
    padding: 16px 20px;
    border-bottom: 1px solid #e9ecef;
    cursor: pointer;
    transition: background-color 0.2s;
    text-decoration: none;
    color: inherit;
    display: block;
    background: white;
}

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

.notification-item.unread {
    background-color: #e7f3ff;
    border-left: 4px solid #007bff;
}

.notification-item-icon {
    font-size: 24px;
    margin-right: 12px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.notification-item-icon.email {
    color: #007bff;
}

.notification-item-icon.sms {
    color: #28a745;
}

.notification-item-icon.auto-reply {
    color: #ff6b35;
    animation: pulse-icon 2s ease-in-out infinite;
}

@keyframes pulse-icon {
    0%, 100% { 
        transform: scale(1);
        opacity: 1;
    }
    50% { 
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.notification-item-content {
    flex: 1;
    min-width: 0;
}

.notification-item-lead {
    font-weight: 600;
    color: #212529;
    margin-bottom: 4px;
    font-size: 16.8px;  /* 14px * 1.2 = 16.8px (20% larger) */
}

.notification-item-trigger {
    font-size: 14.4px;  /* 12px * 1.2 = 14.4px (20% larger) */
    color: #ff6b35;
    font-weight: 600;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.notification-item-preview {
    font-size: 15.6px;  /* 13px * 1.2 = 15.6px (20% larger) */
    color: #6c757d;
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
}

.notification-item-meta {
    font-size: 11px;
    color: #999;
    display: flex;
    align-items: center;
    gap: 8px;
}

.notification-item-count {
    background: #007bff;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
}

/* Empty State */
.notification-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #6c757d;
}

.notification-empty i {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.notification-empty p {
    margin: 0;
    font-size: 16px;
}

/* Overlay for Mobile */
.notification-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9998;
    display: none;
}

.notification-overlay.open {
    display: block;
}

/* Mobile Responsive - Removed mobile-specific tab styles */
/* Tab stays the same size on all devices */

/* Dark Mode Support */
[data-theme="dark"] .notification-panel {
    background: #1a1d23;
    border-left: 1px solid #2d3139;
}

[data-theme="dark"] .notification-panel-header {
    border-bottom-color: #2d3139;
}

[data-theme="dark"] .notification-item {
    background: #1a1d23;
    border-bottom-color: #2d3139;
    color: #e9ecef;
}

[data-theme="dark"] .notification-item:hover {
    background-color: #252830;
}

[data-theme="dark"] .notification-item.unread {
    background-color: #1e2a3a;
    border-left-color: #4a90e2;
}

[data-theme="dark"] .notification-item-lead {
    color: #e9ecef;
}

[data-theme="dark"] .notification-item-preview {
    color: #adb5bd;
}

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

.notification-panel-content::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.notification-panel-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.notification-panel-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

[data-theme="dark"] .notification-panel-content::-webkit-scrollbar-track {
    background: #2d3139;
}

[data-theme="dark"] .notification-panel-content::-webkit-scrollbar-thumb {
    background: #4a5568;
}
