.notification-wrapper {
    position: relative;
    margin-right: 24px;
}

.notification-bell {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 20%;
    border: none;
    background: #f3f6fb;
    color: #1068b6;
    font-size: 20px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.notification-bell:hover,
.notification-bell:focus {
    background: #e2ecf9;
    color: #0a4c88;
    outline: none;
}

.notification-bell:focus-visible {
    box-shadow: 0 0 0 3px rgba(16, 104, 182, 0.3);
}

.notification-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #ff5a5f;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    line-height: 18px;
    text-align: center;
}

.notification-dropdown {
    --dropdown-offset-x: 0px;
    --dropdown-arrow-left: auto;
    --dropdown-arrow-right: 24px;
    position: absolute;
    top: 56px;
    right: 0;
    width: 340px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(15, 41, 77, 0.18);
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transform: translate3d(var(--dropdown-offset-x), 12px, 0);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    z-index: 1000;
}

.notification-dropdown::before {
    content: "";
    position: absolute;
    top: -10px;
    left: var(--dropdown-arrow-left);
    right: var(--dropdown-arrow-right);
    width: 16px;
    height: 16px;
    background: #fff;
    transform: rotate(45deg);
    box-shadow: -4px -4px 12px rgba(15, 41, 77, 0.05);
}

.notification-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translate3d(var(--dropdown-offset-x), 0, 0);
}

.notification-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.notification-header h6 {
    margin: 0;
    font-size: 15px;
    color: #0f294d;
    font-weight: 700;
}

.notification-mark-read {
    background: none;
    border: none;
    padding: 0;
    font-size: 13px;
    color: #1068b6;
    font-weight: 600;
    cursor: pointer;
}

.notification-mark-read:hover,
.notification-mark-read:focus {
    text-decoration: underline;
    outline: none;
}

.notification-mark-read[disabled] {
    color: #a6b4c6;
    cursor: not-allowed;
    text-decoration: none;
}

.notification-empty {
    padding: 16px;
    text-align: center;
    font-size: 13px;
    color: #6c7a91;
}

.notification-empty p {
    margin: 0;
}

.notification-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border-radius: 10px;
    background: #f8fbff;
    color: inherit;
    text-decoration: none;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.notification-item:hover,
.notification-item:focus {
    background: #eaf3ff;
    box-shadow: inset 0 0 0 1px rgba(16, 104, 182, 0.12);
}

.notification-item.is-read {
    background: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(15, 41, 77, 0.06);
}

.notification-item.is-read .notification-text {
    color: #6c7a91;
}

.notification-avatar {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1068b6, #28a9e0);
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-content {
    flex: 1;
    min-width: 0;
    overflow: visible;
}

.notification-title {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 600;
    color: #0f294d;
    word-wrap: break-word;
}

.notification-text {
    margin: 0 0 6px;
    font-size: 13px;
    line-height: 1.4;
    color: #0f294d;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.notification-text strong {
    font-weight: 700;
}

.notification-time {
    font-size: 12px;
    color: #6c7a91;
}

@media (max-width: 1199.98px) {
    .notification-wrapper-mobile {
        margin-right: 0;
    }
}

@media (max-width: 575.98px) {
    .notification-wrapper .notification-dropdown {
        max-width: calc(100vw - 32px);
    }

    .notification-wrapper .notification-dropdown.align-left {
        left: 0;
        right: auto;
        --dropdown-arrow-left: clamp(12px, calc((44px / 2) - 8px), 24px);
        --dropdown-arrow-right: auto;
    }

    .notification-wrapper-mobile {
        margin-left: auto;
        margin-right: 0;
    }

    .notification-wrapper-mobile .notification-dropdown {
        top: 52px;
        right: 0;
        left: auto;
        width: clamp(240px, calc(100vw - 32px), 320px);
        max-width: calc(100vw - 32px);
        --dropdown-arrow-right: clamp(12px, calc((44px / 2) - 8px), 18px);
    }

    .notification-wrapper-mobile .notification-dropdown::before {
        right: var(--dropdown-arrow-right);
        content: none;
    }

    .notification-wrapper-mobile .notification-dropdown.show {
        transform: translate3d(var(--dropdown-offset-x), 0, 0);
    }
}

@media (max-width: 576px) {
    .notification-wrapper:not(.notification-wrapper-mobile) .notification-dropdown {
        right: auto;
        left: 50%;
        transform: translate3d(calc(-50% + var(--dropdown-offset-x)), 12px, 0);
    }

    .notification-wrapper:not(.notification-wrapper-mobile) .notification-dropdown.align-left {
        left: 0;
        right: auto;
        transform: translate3d(var(--dropdown-offset-x), 12px, 0);
        --dropdown-arrow-left: clamp(12px, calc((44px / 2) - 8px), 24px);
        --dropdown-arrow-right: auto;
    }

    .notification-wrapper:not(.notification-wrapper-mobile) .notification-dropdown.show {
        transform: translate3d(calc(-50% + var(--dropdown-offset-x)), 0, 0);
    }

    .notification-wrapper:not(.notification-wrapper-mobile) .notification-dropdown.align-left.show {
        transform: translate3d(var(--dropdown-offset-x), 0, 0);
    }
}
