/* Toast Component Styles */

/* Toast Container (Fixed Position) */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 420px;
    width: calc(100vw - 48px);
    pointer-events: none;
}

/* Toast Component */
.toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid var(--color-border);
    background-color: var(--color-surface);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    animation: toastSlideIn 0.3s ease-out;
    pointer-events: auto;
}

.toast.dismissing {
    animation: toastSlideOut 0.3s ease-out forwards;
}

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

/* Toast Content */
.toast-content {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
}

.toast-title {
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--color-text);
}

.toast-message {
    font-weight: 400;
    color: var(--color-text-secondary);
}

/* Toast Close Button */
.toast-close {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.6;
    transition: opacity 0.2s;
    color: var(--color-text);
}

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

/* Toast Variants (Colored Icons) */
.toast-success .toast-icon {
    color: #10b981;
}

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

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

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

/* SVG Icons */
.toast .icon-check,
.toast .icon-error,
.toast .icon-warning,
.toast .icon-info {
    width: 20px;
    height: 20px;
}

.toast .icon-close {
    width: 16px;
    height: 16px;
}

/* Animations */
@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toastSlideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .toast {
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .toast-container {
        top: 16px;
        right: 16px;
        left: 16px;
        width: auto;
        max-width: none;
    }

    .toast {
        padding: 12px;
        gap: 8px;
    }

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

    .toast-title {
        margin-bottom: 2px;
    }
}
