/**
 * Estilos adicionales para el Sistema de Notificaciones
 * Compatible con Materialize Template
 */

/* Animaciones mejoradas para notificaciones */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutLeft {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(-100%);
        opacity: 0;
    }
}

@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideOutDown {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(100%);
        opacity: 0;
    }
}

/* Mejoras visuales para las notificaciones */
.notyf__toast {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12) !important;
    border-radius: 12px !important;
    padding: 20px !important;
    min-width: 320px !important;
    max-width: 420px !important;
    margin: 8px 0 !important;
    position: relative;
    overflow: hidden;
}

/* Iconos mejorados */
.notyf__icon {
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: white !important;
    font-size: 16px !important;
    flex-shrink: 0 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
    position: relative !important;
}

.notyf__icon::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3));
    z-index: 1;
}

.notyf__icon i {
    position: relative;
    z-index: 2;
}

/* Mensaje mejorado */
.notyf__message {
    color: #333 !important;
    font-size: 15px !important;
    line-height: 1.5 !important;
    font-weight: 500 !important;
    flex: 1 !important;
    padding: 0 8px !important;
}

/* Botón de cierre mejorado */
.notyf__dismiss {
    background: rgba(0, 0, 0, 0.05) !important;
    border: none !important;
    color: #666 !important;
    cursor: pointer !important;
    font-size: 20px !important;
    font-weight: bold !important;
    width: 28px !important;
    height: 28px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    transition: all 0.2s ease !important;
    flex-shrink: 0 !important;
}

.notyf__dismiss:hover {
    background: rgba(0, 0, 0, 0.1) !important;
    color: #333 !important;
    transform: scale(1.1) !important;
}

/* Colores mejorados para cada tipo de notificación */
.notyf__success .notyf__icon {
    background: linear-gradient(135deg, #28c76f, #1e9e5a) !important;
}

.notyf__error .notyf__icon {
    background: linear-gradient(135deg, #ea5455, #c93c3d) !important;
}

.notyf__warning .notyf__icon {
    background: linear-gradient(135deg, #ff9f43, #e67c1f) !important;
}

.notyf__info .notyf__icon {
    background: linear-gradient(135deg, #00cfe8, #0097b3) !important;
}

/* Animaciones según la posición */
.notyf-top-right .notyf__toast {
    animation: slideInRight 0.3s ease-out;
}

.notyf-top-right .notyf__toast.hide {
    animation: slideOutRight 0.3s ease-in;
}

.notyf-top-left .notyf__toast {
    animation: slideInLeft 0.3s ease-out;
}

.notyf-top-left .notyf__toast.hide {
    animation: slideOutLeft 0.3s ease-in;
}

.notyf-bottom-right .notyf__toast,
.notyf-bottom-left .notyf__toast {
    animation: slideInUp 0.3s ease-out;
}

.notyf-bottom-right .notyf__toast.hide,
.notyf-bottom-left .notyf__toast.hide {
    animation: slideOutDown 0.3s ease-in;
}

/* Contenedor de notificaciones mejorado */
.notyf {
    z-index: 9999 !important;
    pointer-events: none !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    padding: 24px !important;
    max-height: 100vh !important;
    overflow-y: auto !important;
}

/* Scrollbar personalizado para el contenedor */
.notyf::-webkit-scrollbar {
    width: 6px;
}

.notyf::-webkit-scrollbar-track {
    background: transparent;
}

.notyf::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.notyf::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* Posiciones específicas */
.notyf-top-right {
    top: 0 !important;
    right: 0 !important;
    align-items: flex-end !important;
}

.notyf-top-left {
    top: 0 !important;
    left: 0 !important;
    align-items: flex-start !important;
}

.notyf-bottom-right {
    bottom: 0 !important;
    right: 0 !important;
    justify-content: flex-end !important;
    align-items: flex-end !important;
}

.notyf-bottom-left {
    bottom: 0 !important;
    left: 0 !important;
    justify-content: flex-end !important;
    align-items: flex-start !important;
}

/* Responsive design */
@media (max-width: 480px) {
    .notyf__toast {
        min-width: 280px !important;
        max-width: calc(100vw - 32px) !important;
        margin: 4px !important;
        padding: 16px !important;
    }

    .notyf {
        padding: 16px !important;
        gap: 8px !important;
    }

    .notyf__icon {
        width: 28px !important;
        height: 28px !important;
        font-size: 14px !important;
    }

    .notyf__message {
        font-size: 14px !important;
    }
}

/* Tema oscuro (opcional) */
@media (prefers-color-scheme: dark) {
    .notyf__toast {
        background: rgba(30, 30, 30, 0.95) !important;
        border-color: rgba(255, 255, 255, 0.1) !important;
        color: #fff !important;
    }

    .notyf__message {
        color: #fff !important;
    }

    .notyf__dismiss {
        color: #ccc !important;
        background: rgba(255, 255, 255, 0.1) !important;
    }

    .notyf__dismiss:hover {
        color: #fff !important;
        background: rgba(255, 255, 255, 0.2) !important;
    }
}

/* Clases de utilidad adicionales */
.notification-large {
    min-width: 400px !important;
    max-width: 500px !important;
}

.notification-small {

/* Estilos para el sistema de toasts */
.toast-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    position: relative;
    min-width: 300px;
    max-width: 400px;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    background: #fff;
    color: #333;
    font-size: 14px;
    line-height: 1.5;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success {
    background: #28c76f;
    color: white;
}

.toast.error {
    background: #ea5455;
    color: white;
}

.toast.warning {
    background: #ff9f43;
    color: white;
}

.toast.info {
    background: #00cfe8;
    color: white;
}

.toast-content {
    flex: 1;
}

.toast-message {
    margin-right: 12px;
}

.toast-close {
    background: transparent;
    border: none;
    color: inherit;
    font-size: 18px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    padding: 0;
    margin-left: 12px;
}

.toast-close:hover {
    opacity: 1;
}

@media (max-width: 576px) {
    .toast {
        min-width: 280px;
        max-width: calc(100vw - 40px);
    }
}
    min-width: 250px !important;
    max-width: 300px !important;
}

.notification-persistent {
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1), 0 8px 32px rgba(0, 0, 0, 0.15) !important;
}

.notification-urgent {
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(234, 84, 85, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(234, 84, 85, 0); }
    100% { box-shadow: 0 0 0 0 rgba(234, 84, 85, 0); }
}
