mkcart / frontend /src /components /NotificationCenter.css
Kumar
updated
c2efbe6
.notification-center {
position: relative;
display: inline-block;
margin: 0 8px;
}
.notification-bell {
position: relative;
width: 45px;
height: 45px;
background: rgba(136, 112, 112, 0.333);
backdrop-filter: blur(10px);
border: 1px solid rgba(255, 255, 255, 0.08);
border-radius: 50%;
color: white;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.3s ease;
overflow: visible;
z-index: 14000;
}
.notification-bell:hover {
background: rgba(139, 110, 110, 0.373);
border-color: rgba(138, 115, 115, 0.2);
box-shadow: 0 5px 20px rgba(102, 126, 234, 0.3);
transform: scale(1.1);
}
.notification-badge {
position: absolute;
top: -8px;
right: -8px;
background: linear-gradient(135deg, #ff6b6b, #ff5252);
color: white;
font-size: 11px;
font-weight: bold;
padding: 2px 6px;
border-radius: 10px;
min-width: 18px;
height: 18px;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 4px 15px rgba(255, 107, 107, 0.5);
z-index: 14500;
opacity: 1;
visibility: visible;
}
.notification-panel {
position: absolute;
top: 100%;
right: 0;
margin-top: 10px;
width: 380px;
max-height: 500px;
background: rgba(10, 61, 81, 0.774);
backdrop-filter: blur(30px);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 20px;
overflow: hidden;
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.227);
z-index: 15000;
display: flex;
flex-direction: column;
}
.panel-header {
background: rgba(255, 255, 255, 0.08);
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
padding: 20px;
}
.header-content {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 16px;
}
.header-title {
display: flex;
align-items: center;
gap: 12px;
color: white;
}
.header-title h3 {
font-size: 1.2rem;
font-weight: 700;
margin: 0;
}
.unread-indicator {
color: rgba(255, 255, 255, 0.7);
font-size: 0.9rem;
font-weight: 400;
}
.notification-limit {
color: rgba(255, 255, 255, 0.5);
font-size: 0.8rem;
font-weight: 400;
margin-left: 8px;
padding: 2px 6px;
background: rgba(255, 255, 255, 0.1);
border-radius: 8px;
}
.header-actions {
display: flex;
gap: 8px;
}
.header-action-btn {
width: 32px;
height: 32px;
background: rgba(255, 255, 255, 0.1);
border: 1px solid rgba(255, 255, 255, 0.2);
border-radius: 8px;
color: rgba(255, 255, 255, 0.8);
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.3s ease;
}
.header-action-btn:hover {
background: rgba(255, 255, 255, 0.2);
border-color: rgba(255, 255, 255, 0.4);
color: white;
}
.header-action-btn:disabled {
opacity: 0.5;
cursor: not-allowed;
}
.header-action-btn.close:hover {
background: rgba(255, 107, 107, 0.2);
border-color: rgba(255, 107, 107, 0.5);
color: #ff6b6b;
}
.settings-panel {
overflow: hidden;
border-top: 1px solid rgba(255, 255, 255, 0.1);
margin-top: 16px;
}
.settings-content {
padding: 12px 0;
}
.settings-action {
display: flex;
align-items: center;
gap: 12px;
width: 100%;
padding: 8px 0;
background: transparent;
border: none;
color: rgba(255, 255, 255, 0.8);
font-size: 0.9rem;
cursor: pointer;
transition: all 0.3s ease;
}
.settings-action:hover {
color: white;
transform: translateX(5px);
}
.filter-tabs {
display: flex;
gap: 8px;
margin-top: 16px;
}
.filter-tab {
display: flex;
align-items: center;
gap: 6px;
padding: 8px 12px;
background: rgba(255, 255, 255, 0.05);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 12px;
color: rgba(255, 255, 255, 0.7);
font-size: 0.8rem;
font-weight: 500;
cursor: pointer;
transition: all 0.3s ease;
}
.filter-tab:hover {
background: rgba(255, 255, 255, 0.1);
border-color: rgba(255, 255, 255, 0.3);
color: white;
}
.filter-tab.active {
background: linear-gradient(135deg, #667eea, #764ba2);
border-color: transparent;
color: white;
box-shadow: 0 5px 20px rgba(102, 126, 234, 0.3);
}
.notifications-list {
flex: 1;
overflow-y: auto;
padding: 0;
max-height: 350px;
}
.notification-item {
position: relative;
display: flex;
align-items: flex-start;
gap: 12px;
padding: 16px 20px;
border-bottom: 1px solid rgba(255, 255, 255, 0.05);
transition: all 0.3s ease;
cursor: pointer;
overflow: hidden;
}
.notification-item:hover {
background: rgba(255, 255, 255, 0.05);
}
.notification-item.unread {
background: rgba(102, 126, 234, 0.05);
border-left: 3px solid #667eea;
}
.notification-item.read {
opacity: 0.7;
}
.priority-indicator {
position: absolute;
left: 0;
top: 0;
bottom: 0;
width: 3px;
}
.priority-indicator.priority-high {
background: linear-gradient(to bottom, #e74c3c, #c0392b);
}
.priority-indicator.priority-medium {
background: linear-gradient(to bottom, #f39c12, #e67e22);
}
.priority-indicator.priority-low {
background: linear-gradient(to bottom, #2ecc71, #27ae60);
}
.notification-icon {
position: relative;
width: 40px;
height: 40px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
border: 1px solid rgba(255, 255, 255, 0.1);
}
.unread-dot {
position: absolute;
top: -2px;
right: -2px;
width: 8px;
height: 8px;
background: #ff6b6b;
border-radius: 50%;
border: 2px solid white;
animation: pulse 2s infinite;
}
.notification-content {
flex: 1;
min-width: 0;
}
.notification-header {
display: flex;
justify-content: space-between;
align-items: flex-start;
margin-bottom: 4px;
}
.notification-title {
color: white;
font-size: 0.95rem;
font-weight: 600;
margin: 0;
line-height: 1.3;
}
.notification-actions {
display: flex;
align-items: center;
gap: 8px;
flex-shrink: 0;
}
.notification-time {
color: rgba(255, 255, 255, 0.5);
font-size: 0.75rem;
font-weight: 400;
white-space: nowrap;
}
.action-btn {
width: 20px;
height: 20px;
background: rgba(255, 255, 255, 0.1);
border: none;
border-radius: 50%;
color: rgba(255, 255, 255, 0.6);
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.3s ease;
opacity: 0;
}
.notification-item:hover .action-btn {
opacity: 1;
}
.action-btn:hover {
background: rgba(255, 107, 107, 0.2);
color: #ff6b6b;
}
.notification-message {
color: rgba(255, 255, 255, 0.8);
font-size: 0.85rem;
line-height: 1.4;
margin: 0 0 8px 0;
font-weight: 400;
}
.notification-action-btn {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 6px 12px;
background: linear-gradient(135deg, #667eea, #764ba2);
border: none;
border-radius: 12px;
color: white;
font-size: 0.8rem;
font-weight: 500;
cursor: pointer;
transition: all 0.3s ease;
margin-top: 4px;
}
.notification-action-btn:hover {
transform: translateY(-1px);
box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}
.read-toggle {
width: 24px;
height: 24px;
background: rgba(255, 255, 255, 0.1);
border: none;
border-radius: 50%;
color: rgba(255, 255, 255, 0.6);
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.3s ease;
opacity: 0;
flex-shrink: 0;
}
.notification-item:hover .read-toggle {
opacity: 1;
}
.read-toggle:hover {
background: rgba(255, 255, 255, 0.2);
color: white;
}
.notification-glow {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(246, 211, 101, 0.1));
opacity: 0;
transition: opacity 0.3s ease;
pointer-events: none;
}
.notification-item:hover .notification-glow {
opacity: 1;
}
.empty-state {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 40px 20px;
text-align: center;
color: rgba(255, 255, 255, 0.6);
}
.empty-state h4 {
color: white;
font-size: 1.1rem;
font-weight: 600;
margin: 16px 0 8px;
}
.empty-state p {
font-size: 0.9rem;
margin: 0;
opacity: 0.8;
}
.panel-footer {
padding: 16px 20px;
border-top: 1px solid rgba(255, 255, 255, 0.1);
background: rgba(255, 255, 255, 0.03);
}
.view-all-btn {
position: relative;
width: 100%;
padding: 12px 20px;
background: linear-gradient(135deg, #667eea, #764ba2);
border: none;
border-radius: 15px;
color: white;
font-size: 0.9rem;
font-weight: 600;
cursor: pointer;
transition: all 0.3s ease;
overflow: hidden;
}
.view-all-btn:hover {
transform: translateY(-2px);
box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}
.btn-glow {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
opacity: 0;
transition: opacity 0.3s ease;
pointer-events: none;
}
.view-all-btn:hover .btn-glow {
opacity: 1;
}
.notifications-list::-webkit-scrollbar {
width: 6px;
}
.notifications-list::-webkit-scrollbar-track {
background: rgba(255, 255, 255, 0.05);
border-radius: 3px;
}
.notifications-list::-webkit-scrollbar-thumb {
background: rgba(255, 255, 255, 0.2);
border-radius: 3px;
}
.notifications-list::-webkit-scrollbar-thumb:hover {
background: rgba(255, 255, 255, 0.3);
}
@media (max-width: 768px) {
.notification-panel {
width: calc(100vw - 40px);
max-width: 360px;
right: -10px;
}
.notification-item {
padding: 12px 16px;
}
.notification-title {
font-size: 0.9rem;
}
.notification-message {
font-size: 0.8rem;
}
.filter-tabs {
flex-wrap: wrap;
gap: 6px;
}
.filter-tab {
padding: 6px 10px;
font-size: 0.75rem;
}
}
@media (max-width: 480px) {
.notification-panel {
width: calc(100vw - 20px);
right: -20px;
max-height: 70vh;
}
.panel-header {
padding: 16px;
}
.header-title h3 {
font-size: 1.1rem;
}
.notification-item {
padding: 10px 12px;
gap: 10px;
}
.notification-icon {
width: 35px;
height: 35px;
}
.notification-content {
min-width: 0;
}
.notification-actions {
flex-direction: column;
align-items: flex-end;
gap: 4px;
}
}
@keyframes pulse {
0%,
100% {
transform: scale(1);
opacity: 1;
}
50% {
transform: scale(1.1);
opacity: 0.8;
}
}
@media (prefers-reduced-motion: reduce) {
.notification-badge,
.notification-pulse,
.unread-dot {
animation: none;
}
.notification-bell,
.header-action-btn,
.filter-tab,
.notification-action-btn {
transition: none;
}
}
.notification-bell:focus,
.header-action-btn:focus,
.filter-tab:focus,
.notification-action-btn:focus,
.view-all-btn:focus {
outline: 2px solid rgba(102, 126, 234, 0.5);
outline-offset: 2px;
}
@media (prefers-contrast: high) {
.notification-panel {
background: rgba(0, 0, 0, 0.9);
border: 2px solid white;
}
.notification-item {
border-bottom: 2px solid white;
}
.notification-title,
.notification-message {
color: white;
}
}