/* Variables de Tema Claro y Oscuro */
:root, [data-theme="light"] {
    --notif-bg: rgba(255, 255, 255, 0.9);
    --notif-text-title: #1d1d1f;
    --notif-text-desc: #86868b;
    --notif-border: rgba(0, 0, 0, 0.05);
    --notif-shadow: rgba(0, 0, 0, 0.1);
    --notif-btn-bg: rgba(0, 0, 0, 0.05);
    --notif-btn-hover: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
    --notif-bg: rgba(28, 28, 30, 0.95);
    --notif-text-title: #f5f5f7;
    --notif-text-desc: #a1a1a6;
    --notif-border: rgba(255, 255, 255, 0.08);
    --notif-shadow: rgba(0, 0, 0, 0.35);
    --notif-btn-bg: rgba(255, 255, 255, 0.1);
    --notif-btn-hover: rgba(255, 255, 255, 0.15);
}

#notificaciones-container {
    position: fixed;
    top: 20px;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 9999;
    pointer-events: none;
    gap: 12px;
}

.notificacion-toast {
    position: relative;
    background-color: var(--notif-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 999px;
    box-shadow: 0 12px 40px var(--notif-shadow), inset 0 0 0 1px var(--notif-border);
    height: 48px; 
    min-width: 48px;
    width: 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow: hidden;
    pointer-events: auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    cursor: pointer; 
    
    transform: translateY(-80px) scale(0.6);
    opacity: 0;
    
    transition: 
        transform 0.65s cubic-bezier(0.34, 1.25, 0.3, 1),
        opacity 0.4s ease-out,
        width 0.6s cubic-bezier(0.34, 1.25, 0.3, 1),
        height 0.6s cubic-bezier(0.34, 1.25, 0.3, 1),
        border-radius 0.6s cubic-bezier(0.34, 1.25, 0.3, 1),
        background-color 0.4s,
        box-shadow 0.4s;
    
    will-change: transform, width, height, opacity;
}

.notificacion-toast:hover {
    box-shadow: 0 16px 50px var(--notif-shadow), inset 0 0 0 1px var(--notif-border);
}

.notificacion-toast.notif-closing-bounce {
    transition: 
        transform 0.65s cubic-bezier(0.6, -0.4, 0.2, 1),
        width 0.5s cubic-bezier(0.6, -0.25, 0.2, 1.2),
        height 0.5s cubic-bezier(0.6, -0.25, 0.2, 1.2), 
        border-radius 0.5s cubic-bezier(0.6, -0.25, 0.2, 1.2),
        opacity 0.6s cubic-bezier(0.5, 0, 1, 1),
        background-color 0.4s,
        box-shadow 0.4s;
}

.notificacion-toast.notif-enter {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.notif-content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; 
    padding: 16px 24px;
    width: max-content;
    height: max-content;
    max-width: 320px;
    opacity: 0;
    transition: opacity 0.4s ease-out 0.25s;
}

.notificacion-toast.notif-expanded .notif-content-wrapper {
    opacity: 1;
}

.notif-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.4s cubic-bezier(0.34, 1.25, 0.3, 1);
}

.notif-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    flex-shrink: 0;
}

.notif-icon svg {
    width: 12px;
    height: 12px;
    stroke-width: 3;
}

.notif-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.notif-message, .notif-actions {
    opacity: 1;
    transition: opacity 0.3s ease-out; 
}

.notificacion-toast.notif-body-hiding .notif-message,
.notificacion-toast.notif-body-hiding .notif-actions {
    opacity: 0 !important;
    pointer-events: none;
}

.notificacion-toast.notif-body-hiding .notif-content-wrapper {
    padding: 12px 20px; 
}

.notificacion-toast.notif-title-only .notif-content-wrapper {
    padding: 12px 20px; 
}

.notif-message {
    margin-top: 8px;
    font-size: 13px;
    font-weight: 400;
    color: var(--notif-text-desc);
    line-height: 1.4;
    text-align: center;
}

.notif-actions {
    margin-top: 14px;
    display: flex;
    gap: 10px;
    width: 100%;
    justify-content: center;
}

.notif-action-btn {
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 999px;
    background: var(--notif-btn-bg);
    color: var(--notif-text-title);
    transition: background 0.2s, transform 0.2s;
    cursor: pointer;
    border: none;
    line-height: 1;
    display: inline-block;
}

.notif-action-btn:hover {
    background: var(--notif-btn-hover);
    transform: scale(1.05);
}

.notif-success .notif-title { color: #30d158; }
.notif-success .notif-icon { background: rgba(48, 209, 88, 0.15); color: #30d158; }
.notif-error .notif-title { color: #ff453a; }
.notif-error .notif-icon { background: rgba(255, 69, 58, 0.15); color: #ff453a; }
.notif-warning .notif-title { color: #ff9f0a; }
.notif-warning .notif-icon { background: rgba(255, 159, 10, 0.15); color: #ff9f0a; }
.notif-info .notif-title { color: #0a84ff; }
.notif-info .notif-icon { background: rgba(10, 132, 255, 0.15); color: #0a84ff; }
