/**
 * Toast Notification Styles
 * Modern Material-inspired notifications
 */

/* Toast Container - centered at top */
.toast-container {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    pointer-events: none;
    max-width: 400px;
}

/* Toast Base */
.toast {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    box-shadow: 0 4px 12px hsl(var(--shadow-color) / 0.15),
                0 2px 4px hsl(var(--shadow-color) / 0.1);
    pointer-events: auto;
    min-width: 300px;
    max-width: 400px;
    opacity: 0;
    transform: translateY(-1rem);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.toast-hide {
    opacity: 0;
    transform: translateY(-1rem);
}

/* Toast Icon */
.toast-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-top: 0.125rem;
}

/* Toast Message */
.toast-message {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
    color: hsl(var(--foreground));
    word-wrap: break-word;
}

/* Toast Close Button */
.toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    color: hsl(var(--muted-foreground));
    border-radius: calc(var(--radius) / 2);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-close:hover {
    background: hsl(var(--accent));
    color: hsl(var(--accent-foreground));
}

/* Toast Types */
.toast-success {
    border-left: 4px solid hsl(var(--success));
}

.toast-success .toast-icon {
    color: hsl(var(--success));
}

.toast-error {
    border-left: 4px solid hsl(var(--error));
}

.toast-error .toast-icon {
    color: hsl(var(--error));
}

.toast-warning {
    border-left: 4px solid hsl(var(--warning));
}

.toast-warning .toast-icon {
    color: hsl(var(--warning));
}

.toast-info {
    border-left: 4px solid hsl(var(--primary));
}

.toast-info .toast-icon {
    color: hsl(var(--primary));
}

/* Confirmation Dialog */
.toast-confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: hsl(var(--shadow-color) / 0.5);
    backdrop-filter: blur(4px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.toast-confirm-overlay.toast-confirm-show {
    opacity: 1;
}

.toast-confirm {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: 1.5rem;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 8px 24px hsl(var(--shadow-color) / 0.25);
    transform: scale(0.95);
    transition: transform 0.2s ease;
}

.toast-confirm-show .toast-confirm {
    transform: scale(1);
}

.toast-confirm-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
    border-radius: 50%;
}

.toast-confirm-success .toast-confirm-icon {
    background: hsl(var(--success) / 0.1);
    color: hsl(var(--success));
}

.toast-confirm-error .toast-confirm-icon {
    background: hsl(var(--error) / 0.1);
    color: hsl(var(--error));
}

.toast-confirm-warning .toast-confirm-icon {
    background: hsl(var(--warning) / 0.1);
    color: hsl(var(--warning));
}

.toast-confirm-info .toast-confirm-icon {
    background: hsl(var(--primary) / 0.1);
    color: hsl(var(--primary));
}

.toast-confirm-icon svg {
    width: 28px;
    height: 28px;
    stroke-width: 2;
}

.toast-confirm-message {
    text-align: center;
    font-size: 15px;
    line-height: 1.6;
    color: hsl(var(--foreground));
    margin-bottom: 1.5rem;
}

.toast-confirm-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.toast-confirm-btn {
    padding: 0.625rem 1.5rem;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid hsl(var(--border));
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    transition: all 0.2s;
    min-width: 100px;
}

.toast-confirm-btn:hover {
    background: hsl(var(--accent));
    border-color: hsl(var(--accent-foreground) / 0.2);
}

.toast-confirm-cancel {
    background: hsl(var(--background));
    color: hsl(var(--muted-foreground));
}

.toast-confirm-cancel:hover {
    background: hsl(var(--muted));
    color: hsl(var(--foreground));
}

.toast-confirm-ok {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    border-color: hsl(var(--primary));
}

.toast-confirm-ok:hover {
    background: hsl(var(--primary) / 0.9);
    border-color: hsl(var(--primary) / 0.9);
}

/* Responsive */
@media (max-width: 640px) {
    .toast-container {
        left: 1rem;
        right: 1rem;
        transform: none;
        max-width: none;
    }

    .toast {
        min-width: auto;
        max-width: none;
        width: 100%;
    }

    .toast-confirm {
        max-width: none;
    }
}
