/**
 * Notification System CSS
 * Modern toast notification styling
 */

/* Container */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    pointer-events: none;
    max-width: 400px;
}

/* Notification base */
.notification {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    margin-bottom: 12px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15), 
                0 4px 8px rgba(0, 0, 0, 0.1);
    pointer-events: auto;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    min-width: 300px;
    max-width: 400px;
    border-left: 4px solid #667eea;
}

/* Show/Hide states */
.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification.hide {
    opacity: 0;
    transform: translateX(400px) scale(0.95);
}

/* Icon */
.notification-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-top: 2px;
}

/* Content */
.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-weight: 600;
    font-size: 15px;
    line-height: 1.4;
    margin-bottom: 4px;
    color: #1a202c;
}

.notification-message {
    font-size: 14px;
    line-height: 1.5;
    color: #4a5568;
    word-wrap: break-word;
}

/* Close button */
.notification-close {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #a0aec0;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
    padding: 0;
    margin: -4px -4px 0 0;
}

.notification-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #4a5568;
}

.notification-close:active {
    transform: scale(0.95);
}

/* Progress bar */
.notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: currentColor;
    opacity: 0.3;
    transform-origin: left;
    animation: notification-progress linear forwards;
}

@keyframes notification-progress {
    from {
        transform: scaleX(1);
    }
    to {
        transform: scaleX(0);
    }
}

/* Type variants */
.notification-success {
    border-left-color: #48bb78;
}

.notification-success .notification-icon {
    color: #48bb78;
}

.notification-success .notification-progress {
    background: #48bb78;
}

.notification-error {
    border-left-color: #f56565;
}

.notification-error .notification-icon {
    color: #f56565;
}

.notification-error .notification-progress {
    background: #f56565;
}

.notification-warning {
    border-left-color: #ed8936;
}

.notification-warning .notification-icon {
    color: #ed8936;
}

.notification-warning .notification-progress {
    background: #ed8936;
}

.notification-info {
    border-left-color: #4299e1;
}

.notification-info .notification-icon {
    color: #4299e1;
}

.notification-info .notification-progress {
    background: #4299e1;
}

.notification-alert {
    border-left-color: #9f7aea;
}

.notification-alert .notification-icon {
    color: #9f7aea;
}

.notification-alert .notification-progress {
    background: #9f7aea;
}

/* Confirm dialog */
.notification-confirm {
    border-left-color: #667eea;
}

.notification-confirm .notification-icon {
    color: #667eea;
}

.notification-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.notification-btn {
    flex: 1;
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.notification-btn-confirm {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.notification-btn-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.notification-btn-cancel {
    background: #e2e8f0;
    color: #4a5568;
}

.notification-btn-cancel:hover {
    background: #cbd5e0;
}

.notification-btn:active {
    transform: scale(0.98);
}

/* Clickable notifications */
.notification[style*="cursor: pointer"]:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .notification {
        background: #2d3748;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    }

    .notification-title {
        color: #f7fafc;
    }

    .notification-message {
        color: #e2e8f0;
    }

    .notification-close {
        color: #cbd5e0;
    }

    .notification-close:hover {
        background: rgba(255, 255, 255, 0.1);
        color: #f7fafc;
    }

    .notification-btn-cancel {
        background: #4a5568;
        color: #e2e8f0;
    }

    .notification-btn-cancel:hover {
        background: #718096;
    }
}

/* Position variants */
.notification-container.top-left {
    top: 20px;
    left: 20px;
    right: auto;
}

.notification-container.top-left .notification {
    transform: translateX(-400px);
}

.notification-container.top-left .notification.show {
    transform: translateX(0);
}

.notification-container.top-left .notification.hide {
    transform: translateX(-400px) scale(0.95);
}

.notification-container.bottom-right {
    top: auto;
    bottom: 20px;
}

.notification-container.bottom-left {
    top: auto;
    bottom: 20px;
    left: 20px;
    right: auto;
}

.notification-container.bottom-left .notification {
    transform: translateX(-400px);
}

.notification-container.bottom-left .notification.show {
    transform: translateX(0);
}

.notification-container.bottom-left .notification.hide {
    transform: translateX(-400px) scale(0.95);
}

.notification-container.top-center,
.notification-container.bottom-center {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
}

.notification-container.top-center {
    top: 20px;
}

.notification-container.bottom-center {
    top: auto;
    bottom: 20px;
}

.notification-container.top-center .notification,
.notification-container.bottom-center .notification {
    transform: translateY(-100px);
}

.notification-container.top-center .notification.show,
.notification-container.bottom-center .notification.show {
    transform: translateY(0);
}

.notification-container.top-center .notification.hide,
.notification-container.bottom-center .notification.hide {
    transform: translateY(-100px) scale(0.95);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .notification-container {
        left: 10px;
        right: 10px;
        max-width: none;
    }

    .notification {
        min-width: auto;
        max-width: none;
    }

    .notification-container.top-center,
    .notification-container.bottom-center {
        transform: none;
        left: 10px;
        right: 10px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .notification,
    .notification-close,
    .notification-btn {
        transition: none;
        animation: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .notification {
        border: 2px solid currentColor;
    }

    .notification-close:hover {
        outline: 2px solid currentColor;
    }
}

