﻿/* Notification Bell */
.notification-bell {
    /*position: fixed;*/
    /*top: 20px;*/
    /*right: 20px;*/
    /*z-index: 1001;*/
}

.bell-button {
    position: relative;
    background: white;
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.bell-button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.bell-button.has-unread {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

.bell-icon {
    width: 24px;
    height: 24px;
    color: #6b7280;
    transition: color 0.2s;
}

.bell-button:hover .bell-icon {
    color: #4b5563;
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background-color: #ef4444;
    color: white;
    font-size: 11px;
    font-weight: 600;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    animation: popIn 0.3s ease;
}

@keyframes popIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    70% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Notification Panel */
.notification-panel {
    position: fixed;
    top: 65px;
    right: 7px;
    width: 380px;
    max-height: 70vh;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.notification-panel.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.panel-header {
    padding: 10px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 0 4px;
}

.mark-all-read {
    background: none;
    border: none;
    color: #3b82f6;
    font-size: 14px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.mark-all-read:hover {
    background-color: #eff6ff;
}

.panel-body {
    overflow-y: auto;
    max-height: calc(70vh - 80px);
}

.empty-state {
    padding: 60px 20px;
    text-align: center;
    color: #9ca3af;
}

.empty-state svg {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    opacity: 0.5;
}

/* Individual Notification */
.notification {
    padding: 16px 20px;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    transition: background-color 0.2s;
    position: relative;
}

.notification:hover {
    background-color: #f9fafb;
}

.notification.unread {
    background-color: #eff6ff;
}

.notification.unread::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: #3b82f6;
}

/* Notification Icons */
.notification-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.notification.success .notification-icon {
    background-color: #d1fae5;
    color: #059669;
}

.notification.error .notification-icon {
    background-color: #fee2e2;
    color: #dc2626;
}

.notification.warning .notification-icon {
    background-color: #fed7aa;
    color: #d97706;
}

.notification.info .notification-icon {
    background-color: #dbeafe;
    color: #2563eb;
}

/* Notification Content */
.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
    color: #1f2937;
}

.notification-message {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.4;
    word-wrap: break-word;
}

.notification-time {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 4px;
}

/* Close Button */
.notification-close {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    opacity: 0;
}

.notification:hover .notification-close {
    opacity: 1;
}

.notification-close:hover {
    color: #4b5563;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1002;
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
}

.toast {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    opacity: 0;
    transform: translateY(100%);
    animation: toastSlideIn 0.3s ease forwards;
}

@keyframes toastSlideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.toast.removing {
    animation: toastSlideOut 0.3s ease forwards;
}

@keyframes toastSlideOut {
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* Demo Controls */
.demo-controls {
    max-width: 600px;
    margin: 80px auto 0;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.demo-controls h1 {
    margin-bottom: 24px;
    color: #1f2937;
}

.control-group {
    margin-bottom: 20px;
}

.control-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #374151;
}

.control-group input,
.control-group textarea,
.control-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
}

.control-group textarea {
    resize: vertical;
    min-height: 60px;
}

.button-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

button {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-success {
    background-color: #22c55e;
    color: white;
}

.btn-success:hover {
    background-color: #16a34a;
}

.btn-error {
    background-color: #ef4444;
    color: white;
}

.btn-error:hover {
    background-color: #dc2626;
}

.btn-warning {
    background-color: #f59e0b;
    color: white;
}

.btn-warning:hover {
    background-color: #d97706;
}

.btn-info {
    background-color: #3b82f6;
    color: white;
}

.btn-info:hover {
    background-color: #2563eb;
}

.btn-clear {
    background-color: #6b7280;
    color: white;
}

.btn-clear:hover {
    background-color: #4b5563;
}

/* Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.overlay.open {
    opacity: 1;
    visibility: visible;
}