.notification-count {
    background-color: red;
    color: white;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 50%;
    position: absolute;
    top: 5px;
    right: 5px;
    z-index: 1002;
}

/* Base */
.notification-popup {
    position: absolute;
    top: 40px;
    right: -18em;
    width: 300px;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    display: none;
    padding: 10px;
    overflow-y: auto;
    max-height: 400px;
}

/* Pantallas pequeñas (320px a 479px) */
@media (max-width: 479px) {
    .notification-popup {
        top: -12em; /* Reduce la posición vertical */
        right: 24px; /* Alínea más a la izquierda para dispositivos pequeños */
        width: 90%; /* Ocupa casi todo el ancho */
        max-height: 300px; /* Reduce la altura máxima */
        padding: 8px; /* Reduce el padding */
        border-radius: 6px; /* Ajusta los bordes */
    }
}

/* Pantallas pequeñas medianas (480px a 767px) */
@media (min-width: 480px) and (max-width: 767px) {
    .notification-popup {
        top: 30px; /* Ajusta la posición vertical */
        right: -17em; /* Centra un poco más */
        width: 211%; /* Ajusta el ancho */
        max-height: 350px; /* Ajusta la altura máxima */
        padding: 10px; /* Mantén el padding */
        border-radius: 7px; /* Ajusta los bordes */
    }
}

/* Pantallas medianas (768px a 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .notification-popup {
        top: 35px; /* Ajusta ligeramente la posición vertical */
        right: -17em; /* Ajusta el posicionamiento horizontal */
        width: 280px; /* Ajusta el ancho */
        max-height: 380px; /* Incrementa la altura máxima */
        border-radius: 8px; /* Mantén los bordes */
    }
}

/* Pantallas grandes (1200px a 1499px) */
@media (min-width: 1200px) and (max-width: 1499px) {
    .notification-popup {
        top: 40px; /* Mantén la posición vertical */
        right: -18em; /* Ajusta el posicionamiento horizontal */
        width: 300px; /* Mantén el ancho */
        max-height: 400px; /* Mantén la altura máxima */
        padding: 12px; /* Incrementa ligeramente el padding */
        border-radius: 9px; /* Ajusta ligeramente los bordes */
    }
}

/* Pantallas muy grandes (1500px a 1999px) */
@media (min-width: 1500px) and (max-width: 1999px) {
    .notification-popup {
        top: 45px; /* Incrementa ligeramente la posición vertical */
        right: -20em; /* Ajusta el posicionamiento horizontal */
        width: 320px; /* Incrementa ligeramente el ancho */
        max-height: 420px; /* Incrementa la altura máxima */
        padding: 14px; /* Incrementa el padding */
        border-radius: 10px; /* Incrementa ligeramente los bordes */
    }
}

/* Pantallas ultra grandes (2000px en adelante) */
@media (min-width: 2000px) {
    .notification-popup {
        top: 50px; /* Incrementa la posición vertical */
        right: -18em; /* Mantén el posicionamiento horizontal */
        width: 350px; /* Incrementa significativamente el ancho */
        max-height: 450px; /* Incrementa significativamente la altura máxima */
        padding: 16px; /* Incrementa el padding */
        border-radius: 12px; /* Incrementa los bordes */
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25); /* Incrementa la sombra */
    }
}


.notification-popup ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.notification-popup ul li {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.notification-popup ul li:last-child {
    border-bottom: none;
}

.notification-popup ul li a {
    text-decoration: none;
    color: #333;
}

.notification-popup ul li a:hover {
    text-decoration: underline;
}

.close-notifications {
    background: transparent;
    border: none;
    font-size: 18px;
    color: #333;
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
}

.clear-notifications {
    background-color: #ff4d4d;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    margin-top: 10px;
    cursor: pointer;
    width: 100%;
    text-align: center;
}


.clear-messages{
    background-color: #ff4d4d;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    margin-top: 10px;
    cursor: pointer;
    width: 100%;
    text-align: center;
}