/* Notifications Dropdown Styles */

.notifications-toggle {
    position: relative;
    cursor: pointer;
    transition: none !important; /* Remove any transitions to prevent visual glitches */
}

/* Override all button transitions for notification button */
.notifications-toggle.btn,
.notifications-toggle.btn-outline-light,
.notifications-toggle.btn-sm {
    transition: none !important;
    -webkit-transition: none !important;
    -moz-transition: none !important;
    -o-transition: none !important;
}

/* Remove hover transition effects */
.notifications-toggle:hover,
.notifications-toggle:focus,
.notifications-toggle:active {
    transition: none !important;
    -webkit-transition: none !important;
    -moz-transition: none !important;
    -o-transition: none !important;
    transform: none !important; /* Remove any transform animations */
    -webkit-transform: none !important;
    -moz-transform: none !important;
    -o-transform: none !important;
}

/* Remove the shimmer effect from .btn::before */
.notifications-toggle::before {
    display: none !important;
}

.notification-badge {
    min-width: 18px;
    text-align: center;
    line-height: 1.2;
    white-space: nowrap;
    overflow: visible;
    z-index: 1051;
}

.notifications-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 380px;
    max-width: 90vw;
    background: var(--bg-card, var(--card-bg));
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1050;
    max-height: 500px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.notifications-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card-bg);
    border-radius: 0.5rem 0.5rem 0 0;
}

.notifications-header h6 {
    margin: 0;
    font-weight: 600;
    color: var(--text-primary);
}

.notifications-header a {
    color: #0d6efd;
    font-size: 0.875rem;
    text-decoration: none;
}

.notifications-header a:hover {
    text-decoration: none !important;
}

.notifications-list {
    overflow-y: auto;
    max-height: 400px;
    padding: 0.5rem 0;
}

.notifications-loading {
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
}

.notification-item-dropdown {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background-color 0.2s;
}

.notification-item-dropdown:hover {
    background-color: var(--bg-card-hover, rgba(0, 0, 0, 0.05));
}

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

.notification-item-dropdown.unread {
    background-color: var(--unread-bg, rgba(13, 110, 253, 0.1));
    font-weight: 500;
}

.notification-item-dropdown.read {
    opacity: 0.8;
}

.notification-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.25rem;
}

.notification-item-title {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
    margin: 0;
    flex: 1;
}

.notification-item-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    margin-left: 0.5rem;
}

.notification-item-message {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
    /* Truncate long messages in dropdown */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 4.2em; /* Approximately 3 lines */
}

.notification-item-priority {
    display: inline-block;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.625rem;
    font-weight: 600;
    margin-top: 0.25rem;
}

.notification-item-priority.URGENT {
    background-color: #dc3545;
    color: white;
}

.notification-item-priority.HIGH {
    background-color: #fd7e14;
    color: white;
}

.notification-item-priority.MEDIUM {
    background-color: #0dcaf0;
    color: #000;
}

.notification-item-priority.LOW {
    background-color: #6c757d;
    color: white;
}

.notifications-empty {
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
}

.notifications-empty i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

.notifications-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    background: var(--card-bg);
    border-radius: 0 0 0.5rem 0.5rem;
}

.notifications-footer a {
    color: #0d6efd;
    text-decoration: none;
    font-size: 0.875rem;
}

.notifications-footer a:hover {
    text-decoration: none;
}

/* Dark theme adjustments */
[data-theme="dark"] .notifications-dropdown {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .notification-item-dropdown.unread {
    background-color: rgba(13, 110, 253, 0.15);
}

