/* TTC Toast Notification System */

/* Toast Container */
.ttc-toast-container {
    position: fixed;
    top: var(--ttc-space-lg);
    right: var(--ttc-space-lg);
    z-index: 10000;
    max-width: 400px;
    pointer-events: none;
}

/* Individual Toast */
.ttc-toast {
    background: var(--ttc-bg-card);
    border: 1px solid var(--ttc-border-light);
    border-radius: var(--ttc-radius-lg);
    padding: var(--ttc-space-lg);
    margin-bottom: var(--ttc-space-md);
    box-shadow: var(--ttc-shadow-lg);
    display: flex;
    align-items: flex-start;
    gap: var(--ttc-space-md);
    animation: slideInRight 0.3s ease-out;
    pointer-events: all;
    backdrop-filter: var(--ttc-glass-blur);
    border-left: 4px solid transparent;
}

/* Toast States */
.ttc-toast.success {
    border-left-color: #10b981;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(16, 185, 129, 0.02));
}

.ttc-toast.error {
    border-left-color: #ef4444;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.05), rgba(239, 68, 68, 0.02));
}

.ttc-toast.warning {
    border-left-color: #f59e0b;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.05), rgba(245, 158, 11, 0.02));
}

.ttc-toast.info {
    border-left-color: #6366f1;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(99, 102, 241, 0.02));
}

/* Toast Icon */
.ttc-toast-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--ttc-fs-lg);
    border-radius: var(--ttc-radius-md);
}

.ttc-toast.success .ttc-toast-icon {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.ttc-toast.error .ttc-toast-icon {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.ttc-toast.warning .ttc-toast-icon {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.ttc-toast.info .ttc-toast-icon {
    background: rgba(99, 102, 241, 0.2);
    color: #6366f1;
}

/* Toast Content */
.ttc-toast-content {
    flex: 1;
    min-width: 0;
}

.ttc-toast-title {
    font-weight: var(--ttc-fw-semibold);
    font-size: var(--ttc-fs-sm);
    color: var(--ttc-text-main);
    margin: 0 0 var(--ttc-space-2xs);
}

.ttc-toast-message {
    font-size: var(--ttc-fs-xs);
    color: var(--ttc-text-muted);
    margin: 0;
    line-height: 1.4;
}

/* Toast Close Button */
.ttc-toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: var(--ttc-text-muted);
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--ttc-radius-sm);
    transition: var(--ttc-transition-fast);
    font-size: var(--ttc-fs-md);
}

.ttc-toast-close:hover {
    background: var(--ttc-border-subtle);
    color: var(--ttc-text-main);
}

/* Toast Progress Bar */
.ttc-toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--ttc-primary), transparent);
    border-radius: 0 0 var(--ttc-radius-lg) 0;
    animation: shrink 3s linear forwards;
}

.ttc-toast.success .ttc-toast-progress {
    background: linear-gradient(90deg, #10b981, transparent);
}

.ttc-toast.error .ttc-toast-progress {
    background: linear-gradient(90deg, #ef4444, transparent);
}

.ttc-toast.warning .ttc-toast-progress {
    background: linear-gradient(90deg, #f59e0b, transparent);
}

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

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

@keyframes shrink {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

.ttc-toast.removing {
    animation: slideOutRight 0.3s ease-out forwards;
}

/* Mobile Responsive */
@media (max-width: 640px) {
    .ttc-toast-container {
        top: auto;
        bottom: var(--ttc-space-lg);
        right: var(--ttc-space-sm);
        left: var(--ttc-space-sm);
        max-width: none;
    }

    .ttc-toast {
        flex-direction: row;
        width: 100%;
    }
}
