/* ══════════════════════════════════════════
   MPD Notifications — Clopoțel & Dropdown
   ══════════════════════════════════════════ */

/* ─── Wrap ─── */
.mpd-notif-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    z-index: 9999;
}

/* ─── Bell Button ─── */
.mpd-notif-bell {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #f0f2f7;
    color: #1a2a4a;
    cursor: pointer;
    transition: all 0.25s ease;
    outline: none;
}
.mpd-notif-bell:hover {
    background: #e2e6f0;
    transform: scale(1.08);
}
.mpd-notif-bell:active {
    transform: scale(0.95);
}

/* Badge roșu */
.mpd-notif-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    padding: 0 5px;
    border-radius: 18px;
    background: #e53935;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    text-align: center;
    box-shadow: 0 2px 6px rgba(229, 57, 53, 0.5);
    animation: mpd-notif-pulse 2s ease-in-out infinite;
    pointer-events: none;
}

@keyframes mpd-notif-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* ─── Dropdown ─── */
.mpd-notif-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 380px;
    max-height: 480px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 12px 48px rgba(15, 26, 62, 0.18), 0 2px 8px rgba(15, 26, 62, 0.08);
    border: 1px solid #e8ecf3;
    display: none;
    flex-direction: column;
    overflow: hidden;
    transform-origin: top right;
    animation: mpd-notif-slide-in 0.2s ease-out;
    z-index: 10000;
}
.mpd-notif-dropdown.mpd-notif-open {
    display: flex;
}

@keyframes mpd-notif-slide-in {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Arrow pointer */
.mpd-notif-dropdown::before {
    content: '';
    position: absolute;
    top: -7px;
    right: 14px;
    width: 14px;
    height: 14px;
    background: #fff;
    border: 1px solid #e8ecf3;
    border-right: none;
    border-bottom: none;
    transform: rotate(45deg);
    z-index: 1;
}

/* ─── Header ─── */
.mpd-notif-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 12px;
    border-bottom: 1px solid #f0f2f7;
}
.mpd-notif-header-title {
    font-size: 15px;
    font-weight: 800;
    color: #1a2a4a;
    letter-spacing: -0.2px;
}
.mpd-notif-mark-all {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #4f6ef7;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 6px;
    transition: background 0.2s;
}
.mpd-notif-mark-all:hover {
    background: #f0f4ff;
}

/* Close Button (X) */
.mpd-notif-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid #e2e6f0;
    background: #f7f8fb;
    color: #6b7a99;
    cursor: pointer;
    padding: 0;
    transition: all 0.2s ease;
    flex-shrink: 0;
}
.mpd-notif-close:hover {
    background: #e8ecf3;
    color: #1a2a4a;
    border-color: #d0d7e2;
}
.mpd-notif-close:active {
    transform: scale(0.92);
}

/* ─── List ─── */
.mpd-notif-list {
    flex: 1;
    overflow-y: auto;
    max-height: 360px;
    scrollbar-width: thin;
    scrollbar-color: #d0d7e2 transparent;
}
.mpd-notif-list::-webkit-scrollbar {
    width: 5px;
}
.mpd-notif-list::-webkit-scrollbar-track {
    background: transparent;
}
.mpd-notif-list::-webkit-scrollbar-thumb {
    background: #d0d7e2;
    border-radius: 5px;
}

/* ─── Item ─── */
.mpd-notif-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 20px;
    cursor: pointer;
    transition: background 0.15s;
    position: relative;
    border-bottom: 1px solid #f7f8fb;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(0,0,0,0.05);
}
.mpd-notif-item:last-child {
    border-bottom: none;
}
.mpd-notif-item:hover {
    background: #f7f9ff;
}
.mpd-notif-item.mpd-notif-unread {
    background: #f0f4ff;
}
.mpd-notif-item.mpd-notif-unread:hover {
    background: #e8eeff;
}

/* Icon */
.mpd-notif-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

/* Content */
.mpd-notif-content {
    flex: 1;
    min-width: 0;
}
.mpd-notif-title {
    font-size: 13px;
    font-weight: 600;
    color: #1a2a4a;
    line-height: 1.35;
    margin-bottom: 2px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.mpd-notif-msg {
    font-size: 12px;
    color: #6b7a99;
    line-height: 1.4;
    margin-bottom: 3px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}
.mpd-notif-time {
    font-size: 11px;
    color: #97a3bc;
    font-weight: 500;
}

/* Unread dot */
.mpd-notif-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4f6ef7;
    flex-shrink: 0;
    margin-top: 6px;
    box-shadow: 0 0 0 3px rgba(79, 110, 247, 0.15);
}

/* ─── Empty State ─── */
.mpd-notif-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #97a3bc;
    font-size: 13px;
    font-weight: 500;
}

/* ─── Footer ─── */
.mpd-notif-footer {
    padding: 10px 20px;
    border-top: 1px solid #f0f2f7;
    text-align: center;
}
.mpd-notif-footer button {
    background: none;
    border: none;
    color: #4f6ef7;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    padding: 6px 16px;
    border-radius: 8px;
    transition: background 0.2s;
    width: 100%;
}
.mpd-notif-footer button:hover {
    background: #f0f4ff;
}

/* ═══════════════════════════════════
   MOBILE — Full-width dropdown
   ═══════════════════════════════════ */
@media (max-width: 600px) {
    .mpd-notif-dropdown {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-height: 75vh;
        border-radius: 20px 20px 0 0;
        animation: mpd-notif-slide-up 0.25s ease-out;
    }
    .mpd-notif-dropdown::before {
        display: none;
    }

    @keyframes mpd-notif-slide-up {
        from {
            opacity: 0;
            transform: translateY(100%);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Backdrop eliminat — intercepta touch pe itemii de notificare */

    /* Drag handle on mobile */
    .mpd-notif-header::before {
        content: '';
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 36px;
        height: 4px;
        border-radius: 4px;
        background: #d0d7e2;
    }
    .mpd-notif-header {
        position: relative;
        padding-top: 24px;
    }
}

/* Tablet */
@media (min-width: 601px) and (max-width: 768px) {
    .mpd-notif-dropdown {
        width: 340px;
    }
}
