/* ============================================
   Notifications Module – All notification styles
   ============================================ */

/* Bell dropdown */
.notification-dropdown {
    width: 380px;
    max-height: 480px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    border-radius: 0.5rem !important;
    overflow: hidden;
}

.notification-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f0f0f0;
    cursor: default;
}

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

.notification-item.notification-unread {
    background: #f0f7ff;
}

.notification-item.notification-read {
    background: #fff;
}

.notification-title {
    font-weight: 500;
    font-size: 0.875rem;
    color: #212529;
}

.notification-link:hover .notification-title {
    color: var(--bs-primary);
}

.notification-message {
    margin-top: 2px;
}

.notification-time {
    margin-top: 2px;
    font-size: 0.75rem;
}

.notification-badge {
    font-size: 0.65rem;
    min-width: 1.1rem;
    padding: 0.2em 0.4em;
    z-index: 1050;
    position: relative;
}

.notification-mark-read {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.85rem;
}

.notification-mark-read:hover {
    background-color: var(--bs-success) !important;
    border-color: var(--bs-success) !important;
    color: #fff !important;
}

.notification-mark-unread {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.85rem;
}

.notification-mark-unread:hover {
    background-color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
    color: #fff !important;
}

.notification-toast {
    min-width: 300px;
}

@media (max-width: 575.98px) {
    .notification-dropdown {
        width: calc(100vw - 2rem) !important;
        max-width: 380px;
    }
}

/* Tab notification dots — flows inline as a flex child of .k-item,
   sitting directly to the right of the tab label. The unified flat
   tabstrip style has no card background, so absolute positioning
   would leave the dot hanging in the padding gutter. */
.tab-unread-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-left: -0.625rem;
    align-self: center;
    flex-shrink: 0;
    border-radius: 50%;
    animation: tab-dot-pulse 2s ease-in-out infinite;
    pointer-events: none;
}

@keyframes tab-dot-pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 4px currentColor; }
    50% { opacity: 0.5; box-shadow: 0 0 8px currentColor; }
}

.tab-unread-dot.dot-report   { background-color: #f57c00; color: #f57c00; }
.tab-unread-dot.dot-order    { background-color: #2e7d32; color: #2e7d32; }
.tab-unread-dot.dot-request  { background-color: #1976d2; color: #1976d2; }
.tab-unread-dot.dot-followup { background-color: #9c27b0; color: #9c27b0; }

/* Grid row unread marking — adopts the category color/tint from the
   surrounding wrapper (reports/orders/requests/followups) via CSS vars,
   so the row accent matches the tab it lives under. Falls back to the
   Bootstrap primary when no category wrapper is present.

   Background goes on the <tr>, not on > td: .k-command-cell uses
   display:flex, which lets the td render shorter than the row height
   when its buttons fit on a single line — a td-level background would
   then leak white under the command area. The tr-level fill paints the
   full row height regardless, and Kendo's own alt-row styling uses the
   same trick so we know table-row backgrounds propagate here. */
.k-grid tbody tr.row-unread {
    background-color: var(--category-tint, #f0f7ff);
    transition: background-color 0.3s ease;
}

.k-grid tbody tr.row-unread > td:first-child {
    border-left: 3px solid var(--category-color, var(--bs-primary));
    transition: border-left-color 0.3s ease;
}
