/* ========================================
   CSS do componente NotificationBell
   Sino de notificações no header
   ======================================== */

.notification-bell {
    position: relative;
}

.notification-bell__btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.15s;
}

.notification-bell__btn:hover {
    background: #f3f4f6;
}

.notification-bell__icon {
    color: #4b5563;
}

.notification-bell__badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #ef4444;
    color: white;
    font-size: 11px;
    font-weight: 600;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-bell__dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 360px;
    max-height: 480px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.notification-bell.is-open .notification-bell__dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Mobile Header Integration */
.kavo-mh__notification-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.kavo-mh__notification-wrapper .notification-bell {
    display: flex;
    align-items: center;
    justify-content: center;
}

.kavo-mh__notification-wrapper .notification-bell__btn {
    width: 36px;
    height: 36px;
    background: transparent;
    border-radius: 8px;
}

.kavo-mh__notification-wrapper .notification-bell__btn:hover {
    background: #f3f4f6;
}

.kavo-mh__notification-wrapper .notification-bell__icon {
    width: 20px;
    height: 20px;
    color: #374151;
}

.kavo-mh__notification-wrapper .notification-bell__badge {
    top: 2px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    font-size: 10px;
}

@media (max-width: 576px) {
    .notification-bell__dropdown {
        position: fixed;
        top: 80px;
        left: 50%;
        right: auto;
        width: min(90vw, 340px);
        max-height: calc(100vh - 120px);
        transform: translate(-50%, -10px);
    }

    .notification-bell.is-open .notification-bell__dropdown {
        transform: translate(-50%, 0);
    }

    .notification-dropdown__list {
        max-height: calc(100vh - 220px);
    }
    
    /* Ajuste específico para mobile header */
    .kavo-mh__notification-wrapper .notification-bell__dropdown {
        position: fixed;
        top: 70px;
        left: 50%;
        right: auto;
        width: min(88vw, 320px);
    }
}

.notification-dropdown__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.notification-dropdown__header strong {
    font-size: 16px;
    color: #111827;
}

.notification-dropdown__actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.notification-dropdown__header button {
    background: none;
    border: none;
    color: #0F766E;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
}

.notification-dropdown__header button:hover {
    text-decoration: underline;
}

.notification-clear-all {
    color: #dc2626 !important;
    font-weight: 500;
}

.notification-clear-all:hover {
    color: #b91c1c !important;
}

.notification-dropdown__list {
    flex: 1;
    overflow-y: auto;
    max-height: 360px;
}

.notification-item {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #f3f4f6;
    position: relative;
    transition: background-color 0.15s;
}

.notification-item:hover {
    background: #f9fafb;
}

.notification-item--critical {
    background: #fef2f2;
    border-left: 3px solid #ef4444;
}

.notification-item--high {
    background: #fffbeb;
    border-left: 3px solid #f59e0b;
}

.notification-item--medium {
    border-left: 3px solid #fbbf24;
}

.notification-item--low {
    border-left: 3px solid #10b981;
}

.notification-item__icon {
    font-size: 24px;
    flex-shrink: 0;
}

.notification-item__content {
    flex: 1;
    min-width: 0;
}

.notification-item__content strong {
    display: block;
    font-size: 14px;
    margin-bottom: 2px;
    color: #111827;
}

.notification-item__content p {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
    white-space: normal;
    word-break: break-word;
    line-height: 1.4;
}

.notification-item__time {
    font-size: 12px;
    color: #9ca3af;
}

.notification-item__dismiss {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.notification-item:hover .notification-item__dismiss {
    opacity: 1;
}

.notification-item__dismiss:hover {
    background: #f3f4f6;
    color: #6b7280;
}

.notification-dropdown__empty {
    padding: 40px 20px;
    text-align: center;
    color: #9ca3af;
}

.notification-dropdown__empty-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin: 0 auto 12px;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
}

.notification-dropdown__footer {
    padding: 12px 16px;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

.notification-dropdown__footer a {
    font-size: 14px;
    color: #0F766E;
    text-decoration: none;
}

.notification-dropdown__footer a:hover {
    text-decoration: underline;
}
