/* ===== TOAST NOTIFICATION STYLES ===== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 400px;
    pointer-events: none;
}

.toast {
    background: var(--card-background);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    pointer-events: auto;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    max-width: 100%;
    word-wrap: break-word;
}

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

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

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

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

.toast-warning {
    border-left: 4px solid #ffa726;
}

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

.toast-content {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    flex: 1;
}

.toast-icon {
    font-size: 1.2rem;
    margin-top: 0.1rem;
    flex-shrink: 0;
}

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

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

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

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

.toast-message {
    flex: 1;
    font-size: 0.95rem;
    line-height: 1.4;
    color: var(--text-color);
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-top: -0.25rem;
    margin-right: -0.25rem;
}

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

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.toast-progress-fill {
    height: 100%;
    background: var(--primary-color);
    width: 100%;
    transition: none;
}

.toast-success .toast-progress-fill {
    background: var(--success-color);
}

.toast-error .toast-progress-fill {
    background: var(--error-color);
}

.toast-warning .toast-progress-fill {
    background: #ffa726;
}

.toast-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.toast-action-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.toast-action-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

/* ===== PROGRESS BAR STYLES ===== */
.progress-container {
    background: var(--secondary-color);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(184, 184, 184, 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.progress-container:hover {
    box-shadow: 0 4px 12px rgba(144, 144, 144, 0.1);
}

.progress-file-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.progress-file-name {
    font-weight: 500;
    color: var(--text-color);
    flex: 1;
    min-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.progress-file-size {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-right: 1rem;
}

.progress-status {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--primary-color);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    background: rgba(144, 144, 144, 0.1);
}

.progress-bar-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: rgba(184, 184, 184, 0.2);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 4px;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    min-width: 0;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

.progress-text {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-color);
    min-width: 50px;
    text-align: center;
}

.progress-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.progress-action-btn {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-color);
    color: white;
}

.progress-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(144, 144, 144, 0.3);
}

.progress-action-btn.download-btn {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.progress-action-btn.download-btn:hover {
    background: var(--primary-color);
    color: white;
}

/* ===== RESPONSIVE TOAST & PROGRESS ===== */
@media (max-width: 768px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .toast {
        padding: 0.875rem;
    }
    
    .toast-message {
        font-size: 0.9rem;
    }
    
    .progress-container {
        padding: 1.25rem;
    }
    
    .progress-file-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .progress-file-name {
        min-width: auto;
        width: 100%;
    }
    
    .progress-actions {
        justify-content: center;
    }
    
    .progress-action-btn {
        flex: 1;
        justify-content: center;
        min-width: 120px;
    }
}

/* ===== DARK MODE ADJUSTMENTS ===== */
[data-theme="dark"] .toast {
    background: rgba(45, 45, 45, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .toast-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .progress-container {
    background: rgba(45, 45, 45, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .progress-status {
    background: rgba(255, 255, 255, 0.1);
}

/* ===== ANIMATIONS ===== */
@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

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

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

/* ===== ACCESSIBILITY ===== */
.toast:focus-within {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.progress-action-btn:focus,
.toast-action-btn:focus,
.toast-close:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ===== UTILITY CLASSES ===== */
.toast-paused .toast-progress-fill {
    animation-play-state: paused;
}

.progress-success .progress-bar-fill {
    background: var(--success-color);
}

.progress-error .progress-bar-fill {
    background: var(--error-color);
}

.progress-warning .progress-bar-fill {
    background: #ffa726;
}