/* =====================================================
   ANASOF TASK — OBAVJEŠTENJA
   ===================================================== */

.app-header-actions {
    position: relative;
}

.header-button {
    position: relative;
}

.notification-count {
    position: absolute;
    top: -7px;
    right: -8px;
    min-width: 18px;
    padding: 2px 5px;
    border-radius: 12px;
    background: #b83232;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}

/* ===== PANEL ===== */
.notification-panel {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: min(390px, calc(100vw - 28px));
    max-height: min(520px, 75vh);
    overflow: auto;
    background: #fff;
    color: #1d1f23;
    border: 1px solid #dce6e9;
    border-top: 2px solid #2788e4;
    border-radius: 13px;
    box-shadow: 0 14px 35px #142e3840;
    z-index: 1500;
}

.notification-panel[hidden],
.notification-count[hidden] {
    display: none !important;
}

/* ===== ZAGLAVLJE ===== */
.notification-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 15px 17px;
    border-bottom: 1px solid #e6ecef;
}

.notification-read-all {
    background: none;
    border: 0;
    color: #236aa5;
    cursor: pointer;
    font-size: 12px;
}

.notification-read-all:hover {
    color: #14518a;
    text-decoration: underline;
}

/* ===== STAVKE ===== */
.notification-item {
    position: relative;
    display: flex;
    flex-direction: column;
    text-align: left;
    gap: 5px;
    width: 100%;
    padding: 14px 18px 14px 29px;
    background: #fff;
    border: 0;
    border-bottom: 1px solid #eef1f3;
    cursor: pointer;
    color: inherit;
    transition: background-color 0.15s ease;
}

/* Uspravna linija — siva za pročitano, plava za nepročitano. */
.notification-item::before {
    content: "";
    position: absolute;
    left: 15px;
    top: 14px;
    bottom: 14px;
    width: 3px;
    border-radius: 4px;
    background: #d6dfe8;
}

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

.notification-item.unread::before {
    background: #2788e4;
}

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

.notification-item strong {
    font-size: 13px;
    font-weight: 650;
    line-height: 1.4;
}

.notification-item span {
    font-size: 13px;
    line-height: 1.45;
}

.notification-item small {
    color: #667780;
    font-size: 11px;
}

.notification-item:focus-visible {
    outline: 2px solid #2788e4;
    outline-offset: -3px;
}

.notification-muted {
    padding: 20px;
    color: #657780;
    text-align: center;
}

/* ===== USKLAĐENI PANELI — PORUKE I OBAVJEŠTENJA ===== */
.notification-heading {
    border-bottom: 2px solid #2788e4;
}

.chat-notification-panel {
    box-sizing: border-box;
}

.chat-notification-panel .notification-heading strong {
    font-size: 14px;
}



.notification-panel {
    border-top: 1px solid #dce6e9;
    border-bottom: 2px solid #2788e4;

    border-radius: 13px;
    overflow: auto;
}


/* =====================================================
   NOTIFIKACIJE — SKRIVENA SKROL TRAKA
   ===================================================== */

.notification-panel {
    overflow-y: auto;
    overflow-x: hidden;

    scrollbar-width: none;
    -ms-overflow-style: none;
}

.notification-panel::-webkit-scrollbar {
    display: none;
}


/* =====================================================
   MOBILNE NOTIFIKACIJE — IZNAD SIDEBARA
   ===================================================== */
@media (max-width: 700px) {
    body > .notification-panel {
        position: fixed !important;
        top: max(88px, env(safe-area-inset-top, 0px) + 70px) !important;
        left: 10px !important;
        right: 10px !important;
        bottom: 12px !important;
        width: auto !important;
        max-width: none !important;
        max-height: none !important;
        z-index: 99999 !important;
        padding: 10px !important;
        background: #f8fafc;
        border: 1px solid #dce6ed;
        border-bottom: 2px solid #2788e4;
        border-radius: 12px;
        box-shadow: 0 12px 40px rgba(15, 35, 55, .22);
        overscroll-behavior: contain;
    }

    body > .notification-panel .notification-heading {
        position: sticky;
        top: -10px;
        z-index: 1;
        margin: -10px -10px 10px;
        padding: 13px 14px;
        background: #fff;
        border-radius: 12px 12px 0 0;
        border-bottom: 2px solid #2788e4;
    }

    body > .notification-panel .notification-item {
        width: 100%;
        min-width: 0;
        margin-bottom: 9px;
        padding: 12px 13px 14px;
        background: #fff;
        border: 1px solid #dce5ed;
        border-bottom: 2px solid #2788e4;
        border-radius: 10px;
        overflow-wrap: anywhere;
        white-space: normal;
    }

    body > .notification-panel .notification-item::before {
        display: none;
    }

    body > .notification-panel .notification-item.unread {
        background: #eff6ff;
    }

    body > .notification-panel .notification-item strong,
    body > .notification-panel .notification-item span,
    body > .notification-panel .notification-item small {
        max-width: 100%;
        white-space: normal;
        overflow-wrap: anywhere;
    }
}


/* =====================================================
   CHAT OBAVJEŠTENJA — DESKTOP I MOBILNI PANEL
   ===================================================== */

@media (min-width: 701px) {
    .chat-notification-panel {
        position: absolute;
        top: calc(100% + 12px);
        right: 0;
        width: min(390px, calc(100vw - 28px));
        z-index: 1500;
    }
}

@media (max-width: 700px) {
    body > .chat-notification-panel {
        box-sizing: border-box;
    }

    body > .chat-notification-panel .notification-item {
        text-align: left;
    }
}


/* =====================================================
   CHAT NOTIFIKACIJE — BROJ PORUKA PO RAZGOVORU
   ===================================================== */
.chat-notification-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    min-width: 0;
}

.chat-notification-title-row strong {
    min-width: 0;
    overflow-wrap: anywhere;
}

.chat-notification-unread-count {
    flex: none;
    display: inline-grid;
    place-items: center;
    min-width: 23px;
    height: 23px;
    padding: 0 6px;
    border-radius: 14px;
    background: #1977b9;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}
