/* Toast Notifications System - Top Right Corner */

#toastContainer {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
    pointer-events: none;
}

.toast-notification {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    animation: slideInRight 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
    font-weight: 500;
    max-width: 100%;
    word-wrap: break-word;
}

.toast-notification.removing {
    animation: slideOutRight 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

/* Toast Types */

.toast-notification.success {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.4), rgba(34, 197, 94, 0.25));
    color: #ffffff;
    border-color: rgba(34, 197, 94, 0.6);
}

.toast-notification.success .toast-icon {
    color: #22c55e;
}

.toast-notification.error,
.toast-notification.danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.4), rgba(239, 68, 68, 0.25));
    color: #ffffff;
    border-color: rgba(239, 68, 68, 0.6);
}

.toast-notification.error .toast-icon,
.toast-notification.danger .toast-icon {
    color: #ef4444;
}

.toast-notification.warning {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.4), rgba(249, 115, 22, 0.25));
    color: #ffffff;
    border-color: rgba(249, 115, 22, 0.6);
}

.toast-notification.warning .toast-icon {
    color: #f97316;
}

.toast-notification.info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.4), rgba(59, 130, 246, 0.25));
    color: #ffffff;
    border-color: rgba(59, 130, 246, 0.6);
}

.toast-notification.info .toast-icon {
    color: #3b82f6;
}

/* Toast Icon */

.toast-icon {
    font-size: 18px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Toast Close Button */

.toast-close {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 16px;
    padding: 0;
    margin-left: 8px;
    flex-shrink: 0;
    opacity: 0.7;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

/* Toast Message */

.toast-message {
    flex: 1;
    line-height: 1.4;
}

/* Responsive */

@media (max-width: 576px) {
    #toastContainer {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .toast-notification {
        padding: 12px 14px;
        font-size: 13px;
    }

    .toast-icon {
        font-size: 16px;
    }
}

/* Dark mode adjustments */

[data-theme="dark"] .toast-notification {
    background: linear-gradient(135deg, rgba(30, 30, 30, 0.8), rgba(20, 20, 20, 0.8));
}

[data-theme="dark"] .toast-notification.success {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.5), rgba(34, 197, 94, 0.35));
    color: #ffffff;
}

[data-theme="dark"] .toast-notification.error,
[data-theme="dark"] .toast-notification.danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.5), rgba(239, 68, 68, 0.35));
    color: #ffffff;
}

[data-theme="dark"] .toast-notification.warning {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.5), rgba(249, 115, 22, 0.35));
    color: #ffffff;
}

[data-theme="dark"] .toast-notification.info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.5), rgba(59, 130, 246, 0.35));
    color: #ffffff;
}
