/* Sistema de Toast */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
    width: 100%;
    pointer-events: none;
}

.toast {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1), 0 4px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 16px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: auto;
    border-left: 4px solid;
    position: relative;
    overflow: hidden;
}

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

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

/* Tipos de Toast */
.toast.success {
    border-left-color: #10b981;
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
}

.toast.error {
    border-left-color: #ef4444;
    background: linear-gradient(135deg, #fef2f2 0%, #ffffff 100%);
}

.toast.warning {
    border-left-color: #f59e0b;
    background: linear-gradient(135deg, #fffbeb 0%, #ffffff 100%);
}

.toast.info {
    border-left-color: #3b82f6;
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
}

/* Ícones */
.toast-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
    font-weight: bold;
}

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

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

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

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

/* Conteúdo */
.toast-content {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 4px 0;
    line-height: 1.4;
}

.toast-message {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
    line-height: 1.4;
    word-wrap: break-word;
}

/* Botão de fechar */
.toast-close {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-close:hover {
    background: #f3f4f6;
    color: #6b7280;
}

/* Barra de progresso */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: currentColor;
    opacity: 0.3;
    transition: width linear;
}

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

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

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

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

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

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

/* Responsividade */
@media (max-width: 640px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .toast {
        margin-bottom: 12px;
        padding: 14px 16px;
    }
    
    .toast-title {
        font-size: 13px;
    }
    
    .toast-message {
        font-size: 12px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .toast {
        background: #1f2937;
        color: #f9fafb;
    }
    
    .toast-title {
        color: #f9fafb;
    }
    
    .toast-message {
        color: #d1d5db;
    }
    
    .toast-close {
        color: #9ca3af;
    }
    
    .toast-close:hover {
        background: #374151;
        color: #d1d5db;
    }
    
    .toast.success {
        background: linear-gradient(135deg, #064e3b 0%, #1f2937 100%);
    }
    
    .toast.error {
        background: linear-gradient(135deg, #7f1d1d 0%, #1f2937 100%);
    }
    
    .toast.warning {
        background: linear-gradient(135deg, #78350f 0%, #1f2937 100%);
    }
    
    .toast.info {
        background: linear-gradient(135deg, #1e3a8a 0%, #1f2937 100%);
    }
}
