/* Base de notificación */
.notification {
    display: none;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Notificación centralizada (no full) */
.notification:not(.full-top):not(.full-bottom) {
    position: fixed;
    max-width: 400px;
    width: auto;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
}

/* Notificación en pantalla completa (full) */
/* full-top va en el flujo, no sticky: el navbar del front también es sticky en
   top:0 con mayor z-index y taparía la notificación al hacer scroll. */
.notification.full-top,
.notification.full-bottom {
    position: relative;
    width: 100%;
    border-radius: 0;
    padding: 15px 25px;
    display: flex !important;
    gap: 15px;
    align-items: center;
    justify-content: center;
}

/* Margen superior contador (no full) */
.notification:not(.full-top):not(.full-bottom) .notification-countdown {
    margin-top: 20px !important;
}

.notification.full-top, .notification-mobile.full-top {
    top: 0;
    left: 0;
    right: 0;
}

.notification.full-bottom, .notification-mobile.full-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
}

.notification-mobile.full-top {
    position: relative;
}

/* Posiciones de notificación */
.notification.top-right { top: 20px; right: 20px; }
.notification.top-left { top: 20px; left: 20px; }
.notification.top-center {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) !important;
}
.notification.bottom-right { bottom: 20px; right: 20px; }
.notification.bottom-left { bottom: 20px; left: 20px; }
.notification.bottom-center {
    position: fixed !important;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) !important;
}
.notification.center {
    position: fixed !important;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) !important;
}
.notification.right-center {
    position: fixed !important;
    top: 50%;
    right: 20px;
    transform: translateY(-50%) !important;
}
.notification.left-center {
    position: fixed !important;
    top: 50%;
    left: 20px;
    transform: translateY(-50%) !important;
}

/* Variantes de notificación por tipo */
.notification.success { background-color: #28a745 !important; color: #fff !important; }
.notification.info { background-color: #17a2b8 !important; color: #fff !important; }
.notification.warning { background-color: #ffc107 !important; color: #212529 !important; }
.notification.error { background-color: #dc3545 !important; color: #fff !important; }

/* Elementos internos */
.notification h4 {
    margin: 10px 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.notification p {
    margin: 0 0 10px;
    font-size: 1rem;
}

.notification.full-top p, .notification.full-bottom p {
    margin: 0;
}

.notification-image {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.notification.full-top .notification-image,
.notification.full-bottom .notification-image {
    height: 60px;
    width: 60px;
}

/* Botón de cierre */
.notification-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: #fff;
}

/* Contenedor y estilos del contador */
.notification-countdown {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 10px;
    margin-bottom: 10px;
}

.countdown-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    border-radius: 8px;
    padding: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.countdown-time {
    font-size: 1.2rem;
    font-weight: bold;
}

.countdown-label {
    font-size: 0.6rem;
    text-transform: uppercase;
}

/* Botón de acción */
.notification-action-container {
    display: flex;
    flex: 1;
    width: 100%;
    margin-left: auto;
}

.notification-action {
    width: 100%;
    padding: 8px 12px;
    background-color: #fff;
    color: #212529;
    border-radius: 5px;
    text-align: center;
    box-sizing: border-box;
    text-decoration: none;
}

.notification.full-top .notification-action,
.notification.full-bottom .notification-action {
    width: auto;
    max-width: initial;
    margin-left: auto;
    margin-right: 10px;
}

/* Mobile */
.notification-mobile {
    display: none;
    padding: 15px 10px 20px 10px;
    text-align: center;
    z-index: 1000;
}

.notification-mobile h4 {
    font-size: 1.5rem;
    font-weight: 600;
}

.notification-mobile p {
    font-size: 1.2rem;
    margin-bottom: 0;
}

.notification-mobile .notification-action-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.notification-mobile .notification-action {
    font-size: 1.2rem;
    width: auto;
    max-width: 75%;
}

/* Animaciones */
.notification.show {
    opacity: 1;
    transform: translateY(0);
}

.notification.hide {
    display: none !important;
}

@keyframes notification-bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-30px);
    }
    60% {
        transform: translateY(-15px);
    }
}

.notification-animation-bounce {
    animation: notification-bounce 2s infinite;
}

@keyframes notification-fade {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

.notification-animation-fade {
    animation: notification-fade 1s;
}

@keyframes notification-flip {
    0% {
        transform: rotateY(0);
    }
    100% {
        transform: rotateY(360deg);
    }
}

.notification-animation-flip {
    animation: notification-flip 1s;
}

@keyframes notification-slide-right-to-left {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(0);
    }
}

.notification-animation-slide-right-to-left {
    animation: notification-slide-right-to-left 1s;
}

@keyframes notification-slide-left-to-right {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(0);
    }
}

.notification-animation-slide-left-to-right {
    animation: notification-slide-left-to-right 1s;
}

@keyframes notification-zoom {
    0% {
        transform: scale(0);
    }
    100% {
        transform: scale(1);
    }
}

.notification-animation-zoom {
    animation: notification-zoom 1s;
}

@keyframes notification-rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.notification-animation-rotate {
    animation: notification-rotate 1s;
}

/* Media Queries */
@media (max-width: 768px) {
    .notification {
        max-width: 100%;
        padding: 10px;
    }

    .notification h4 {
        font-size: 1.1rem;
    }

    .notification p {
        font-size: 0.9rem;
    }

    .notification-action {
        padding: 6px 10px;
        font-size: 0.9rem;
    }

    .notification-image {
        width: 80%;
    }
}

@media (max-width: 480px) {
    .notification {
        max-width: 100%;
        padding: 8px;
    }

    .notification h4 {
        font-size: 1rem;
    }

    .notification p {
        font-size: 0.8rem;
    }

    .notification-action {
        padding: 5px 8px;
        font-size: 0.8rem;
    }

    .notification-image {
        width: 100%;
    }
}
