/**
 * Toast Notification Styles
 * Modern, beautiful toast notifications
 */

/* Toast Container */
.toast-container {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
    padding: 20px;
}

/* Position variants */
.toast-top-right {
    top: 0;
    right: 0;
}

.toast-top-left {
    top: 0;
    left: 0;
}

.toast-bottom-right {
    bottom: 0;
    right: 0;
}

.toast-bottom-left {
    bottom: 0;
    left: 0;
}

.toast-top-center {
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

/* Toast element */
.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
    pointer-events: auto;
    cursor: pointer;
    min-width: 300px;
    max-width: 100%;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Show animation */
.toast-show {
    opacity: 1;
    transform: translateX(0);
}

/* Hide animation */
.toast-hide {
    opacity: 0;
    transform: translateX(100%);
}

/* Toast icon */
.toast-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Toast content */
.toast-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.toast-message {
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    font-weight: 500;
}

/* Close button */
.toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.toast-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #666;
}

/* Toast variants */

/* Success */
.toast-success {
    border-left: 4px solid #10b981;
}

.toast-success .toast-icon {
    color: #10b981;
}

.toast-success .toast-message {
    color: #065f46;
}

/* Error */
.toast-error {
    border-left: 4px solid #ef4444;
}

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

.toast-error .toast-message {
    color: #991b1b;
}

/* Warning */
.toast-warning {
    border-left: 4px solid #f59e0b;
}

.toast-warning .toast-icon {
    color: #f59e0b;
}

.toast-warning .toast-message {
    color: #92400e;
}

/* Info */
.toast-info {
    border-left: 4px solid #e11d48;
}

.toast-info .toast-icon {
    color: #e11d48;
}

.toast-info .toast-message {
    color: #9f1239;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .toast {
        background: #1f2937;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
    }

    .toast-message {
        color: #f3f4f6;
    }

    .toast-close {
        color: #9ca3af;
    }

    .toast-close:hover {
        background: rgba(255, 255, 255, 0.1);
        color: #f3f4f6;
    }

    .toast-success .toast-message {
        color: #d1fae5;
    }

    .toast-error .toast-message {
        color: #fee2e2;
    }

    .toast-warning .toast-message {
        color: #fef3c7;
    }

    .toast-info .toast-message {
        color: #ffe4e6;
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .toast-container {
        left: 10px !important;
        right: 10px !important;
        max-width: none;
        padding: 10px;
        transform: none !important;
    }

    .toast {
        min-width: 0;
        width: 100%;
    }

    .toast-message {
        font-size: 13px;
    }
}

/* Animation for left-positioned toasts */
.toast-top-left .toast,
.toast-bottom-left .toast {
    transform: translateX(-100%);
}

.toast-top-left .toast-show,
.toast-bottom-left .toast-show {
    transform: translateX(0);
}

.toast-top-left .toast-hide,
.toast-bottom-left .toast-hide {
    transform: translateX(-100%);
}

/* Accessibility */
.toast:focus-visible {
    outline: 2px solid #e11d48;
    outline-offset: 2px;
}

/* Progress bar (optional - for future enhancement) */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: currentColor;
    opacity: 0.3;
    border-radius: 0 0 0 8px;
    animation: toast-progress 3s linear forwards;
}

@keyframes toast-progress {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}
