@font-face {
    font-family: 'Shabnam';
    src: url('../fonts/Shabnam.woff2') format('woff2'),
         url('../fonts/Shabnam.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Shabnam';
    src: url('../fonts/Shabnam-Bold.woff2') format('woff2'),
         url('../fonts/Shabnam-Bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

.site-notification-wrapper,
.site-notification-wrapper * {
    box-sizing: border-box;
    font-family: 'Shabnam', sans-serif;
}

.site-notification-wrapper {
    position: relative;
    display: inline-block;
    overflow: visible !important;
}

/* Bell */
.site-notification-bell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    appearance: none;
    -webkit-appearance: none;
    background: transparent !important;
    border: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    cursor: pointer;
    line-height: 1;
    color: #fff;
    min-height: auto !important;
    position: relative;
    transition: transform .25s ease, filter .25s ease, opacity .25s ease;
}

.site-notification-bell:hover {
    transform: translateY(-1px);
    filter: drop-shadow(0 0 10px rgba(34, 197, 94, 0.35));
}

.site-notification-bell:hover,
.site-notification-bell:focus,
.site-notification-bell:active,
.site-notification-bell:focus-visible,
.site-notification-wrapper button,
.site-notification-wrapper button:hover,
.site-notification-wrapper button:focus,
.site-notification-wrapper button:active {
    background: transparent !important;
    border: 0 !important;
    outline: none !important;
    box-shadow: none !important;
}

.site-notification-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    color: #fff;
}

.site-notification-icon svg {
    display: block;
    width: 23px;
    height: 23px;
    fill: currentColor;
}

/* Shake every 30s when unread exists */
.site-notification-wrapper.has-unread .site-notification-bell {
    animation: ntfBellNudge 30s ease-in-out infinite;
    transform-origin: top center;
}

@keyframes ntfBellNudge {
    0%, 96%, 100% { transform: rotate(0deg); }
    97% { transform: rotate(-12deg); }
    97.5% { transform: rotate(10deg); }
    98% { transform: rotate(-8deg); }
    98.5% { transform: rotate(6deg); }
    99% { transform: rotate(-3deg); }
    99.5% { transform: rotate(2deg); }
}

.site-notification-badge {
    position: absolute;
    top: -4px;
    right: -6px;
    width: 9px;
    height: 9px;
    background: #ff3b30;
    border-radius: 50%;
    box-shadow:
        0 0 0 2px rgba(255,255,255,.14),
        0 0 14px rgba(255, 59, 48, 0.45);
}

/* Dropdown */
.site-notification-dropdown {
    position: absolute;
    top: calc(100% + 14px);
    left: 0;
    width: 395px;
    max-width: 92vw;
    height: 460px !important;
    max-height: 70vh !important;
    background: linear-gradient(180deg, #ffffff 0%, #f7fff9 100%);
    border: 1px solid rgba(34, 197, 94, 0.18);
    border-radius: 22px;
    box-shadow:
        0 24px 60px rgba(15, 23, 42, 0.14),
        0 10px 28px rgba(34, 197, 94, 0.10),
        0 0 0 1px rgba(255,255,255,0.75) inset,
        0 0 24px rgba(34, 197, 94, 0.08);
    padding: 18px;
    z-index: 999999;
    text-align: right;
    overflow: hidden !important;
    pointer-events: none;

    opacity: 0;
    visibility: hidden;
    transform: translateY(-14px) scale(.98);
    transform-origin: top left;
    transition:
        opacity .28s ease,
        transform .28s ease,
        visibility .28s ease;
}

.site-notification-dropdown::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top right, rgba(74, 222, 128, 0.10), transparent 30%),
        radial-gradient(circle at bottom left, rgba(34, 197, 94, 0.07), transparent 35%);
    pointer-events: none;
}

.site-notification-wrapper.active .site-notification-dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.site-notification-wrapper .site-notification-dropdown,
.site-notification-wrapper .site-notification-list {
    pointer-events: auto !important;
}

/* Header */
.site-notification-dropdown-head {
    position: relative;
    z-index: 2;
    height: 72px !important;
    padding: 4px 4px 14px;
    margin-bottom: 10px;
    border-bottom: 1px solid #e7f4eb;
    overflow: hidden;
}

.site-notification-dropdown-title {
    font-size: 15px;
    font-weight: 700;
    color: #166534;
    line-height: 1.8;
}

.site-notification-dropdown-subtitle {
    font-size: 12px;
    color: #5f6d63;
    line-height: 1.8;
}

/* Scrollable list - fixed */
.site-notification-list {
    position: relative;
    z-index: 2;
    display: block !important;
    height: calc(100% - 82px) !important;
    max-height: calc(100% - 82px) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
    padding: 10px 4px 10px 2px;
    scrollbar-width: thin;
    scrollbar-color: #86efac transparent;
}

.site-notification-list::-webkit-scrollbar {
    width: 6px;
}

.site-notification-list::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #bbf7d0 0%, #86efac 100%);
    border-radius: 999px;
}

.site-notification-list::-webkit-scrollbar-track {
    background: transparent;
}

