/* ─── User Msg Notification Widget (moderno y limpio) ─── */

.um-notif-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ─── Toggle Button ─── */
.um-notif-btn {
    position: relative;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(33,150,243,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s;
    animation: um-btn-entrance 0.5s ease-out both;
}

@keyframes um-btn-entrance {
    from {
        opacity: 0;
        transform: scale(0.5) rotate(-180deg);
    }
    to {
        opacity: 1;
        transform: scale(1) rotate(0);
    }
}

.um-notif-btn:hover {
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
    transform: scale(1.1);
    box-shadow: 0 8px 28px rgba(33,150,243,0.5);
}

.um-notif-btn:active {
    transform: scale(0.95);
}

/* ─── Badge ─── */
.um-notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 22px;
    height: 22px;
    line-height: 22px;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    color: #fff;
    border-radius: 12px;
    padding: 0 6px;
    border: 2px solid #fff;
    animation: um-badge-pulse 2s infinite;
    box-shadow: 0 2px 8px rgba(244,67,54,0.4);
}

@keyframes um-badge-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(244,67,54,0.4);
    }
    50% {
        transform: scale(1.18);
        box-shadow: 0 4px 14px rgba(244,67,54,0.6);
    }
}

/* ─── Popup ─── */
.um-notif-popup {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 370px;
    max-height: 480px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    opacity: 1;
    transform: translateY(0) scale(1);
}

.um-notif-popup.um-hidden {
    opacity: 0;
    transform: translateY(16px) scale(0.95);
    pointer-events: none;
}

/* ─── Header ─── */
.um-notif-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    background: linear-gradient(135deg, #fafbfc 0%, #f5f7fa 100%);
}

.um-notif-header strong {
    font-size: 15px;
    color: #2c3e50;
    font-weight: 700;
}

.um-notif-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #b0bec5;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s, transform 0.2s;
}

.um-notif-close:hover {
    background: rgba(0,0,0,0.06);
    color: #2c3e50;
    transform: rotate(90deg);
}

/* ─── List ─── */
.um-notif-list {
    flex: 1;
    overflow-y: auto;
    max-height: 320px;
}

.um-notif-list::-webkit-scrollbar {
    width: 6px;
}

.um-notif-list::-webkit-scrollbar-track {
    background: transparent;
}

.um-notif-list::-webkit-scrollbar-thumb {
    background: #cfd8dc;
    border-radius: 3px;
}

.um-notif-list::-webkit-scrollbar-thumb:hover {
    background: #b0bec5;
}

.um-notif-item {
    display: block;
    padding: 16px 20px;
    border-bottom: 1px solid #f5f5f5;
    text-decoration: none;
    color: #2c3e50;
    transition: background 0.2s, padding-left 0.2s;
    position: relative;
}

.um-notif-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(135deg, #2196f3, #1976d2);
    transform: scaleY(0);
    transition: transform 0.2s;
}

.um-notif-item:hover {
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f4fe 100%);
    text-decoration: none;
    color: #2c3e50;
    padding-left: 24px;
}

.um-notif-item:hover::before {
    transform: scaleY(1);
}

.um-notif-item-subject {
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 5px;
    color: #1976d2;
    display: block;
}

.um-notif-item-msg {
    font-size: 12px;
    color: #7f8c8d;
    line-height: 1.5;
    display: block;
    margin-bottom: 6px;
}

.um-notif-item-date {
    font-size: 11px;
    color: #b0bec5;
    display: block;
}

.um-notif-empty {
    padding: 40px 20px;
    text-align: center;
    color: #b0bec5;
    font-size: 14px;
}

/* ─── Footer ─── */
.um-notif-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-top: 1px solid #f0f0f0;
    background: linear-gradient(135deg, #fafbfc 0%, #f5f7fa 100%);
    gap: 8px;
}

.um-notif-viewall {
    font-size: 13px;
    font-weight: 600;
    color: #2196f3;
    text-decoration: none;
    transition: color 0.2s;
}

.um-notif-viewall:hover {
    color: #1565c0;
    text-decoration: underline;
}

.um-notif-dismiss-btn {
    font-size: 12px;
    padding: 6px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    background: #fff;
    color: #7f8c8d;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    font-weight: 500;
}

.um-notif-dismiss-btn:hover {
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
    border-color: transparent;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(33,150,243,0.3);
}

/* ─── Responsive ─── */
@media (max-width: 480px) {
    .um-notif-widget {
        bottom: 16px;
        right: 16px;
    }

    .um-notif-btn {
        width: 50px;
        height: 50px;
    }

    .um-notif-btn svg {
        width: 20px;
        height: 20px;
    }

    .um-notif-popup {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-height: 85vh;
        border-radius: 20px 20px 0 0;
    }

    .um-notif-list {
        max-height: calc(85vh - 120px);
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .um-notif-popup {
        width: 330px;
    }
}
