/**
 * Notification Dropdown Styles
 * Dropdown preview for bell icon in dashboard header
 */

/* Container for positioning */
.notification-dropdown-container {
    position: relative;
}

/* Dropdown panel */
.notification-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 360px;
    max-height: 480px;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    z-index: 10000;
    display: flex;
    flex-direction: column;
}

.notification-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Header */
.notification-dropdown-header {
    padding: 16px;
    border-bottom: 1px solid #E5E7EB;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.notification-dropdown-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1F2937;
}

.notification-mark-all {
    background: none;
    border: none;
    color: #0D9488;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.15s;
}

.notification-mark-all:hover {
    background: #F0FDFA;
}

.notification-mark-all:disabled {
    color: #9CA3AF;
    cursor: default;
}

/* Scrollable list */
.notification-dropdown-list {
    flex: 1;
    overflow-y: auto;
    max-height: 320px;
}

/* Loading state */
.notification-dropdown-loading {
    padding: 32px 16px;
    text-align: center;
    color: #6B7280;
}

.notification-dropdown-loading .spinner {
    width: 24px;
    height: 24px;
    border: 2px solid #E5E7EB;
    border-top-color: #0D9488;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Empty state */
.notification-dropdown-empty {
    padding: 32px 16px;
    text-align: center;
}

.notification-dropdown-empty-icon {
    width: 48px;
    height: 48px;
    background: #F0FDFA;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
}

.notification-dropdown-empty-icon svg {
    color: #0D9488;
}

.notification-dropdown-empty-title {
    font-size: 14px;
    font-weight: 600;
    color: #1F2937;
    margin-bottom: 4px;
}

.notification-dropdown-empty-text {
    font-size: 13px;
    color: #6B7280;
}

/* Individual notification item */
.notification-dropdown-item {
    padding: 12px 16px;
    border-bottom: 1px solid #F3F4F6;
    cursor: pointer;
    display: flex;
    gap: 12px;
    transition: background 0.15s;
}

.notification-dropdown-item:hover {
    background: #F9FAFB;
}

.notification-dropdown-item:last-child {
    border-bottom: none;
}

.notification-dropdown-item.unread {
    background: #F0F7FF;
}

.notification-dropdown-item.unread:hover {
    background: #E8F0FE;
}

/* Notification icon */
.notification-dropdown-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-dropdown-icon.customer {
    background: #DCFCE7;
    color: #16A34A;
}

.notification-dropdown-icon.ai {
    background: #FEF3C7;
    color: #D97706;
}

.notification-dropdown-icon.system {
    background: #DBEAFE;
    color: #2563EB;
}

.notification-dropdown-icon.urgent {
    background: #FEE2E2;
    color: #DC2626;
}

.notification-dropdown-icon svg {
    width: 18px;
    height: 18px;
}

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

.notification-dropdown-title {
    font-size: 14px;
    font-weight: 500;
    color: #1F2937;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notification-dropdown-message {
    font-size: 13px;
    color: #6B7280;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notification-dropdown-time {
    font-size: 12px;
    color: #9CA3AF;
    margin-top: 4px;
}

/* Priority badge */
.notification-dropdown-priority {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
}

.notification-dropdown-priority.urgent {
    background: #FEE2E2;
    color: #DC2626;
}

.notification-dropdown-priority.high {
    background: #FEF3C7;
    color: #D97706;
}

/* Footer */
.notification-dropdown-footer {
    padding: 12px 16px;
    border-top: 1px solid #E5E7EB;
    text-align: center;
    flex-shrink: 0;
}

.notification-view-all {
    color: #0D9488;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.notification-view-all:hover {
    color: #0F766E;
}

.notification-view-all::after {
    content: '\2192';
}

/* Badge on bell icon */
.ai-notification-dot {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    background: #EF4444;
    border-radius: 50%;
    border: 2px solid #FFFFFF;
}

/* Mobile responsiveness */
@media (max-width: 480px) {
    .notification-dropdown {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-height: 70vh;
        border-radius: 16px 16px 0 0;
        transform: translateY(100%);
    }

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

    .notification-dropdown-list {
        max-height: calc(70vh - 120px);
    }
}
