.shadow-inset-warning {
    box-shadow: inset #c2920080 0 0 20px 1px;
}

.shadow-inset-primary {
    box-shadow: inset #0a58ca80 0 0 20px 1px;
}

.notifications-btn {
    position: relative;
}

.notifications-btn:focus,
.notifications-btn:active:focus {
    box-shadow: none;
}

.notifications-btn-icon.ring {
    display: block;
    animation: ring 4s ease-in-out;
}

.notifications-icon {
    position: relative;
    display: inline-flex;
    width: 25px;
    height: 25px;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notifications-badge {
    position: absolute;
    top: -4px;
    right: -5px;
    min-width: 18px;
    height: 18px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--Colors-Yellow, #FC0);
    color: var(--Text-Black);
}

.notifications-card {
    display: none;
    flex-direction: column;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 400px;
    max-width: 90vw;
    background: var(--bs-white);
    border: 1px solid var(--VNav-primary-blue);
    box-shadow: 0px 0px 30px rgba(82, 63, 105, 0.2);
    z-index: 1000;
    --before-right: 215px;
    --before-size: 10;
    transform: translateY(4px);
}

    .notifications-card::before {
        content: "";
        position: absolute;
        top: -5px;
        right: var(--before-right, 32px);
        width: 12px;
        height: 12px;
        background: var(--VNav-primary-blue);
        transform: rotate(45deg);
        border-left: 1px solid var(--VNav-primary-blue);
        border-top: 1px solid var(--VNav-primary-blue);
        z-index: 1;
    }

.notifications-card.show {
    display: flex;
    animation: fadeIn 0.3s;
}

    .notifications-card .notifications-header {
        /* overridden in Dropdown redesign section below */
    }

    .notifications-card .notifications-title {
        line-height: 1rem;
    }

.notifications-card .notifications-title small {
    color: var(--bs-gray-600);
    font-size: 0.7em;
}

.notifications-card .notifications-read-all-btn {
    font-size: 1.5rem;
}

.notifications-card .notifications-body {
    overflow-y: auto;
    max-height: 300px;
    flex-shrink: 1;
}

.notifications-card .notifications-footer {
    flex-shrink: 0;
}

.notifications-card .notifications-empty {
    padding: 1rem;
    text-align: center;
}

.notifications-card .notifications-empty:not(:only-child) {
    display: none;
}

.notifications-card .notifications-item {
    display: flex;
    border-left: 3px solid transparent;
}

.notifications-card .notifications-item[data-action] {
    cursor: pointer;
}

.notifications-card .notifications-item:not(.read) {
    border-left-color: var(--bs-info);
    background: rgba(var(--bs-info-rgb), 0.05);
    font-weight: 600;
}

.notifications-item:not([data-action]) [data-action-type="view"] {
    display: none;
}

.notifications-item.read [data-action-type="read"] {
    display: none !important;
}

.notifications-card .notifications-item:not(.read) .notifications-item-title {
    font-weight: 600;
}

.notifications-card .notifications-item-content {
    padding: 1rem 0 0.5rem 0;
    margin: 0 1rem;
    flex-grow: 1;
    width: min-content;
}

.notifications-card .notifications-item:not(:last-child) .notifications-item-content {
    border-bottom: 1px solid #EBEDF3;
}

.notifications-card .notifications-item:not(:last-child).notification-actions-swiping .notifications-item-content,
.notifications-card .notifications-item:not(:last-child).notification-actions-open .notifications-item-content {
    margin-right: 0;
    padding-right: 1rem;
}

.notifications-card .notifications-item-header {
    display: flex;
}

.notifications-card .notifications-item-title {
    flex-grow: 1;
}

.notifications-card .notifications-item-date {
    font-size: .8em;
    text-align: end;
}

.notifications-card .notifications-item-body {
    display: flex;
}

.notifications-card .notifications-item-description {
    flex-grow: 1;
    font-size: 0.9em;
}

.notifications-card .notifications-item.notification-actions-swiping .notifications-item-description,
.notifications-card .notifications-item.notification-actions-open .notifications-item-description {
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    width: 0;
    line-clamp: 2;
}

.notifications-card .notifications-item-read-circle {
    display: block;
    background: var(--bs-primary);
    height: 12px;
    width: 12px;
    border-radius: 50%;
    margin-left: 0.5rem;
    margin-top: 0.2rem;
    cursor: pointer;
}

.notifications-card .notifications-item-delete {
    display: flex;
    align-items: end;
}

.notifications-card .notifications-item-delete i {
    cursor: pointer;
}

.notifications-card .notifications-item-actions {
    width: 0;
    max-width: max-content;
    overflow: hidden;
    display: flex;
}

.notifications-card .notifications-item:not(:last-child) .notifications-item-actions {
    border-bottom: 1px solid #EBEDF3;
}

.notifications-card .notifications-item-actions .notifications-item-action {
    width: 40px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.notifications-card .notifications-item-actions .notifications-item-action i {
    -webkit-text-stroke: 0.5px;
}

.notifications-card .notifications-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-top: none;
    flex-shrink: 0;
    background: var(--VNav-primary-blue);
    padding: .6rem 1rem;
}

.notifications-card .notifications-footer-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1rem;
    color: var(--bs-black-rgb);
    background: var(--VNav-primary-blue);
    font-weight: 600;
    text-decoration: none;
    width: 100%;
}