/* Card */
.site-notification-card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, #f6fff8 0%, #effcf3 100%);
    border: 1px solid #d7f2df;
    border-radius: 18px;
    padding: 14px 14px 13px;
    transition:
        transform .22s ease,
        box-shadow .22s ease,
        border-color .22s ease,
        background .22s ease,
        opacity .22s ease;
    box-shadow:
        0 10px 24px rgba(34, 197, 94, 0.10),
        0 2px 8px rgba(15, 23, 42, 0.04),
        0 0 0 1px rgba(255,255,255,0.65) inset;
    word-break: break-word;
}

.site-notification-card + .site-notification-card {
    margin-top: 12px;
}

.site-notification-card::before {
    content: "";
    position: absolute;
    top: -35px;
    left: -35px;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(74, 222, 128, 0.14) 0%, transparent 68%);
    pointer-events: none;
}

.site-notification-card:hover {
    transform: translateY(-2px);
    border-color: #b9e9c7;
    box-shadow:
        0 18px 36px rgba(34, 197, 94, 0.14),
        0 6px 18px rgba(15, 23, 42, 0.06),
        0 0 18px rgba(34, 197, 94, 0.10);
}

/* head row */
.site-notification-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.site-notification-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1 1 auto;
}

/* title */
.site-notification-title {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    background: linear-gradient(180deg, #ebfff1 0%, #ddfbe7 100%);
    border: 1px solid #c6efcf;
    color: #166534;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.9;
    box-shadow:
        0 4px 12px rgba(34, 197, 94, 0.08),
        0 0 12px rgba(74, 222, 128, 0.06);
    white-space: normal;
    word-break: break-word;
}

/* date */
.site-notification-date {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 400;
    color: #4b5563;
    background: #ffffff;
    border: 1px solid #e5efe8;
    padding: 5px 9px;
    border-radius: 999px;
    line-height: 1.4;
    white-space: nowrap;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.04);
}

/* message */
.site-notification-message {
    font-size: 13px;
    font-weight: 400;
    color: #374151;
    line-height: 2;
    margin-bottom: 13px;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
}

/* actions */
.site-notification-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.site-notification-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background: linear-gradient(180deg, #22c55e 0%, #16a34a 100%);
    color: #fff;
    padding: 9px 14px;
    border-radius: 11px;
    font-size: 12px;
    line-height: 1;
    transition: .22s ease;
    box-shadow:
        0 10px 18px rgba(34, 197, 94, 0.20),
        0 0 14px rgba(34, 197, 94, 0.14);
}

.site-notification-link:hover {
    background: linear-gradient(180deg, #22c55e 0%, #15803d 100%);
    color: #fff;
    transform: translateY(-1px);
    box-shadow:
        0 14px 22px rgba(34, 197, 94, 0.24),
        0 0 16px rgba(34, 197, 94, 0.18);
}

.site-notification-read-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff !important;
    color: #15803d !important;
    border: 1px solid #d4eddc !important;
    border-radius: 11px;
    padding: 9px 14px !important;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    transition: .22s ease;
    box-shadow:
        0 6px 14px rgba(34, 197, 94, 0.08),
        0 0 10px rgba(34, 197, 94, 0.04);
}

.site-notification-read-btn:hover {
    background: #f7fff9 !important;
    border-color: #bfe8cd !important;
    color: #166534 !important;
    box-shadow:
        0 10px 18px rgba(34, 197, 94, 0.10),
        0 0 12px rgba(74, 222, 128, 0.08);
}

/* Read state */
.site-notification-card.is-read {
    background: #ffffff;
    border-color: #ebebeb;
    opacity: .92;
    box-shadow:
        0 6px 14px rgba(15, 23, 42, 0.04),
        0 0 0 1px rgba(0,0,0,0.02) inset;
}

.site-notification-card.is-read::before {
    display: none;
}

.site-notification-card.is-read:hover {
    transform: none;
    border-color: #e5e7eb;
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.05);
}

.site-notification-card.is-read .site-notification-title {
    background: #f8f8f8;
    border-color: #ececec;
    color: #808892;
    box-shadow: none;
}

.site-notification-card.is-read .site-notification-message,
.site-notification-card.is-read .site-notification-date {
    color: #8a8f98;
}

.site-notification-card.is-read .site-notification-link {
    background: #f3f4f6;
    color: #6b7280;
    box-shadow: none;
}

.site-notification-card.is-read .site-notification-read-btn {
    background: #f9fafb !important;
    color: #6b7280 !important;
    border-color: #e5e7eb !important;
    box-shadow: none;
}
/* hide read badge text */
.site-notification-read-badge {
    display: none !important;
}

/* حذف متن خوانده شد */
.site-notification-read-badge {
    display: none !important;
}

@media (max-width: 767px) {
    .site-notification-wrapper .site-notification-dropdown {
        position: fixed !important;
        top: 80px !important;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;

        width: min(92vw, 420px) !important;
        max-width: 92vw !important;
        min-width: 0 !important;

        max-height: 67vh !important; /* قبلاً 78vh بود */
        height: auto !important;
        z-index: 99999 !important;
        margin: 0 !important;
        overflow: hidden !important;
    }

    .site-notification-list {
        max-height: calc(60vh - 80px) !important;
        height: auto !important;
        overflow-y: auto !important;
    }
}