.notifications-card .notifications-footer-link .notifications-badge {
    position: relative;
    margin-left: 0.4rem;
}

.notifications-card .notifications-footer-link:hover {
    color: var(--bs-gray-600);
}

.notifications-item:not(.read) .notification-read-badge {
    display: none;
}

.notifications-item.read .notification-not-read-badge {
    display: none;
}

@media (hover: hover) {
    .notifications-card .notifications-title small {
        display: none;
    }

    .notifications-card .notifications-item-header {
        position: relative;
    }

    .notifications-card .notifications-item.read .notifications-item-read-circle {
        display: none;
    }
}

@media (hover: none) {
    .notifications-card .notifications-item-read-circle {
        display: none;
    }

    .notifications-card .notifications-item-delete {
        display: none;
    }
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* ── Dropdown item severity dot ─────────────────────────── */
.notifications-item-severity {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-right: 6px;
    margin-top: 4px;
}

.notifications-severity-info    { background-color: var(--bs-info, #0dcaf0); }
.notifications-severity-success { background-color: var(--bs-success, #198754); }
.notifications-severity-warning { background-color: var(--bs-warning, #ffc107); }
.notifications-severity-error   { background-color: var(--bs-danger, #dc3545); }

/* Dropdown redesign */

/* White title in the blue header — full width, centered */
.notifications-card .notifications-header {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: .6rem 1rem !important;
    background: var(--VNav-primary-blue) !important;
    border-bottom: 1px solid #EBEDF3 !important;
}

.notifications-card .notifications-header .notifications-title {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    color: #fff !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    margin: 0 !important;
    line-height: 1.4 !important;
}

/* Title + date side-by-side, date pushed right */
.notifications-card .notifications-item-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}

.notifications-card .notifications-item-title {
    flex: 1;
    margin-bottom: 2px;
    font-size: .9rem;
    white-space: normal;
}

.notifications-card .notifications-item-date {
    white-space: nowrap;
    flex-shrink: 0;
}

/* "Click here for details." — yellow link */
.notifications-card .notifications-item-body {
    display: block;
    padding-bottom: .25rem;
}

.notifications-item-details-link {
    font-size: .85rem;
    color: var(--nacor-blue, #1226AA) !important;
    text-decoration: underline;
}

/* VIEW ALL ALERTS button */

.notifications-view-all-btn {
    display: inline-block;
    width: auto;
    letter-spacing: .06em;
    font-size: .85rem;
    padding: .45rem 1.5rem;
    text-align: center;
    background-color: var(--color-tertiary) !important;
    color: #000 !important;
    border: none;
    font-weight: 700;
    text-decoration: none;
}

    .notifications-view-all-btn:hover {
        background-color: var(--color-tertiary) !important;
        color: #000 !important;
    }

/* ── Alerts page ────────────────────────────────────────── */
.alerts-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.alert-item {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid rgba(0,0,0,.08);
    padding: 1rem 0;
}

.alert-item--unread .alert-item-title {
    font-weight: 600;
}

.alert-item-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-top: .4rem;
    flex-shrink: 0;
    margin-right: .75rem;
}

.alert-item-indicator.alert-severity-info    { background-color: var(--bs-info, #0dcaf0); }
.alert-item-indicator.alert-severity-success { background-color: var(--bs-success, #198754); }
.alert-item-indicator.alert-severity-warning { background-color: var(--bs-warning, #ffc107); }
.alert-item-indicator.alert-severity-error   { background-color: var(--bs-danger, #dc3545); }

.alert-item-body {
    flex: 1;
}

.alert-item-title {
    font-size: 1rem;
    margin-bottom: .25rem;
}

.alert-item-description {
    font-size: .9rem;
    margin-bottom: .35rem;
}

.alert-item-date {
    font-size: .8rem;
    display: block;
    margin-top: .4rem;
}

.alerts-empty {
    padding: 3rem 0;
}

@keyframes ring {
    0% { transform: rotate(0); }
    1% { transform: rotate(30deg); }
    3% { transform: rotate(-28deg); }
    5% { transform: rotate(34deg); }
    7% { transform: rotate(-32deg); }
    9% { transform: rotate(30deg); }
    11% { transform: rotate(-28deg); }
    13% { transform: rotate(26deg); }
    15% { transform: rotate(-24deg); }
    17% { transform: rotate(22deg); }
    19% { transform: rotate(-20deg); }
    21% { transform: rotate(18deg); }
    23% { transform: rotate(-16deg); }
    25% { transform: rotate(14deg); }
    27% { transform: rotate(-12deg); }
    29% { transform: rotate(10deg); }
    31% { transform: rotate(-8deg); }
    33% { transform: rotate(6deg); }
    35% { transform: rotate(-4deg); }
    37% { transform: rotate(2deg); }
    39% { transform: rotate(-1deg); }
    41% { transform: rotate(1deg); }

    43% { transform: rotate(0); }
    100% { transform: rotate(0); }
}
